diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/AUTHORS b/AUTHORS index 56b845a..2e08378 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,7 +7,7 @@ Copyright: 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. +The full text of the licenses can be found in the 'LICENSE' file. The lxqt-config-cursor component is based on the "qt-xcurtheme" project -and is licensed under GPL 2. +and is licensed under GPL 2, GPL 3, LGPL-2, LGPL-2.1 and WTFPL 2. diff --git a/CMakeLists.txt b/CMakeLists.txt index d3239ee..883d584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(lxqt-config) +set(LXQT_CONFIG_PROJECT "${PROJECT_NAME}") option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) @@ -29,6 +30,7 @@ add_subdirectory(lxqt-config-input) add_subdirectory(lxqt-config-file-associations) add_subdirectory(lxqt-config-appearance) add_subdirectory(lxqt-config-monitor) +add_subdirectory(lxqt-config-locale) # building tarball with CPack ------------------------------------------------- include(InstallRequiredSystemLibraries) diff --git a/COPYING b/LICENSE similarity index 96% rename from COPYING rename to LICENSE index a8dd823..20fb9c7 100644 --- a/COPYING +++ b/LICENSE @@ -1,9 +1,8 @@ - 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 + 51 Franklin Street, 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. @@ -23,8 +22,7 @@ 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. +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 @@ -89,9 +87,9 @@ 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 +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. @@ -138,8 +136,8 @@ 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. +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 @@ -305,10 +303,10 @@ of these things: 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. + 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 @@ -386,10 +384,9 @@ 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. +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 @@ -407,11 +404,11 @@ 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. +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. diff --git a/debian/changelog b/debian/changelog index f5dc0c0..cae5032 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +lxqt-config (0.10.0-2) unstable; urgency=medium + + * Merge from experimental. + * New upstream release. + * Update Vcs-* fields. + * Update copyright. + * Remove Debian specific menu in favor of .desktop menu system. + * Install manpage for lxqt-config. + + -- ChangZhuo Chen (陳昌倬) Tue, 10 Nov 2015 23:19:34 +0800 + lxqt-config (0.9.0+20150806-2) unstable; urgency=medium * Fixed .gitignore, removed outdated entries diff --git a/debian/control b/debian/control index 2dad7ba..50d0c3b 100644 --- a/debian/control +++ b/debian/control @@ -8,8 +8,9 @@ Section: x11 Priority: optional Build-Depends: debhelper (>= 9), cmake (>= 3.0.2), + libkf5screen-dev, libkf5windowsystem-dev, - liblxqt0-dev, + liblxqt0-dev (>= 0.10.0), libqt5svg5-dev, libqt5x11extras5-dev, libqt5xdg-dev, @@ -22,8 +23,8 @@ Build-Depends: debhelper (>= 9), qttools5-dev-tools, zlib1g-dev Standards-Version: 3.9.6 -Vcs-Browser: http://anonscm.debian.org/cgit/pkg-lxqt/lxqt-config.git -Vcs-Git: git://anonscm.debian.org/pkg-lxqt/lxqt-config.git +Vcs-Browser: http://anonscm.debian.org/cgit/pkg-lxqt/lxqt-config.git/?h=debian/sid +Vcs-Git: git://anonscm.debian.org/pkg-lxqt/lxqt-config.git -b debian/sid Homepage: https://github.com/lxde/lxqt-config Package: lxqt-config diff --git a/debian/copyright b/debian/copyright index 5f0a5e2..272560c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -19,20 +19,30 @@ Copyright: 2007, 2009 Rafael Fernández López 2007 John Tapsell License: LGPL-2.0+ -Files: liblxqt-config-cursor/cfgfile.h liblxqt-config-cursor/main.cpp - liblxqt-config-cursor/selectwnd.h liblxqt-config-cursor/main.h - liblxqt-config-cursor/selectwnd.cpp liblxqt-config-cursor/xcr/xcrtheme.h - liblxqt-config-cursor/xcr/xcrxcur.cpp liblxqt-config-cursor/xcr/xcrxcur.h - liblxqt-config-cursor/xcr/xcrthemefx.cpp liblxqt-config-cursor/xcr/xcrthemefx.h - liblxqt-config-cursor/xcr/xcrimg.h liblxqt-config-cursor/xcr/xcrthemexp.cpp - liblxqt-config-cursor/xcr/xcrtheme.cpp liblxqt-config-cursor/xcr/xcrthemexp.h - liblxqt-config-cursor/xcr/xcrimg.cpp +Files: liblxqt-config-cursor/cfgfile.h + liblxqt-config-cursor/main.cpp + liblxqt-config-cursor/main.h + liblxqt-config-cursor/selectwnd.cpp + liblxqt-config-cursor/selectwnd.h + liblxqt-config-cursor/xcr/xcrimg.cpp + liblxqt-config-cursor/xcr/xcrimg.h + liblxqt-config-cursor/xcr/xcrtheme.cpp + liblxqt-config-cursor/xcr/xcrtheme.h + liblxqt-config-cursor/xcr/xcrthemefx.cpp + liblxqt-config-cursor/xcr/xcrthemefx.h + liblxqt-config-cursor/xcr/xcrthemexp.cpp + liblxqt-config-cursor/xcr/xcrthemexp.h + liblxqt-config-cursor/xcr/xcrxcur.cpp + liblxqt-config-cursor/xcr/xcrxcur.h Copyright: Ketmar License: WTFPL-2 -Files: liblxqt-config-cursor/thememodel.h liblxqt-config-cursor/itemdelegate.cpp - liblxqt-config-cursor/crtheme.h liblxqt-config-cursor/thememodel.cpp - liblxqt-config-cursor/crtheme.cpp liblxqt-config-cursor/itemdelegate.h +Files: liblxqt-config-cursor/itemdelegate.cpp + liblxqt-config-cursor/itemdelegate.h + liblxqt-config-cursor/crtheme.cpp + liblxqt-config-cursor/crtheme.h + liblxqt-config-cursor/thememodel.cpp + liblxqt-config-cursor/thememodel.h Copyright: 2006-2007 Fredrik Höglund License: GPL-3.0+ @@ -41,20 +51,23 @@ Files: liblxqt-config-cursor/previewwidget.cpp Copyright: 2003-2007 Fredrik Höglund License: GPL-2.0+ -Files: lxqt-config-input/lxqt-config-input.cpp lxqt-config-input/mouseconfig.cpp - lxqt-config-input/mouseconfig.h lxqt-config-input/keyboardconfig.h - lxqt-config-input/keyboardconfig.cpp +Files: lxqt-config-input/keyboardconfig.cpp + lxqt-config-input/keyboardconfig.h + lxqt-config-input/lxqt-config-input.cpp + lxqt-config-input/mouseconfig.cpp + lxqt-config-input/mouseconfig.h Copyright: 2013-2014 Hong Jen Yee (PCMan) License: GPL-2.0+ -Files: lxqt-config-monitor/monitor.h lxqt-config-monitor/main.cpp - lxqt-config-monitor/monitorwidget.cpp lxqt-config-monitor/monitorwidget.h - lxqt-config-monitor/main.h lxqt-config-monitor/xrandr.cpp - lxqt-config-monitor/monitor.cpp lxqt-config-monitor/monitorsettingsdialog.cpp - lxqt-config-monitor/quickoptions.cpp - lxqt-config-monitor/monitorsettingsdialog.h lxqt-config-monitor/quickoptions.h - lxqt-config-monitor/savesettings.h lxqt-config-monitor/monitorpicture.h - lxqt-config-monitor/xrandr.h lxqt-config-monitor/savesettings.cpp +Files: lxqt-config-monitor/main.cpp + lxqt-config-monitor/monitor.cpp + lxqt-config-monitor/monitor.h + lxqt-config-monitor/monitorwidget.cpp + lxqt-config-monitor/monitorwidget.h + lxqt-config-monitor/monitorpicture.h + lxqt-config-monitor/monitorsettingsdialog.cpp + lxqt-config-monitor/monitorsettingsdialog.h + lxqt-config-monitor/savesettings.cpp Copyright: 2014 P.L. Lucas 2014 Hong Jen Yee (PCMan) License: GPL-2.0+ diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..7a9f00a --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,8 @@ +[DEFAULT] +debian-branch = debian/sid +upstream-branch = upstream/latest +pristine-tar = True + +[import-orig] +# Use git cherrypick -n upstream instead. +merge = False diff --git a/debian/lintian-overrides b/debian/lintian-overrides index 7dbf7b1..0125433 100644 --- a/debian/lintian-overrides +++ b/debian/lintian-overrides @@ -2,14 +2,13 @@ lxqt-config: binary-without-manpage usr/bin/lxqt-config-appearance lxqt-config: binary-without-manpage usr/bin/lxqt-config-file-associations lxqt-config: binary-without-manpage usr/bin/lxqt-config-input +lxqt-config: binary-without-manpage usr/bin/lxqt-config-locale lxqt-config: binary-without-manpage usr/bin/lxqt-config-monitor -lxqt-config: binary-without-manpage usr/bin/lxqt-config - # not a bug, LXQt has not reached free-desktop yet lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-appearance.desktop lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-file-associations.desktop lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-input.desktop +lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-locale.desktop lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-monitor.desktop lxqt-config: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config.desktop - diff --git a/debian/lxqt-config.manpages b/debian/lxqt-config.manpages new file mode 100644 index 0000000..c9a4be0 --- /dev/null +++ b/debian/lxqt-config.manpages @@ -0,0 +1 @@ +man/lxqt-config.1 diff --git a/debian/patches/private-lib.patch b/debian/patches/private-lib.patch deleted file mode 100644 index 3ac4ea2..0000000 --- a/debian/patches/private-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -Description: Install private .so file into proper directory. -Author: Andrew Lee (李健秋) ---- lxqt-config-0.9.0+20150806.orig/liblxqt-config-cursor/CMakeLists.txt -+++ lxqt-config-0.9.0+20150806/liblxqt-config-cursor/CMakeLists.txt -@@ -80,7 +80,7 @@ target_link_libraries(lxqt-config-cursor - - install(TARGETS - lxqt-config-cursor -- DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}" - COMPONENT Runtime - ) - install(FILES diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index b266763..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -private-lib.patch diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 0000000..05cd1df --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -0,0 +1,63 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.22 (GNU/Linux) + +mQINBFJevCYBEACx+Hvy+Vsuf+V5jeLUnzjAmHoy8DfTeGWr3ts30IapLHrfi0+U +WpzNnISO77yTr4VNboVZH+GHM/rnPfieODfB4ZW6CZLlInMSKUXcgQsEqXpyBZhA +Ib/SPy2bOfHly1uRJes0uRDsH5+v/hD74sByfnjQlrvI68O6wvGZmDFMNNPVO8+/ +OWBSBNkBuVrrZOMSPsLwQGJ4UtUQ4whburaPJG4VZJc5DLbzJGbEuACc0IAEYJS3 +7AfXVXn4j4Gc9F3o1xTUnbOBnwGPquWwUIm3FM7Ec2OdkvMt3EwvnkMAfeVrq3iE +FDD/KZTxdL0BZH3QD8gB7Jm4v4f3Nkobg6JCvCbcH3wBdZW4mASbwWzfRaDC2zHb +ErTglD7PpShLKZZ0pr9okWZEGw4Ku3q8ALi1JXK/ePTmsBlvkVskOJ3Nnd0avgH4 ++Q/vZoKfH8EhNY745rI+8CE9iv6V9XiSUt4CKEWAENt4A8hq6U2vV+jZv3B6AgD7 +ZjiI59yD4YuYubu8rCnNizTgh1voVw3ietknn/x2H5yH8fByWZ5uL87C0ky/uma6 +ZGbiiAtM4kdkyDMrfRV5nlEG9EKAGPVu5mjeSCrfkETwZ9OFPz1AuDye4ZEXrrcC +iRQ7RX6/GtW18aHER0kzGnfwx5KJzkDrRBY8A2PdXLBcrsN4WpK9EX01PQARAQAB +tCNKZXJvbWUgTGVjbGFuY2hlIDxqZXJvbWVAbGVjbGFuLmNoPokCPwQTAQIAKQUC +Ul68JgIbAwUJAeEzgAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEDfgrx/a +SPNzSHIP/1ewXcC0TFBcvDD7MrIP7anyNfiWfW7cxkR8GSamkg6HTa6Ndyr1FFjJ +OoDFUP37jWhu59CsHxs2D0zRWJktezfvElscRgqbHcdpIznqsGdI8hXCZafhBGVb +sdAB2LRawcXGxnXt7XajPcSVwLWRE62caBqohznU2iWvI780WNjEbZoA0LhZwaFF +UUPJm8ea9v0IkZVKUyg9WONZ1U7FEG9SaEiSpI8kJdx1fvCwZVDV/NRO5GqnJaho +P1LCne4YdwS6pt1/fRgk32IHxxZfHlLzLHxb6v1JmIg72x28qCmGyK9oFBDbbnYu +6Aq8XbHogOrD5vJM2Pfm2IhV0+JHOjfQbddv8tsAH1M+LI+tToXmg5st1AU3wnTn +pda3hjA1avKwkfBPW/osHc8782ViyS9iX2e9iDtMv608guij4NjpGExzGCypHOd8 ++VXRwJDjvgDynkL206MZ+wn0j5wHsIE8F3Y5Bp1thQOrdDli5MYNQoXhjFmH46XT +bcr84IgW0+AiXZdoFUqvwtzrWy2Onuw5R3k4OyV4skN4DkWXyAk/V+Y4K39JvTKf +H9YuiQ9blNzCu8WiAnjKnh9kNl9E/TyEwI6cHFmIPqF8ST9tJytWHtrKvU9csvXX +n8XNJmpcv2R1e6N+VuWWm5zUPTouv3AxCacLbm8Lh3ymGsk7ZEyhiQIcBBABAgAG +BQJSsFYyAAoJEBMY76xfu9vO6v0P/3wSj3/kE4nP4HfgcVJSzi+lm1ycpbLDZtgh +P1G+zJLVmA+E41vEZimeiYQxBAelatJz+CHzQo3LZ2oVChzVrZcVHn9k4P3pib69 +qCVif3/y0Wmecn+u2TWbOvJ7mthfO7T3W7rkW1/9ES7bUaXcXWQ2sjUBVqFkFsVt +xgJDo8wcxA+K4Yf06GCbxFwrB7X5GraWIkzqGnyse3XAQn8aORAXmE8Yd0FHOjEZ +Beb9shChnkYc3lEvNY8ioCaYSF9xr/Iz9cwpfPkpqFiVYWadtb+Gqeh6zC7vPmcT +zHxrgkq1WwQlSBm724tPt9xuGQoOglqEa23vlQZfv20nyrYjLeYUy6pMCRq7vn/n +nkQOcXF7yQlnqR6xKk0tWsM4e6du0ZvbjBbhHV/kBFVGCLm/upTwoMVm0WJTbr4T +5XfIZo7eA0lvGtUhe1PgcOidBikHfAIfYxu0BoMXoL4jbcQdR5+YBDEfsS0jPhCl +mew2ScW/R/UhUknJUVFTma0KHXzEmKiqeeUCDtwEi6fxdicAYkbcekgkfFiD/w8N +Lk3Uf+0x2MdKA36nUobFkk38oU+GW37kFWJs3f1YRuQFao896eNW/E8ekVMLNxOl +nCjnSbabaxDnxPTyW2KlNjf/QUEK4pT6S5QmuCSrle3PQpaSbAZDHzLBIL9gd3m6 +MH7+SvV4uQINBFJevCYBEADiXDUqstSdhIyuionS2KtE3IeEBIqS7GY8QPRBylIZ +ACVHFI/1HxChBqYVGFaDEQn3gj5lUUQPubfWaxzjF6+UNVQW4+cxmTocndAwfDbI ++E5BLdieFUzbAA05MV5ZjPhTNbSk1jpy4bNy0FILwNqc89Y6SoCbv1r3tZLCrBas +1+AfWknBynx0siGMbLFxtzR6hUkNz9URxt13FrzpUWMpAL8ZQGczOTSaWLrZA5l9 +xLzJ9ww8uM+C2Xej3/sANxi+kQE2GVMKurPS0TICwVWZxbdW/ytIkO67Rhse0q3t +vzjdawfCFRxv7XQB2ZJ6irDxbpHiJoojSWCHJadIyCG03iOiaqsSVvi4KnxtUck+ +udOEJUV5sxdzgeRrsDpeaN//KCWW9WjfsSkvOqP6S1gmWpNFdzF5XrzcgvqvSNqo +XejfakUTJqsIIEHO0zGuJFVzJNh2hQ/9dhjIspUORhtNKaljNvePiBrj2yqmd9PY +FlH1KMHe4H+YVIwPiyeNA87Pu+1yNo8gT7mXhGRfibgWjbt146WUJ7+l2StJMApn +eNSCartNaUNPnw96i2l5c9AsJ3SWC6XWpWzOLVj+9XceeA11lu/ogqEMHzx81NjH +2TePxwKTKxZnAvDmqryp++IgY2/OgIoIk3ZRdYu/dPijTOYWfCet/9/9kAFr9PeJ +KwARAQABiQIlBBgBAgAPBQJSXrwmAhsMBQkB4TOAAAoJEDfgrx/aSPNzJv0QAKkx +lCKEZ6ahAUuNWslsHnNWaHFHNawEO3NIEtQZGVFk2BYISupizvjZF6MnymO/9UFM +pzV6fp3xNdqaKWQBjScOgMgCASRixW2tMAKbJGHZKp3dBixpHgXxy2oOGMS+mQ5m +gWy07usq2YesoMD0K/SG6EnoRPHBvrJihArzMFVUY9hD3hk8bhiy8w9bCYFe+gkm +zpQl3/KN01kyt5LjzEBcIOw8qIBQe9Pk8PyOK75lPoNME714LatgOsyw2kaSQ9Sv +hziRGC5z/fV3PmH7XhSjENPKnCJU51GUMMLaL28t9o7Afh6Q8UV31/JO36vmQXQV ++b+0BoGqEmf3AKBASb2Cr2q4pZFjywwSUXHZ9hQyu1tpbE1dS6aI01kM0y270pk7 +W/ajuzuOxAVL1bJAanL/5+DWM03esZPVdEWhxpWEM40Z6Rhq+Xb2a5xfwCN9PmaQ +o9fez0I+yh53s7Ypv0tBj05FPe5L48+pDi6pz5nddN1B0FzF58jVfsBZUjBlY24+ +VwQeAaWkRXZrSEdtBS5ufsi80x/cNCSTJBWqtborKL1iGgf5MDPYRMSvmZXAeIld +pyL/0pbW7iokewyKzpFfo7KEbwLxB+flWaBZ867JpF4yyRj3b4qcvcyV8QnsoB7Z +KhxTl3gGwD/t0HUcu85zcfs4GkealYhIWfGaAso2 +=fF8P +-----END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch index 66c17c2..c941195 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,3 @@ version=3 -https://github.com/lxde/lxqt-config/releases .*/([\d\.]+).tar.gz +opts="pgpsigurlmangle=s/$/.asc/" \ + https://github.com/lxde/lxqt-config/releases .*/([\d\.]+).tar.gz diff --git a/liblxqt-config-cursor/CMakeLists.txt b/liblxqt-config-cursor/CMakeLists.txt index 75a2434..c09b93a 100644 --- a/liblxqt-config-cursor/CMakeLists.txt +++ b/liblxqt-config-cursor/CMakeLists.txt @@ -80,7 +80,7 @@ target_link_libraries(lxqt-config-cursor install(TARGETS lxqt-config-cursor - DESTINATION "${CMAKE_INSTALL_LIBDIR}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${LXQT_CONFIG_PROJECT}" COMPONENT Runtime ) install(FILES diff --git a/liblxqt-config-cursor/main.cpp b/liblxqt-config-cursor/main.cpp index 186aaf0..91afd83 100644 --- a/liblxqt-config-cursor/main.cpp +++ b/liblxqt-config-cursor/main.cpp @@ -30,7 +30,7 @@ int main (int argc, char *argv[]) //QTextCodec::setCodecForCStrings(QTextCodec::codecForName("koi8-r")); //QTextCodec::setCodecForLocale(QTextCodec::codecForName("koi8-r")); - LxQt::Application app(argc, argv); + LXQt::Application app(argc, argv); TRANSLATE_APP; //qDebug() << findDefaultTheme() << getCurrentTheme(); diff --git a/liblxqt-config-cursor/man/lxqt-config-mouse.1 b/liblxqt-config-cursor/man/lxqt-config-mouse.1 index 6b50157..b69b08e 100644 --- a/liblxqt-config-cursor/man/lxqt-config-mouse.1 +++ b/liblxqt-config-cursor/man/lxqt-config-mouse.1 @@ -1,12 +1,12 @@ .TH lxqt-config-cursor "1" "September 2012" "LXQt\ 0.7.0" "LXQt\ Cursor settings" .SH NAME -lxqt-config-cursor \- Application of \fBLXQt\fR: the faster and lighter QT Desktop Environment +lxqt-config-cursor \- Application of \fBLXQt\fR: the faster and lighter Qt Desktop Environment .SH SYNOPSIS .B lxqt-config-cursor .br .SH DESCRIPTION -This its a simple GUI cursor theme configuraton (by the moment) for the LXQt desktop environment. -Also can manage theme installation for it (localy for/per user only). +This is a simple GUI cursor theme configuration (at the moment) for the LXQt desktop environment. +Also can manage theme installation for it (locally for/per user only). .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: @@ -28,11 +28,11 @@ Manager. .SH "REPORTING BUGS" Report bugs to https://github.com/lxde/lxqt/issues .SH "SEE ALSO" -\fBLXQt\fR it has been tailored for users who value simplicity, speed, and +\fBLXQt\fR 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-config.1\fR LXQt application for performing settings on many applications +\fBlxqt-config(1)\fR LXQt application for performing settings on many applications .P .SH AUTHOR This manual page was created by \fBPICCORO Lenz McKAY\fR \fI\fR diff --git a/liblxqt-config-cursor/selectwnd.cpp b/liblxqt-config-cursor/selectwnd.cpp index 027eb18..e76840b 100644 --- a/liblxqt-config-cursor/selectwnd.cpp +++ b/liblxqt-config-cursor/selectwnd.cpp @@ -37,7 +37,7 @@ #define HOME_ICON_DIR QDir::homePath() + "/.icons" -SelectWnd::SelectWnd(LxQt::Settings* settings, QWidget *parent) : QWidget(parent), mSettings(settings) +SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent), mSettings(settings) { setupUi(this); diff --git a/liblxqt-config-cursor/selectwnd.h b/liblxqt-config-cursor/selectwnd.h index be9cb8b..c9bc428 100644 --- a/liblxqt-config-cursor/selectwnd.h +++ b/liblxqt-config-cursor/selectwnd.h @@ -17,7 +17,7 @@ #include #include -namespace LxQt { +namespace LXQt { class Settings; } @@ -29,7 +29,7 @@ class LXQT_API SelectWnd : public QWidget, private Ui_SelectWnd Q_OBJECT public: - SelectWnd (LxQt::Settings* settings, QWidget *parent=0); + SelectWnd (LXQt::Settings* settings, QWidget *parent=0); ~SelectWnd (); public slots: @@ -54,7 +54,7 @@ private slots: private: XCursorThemeModel *mModel; QPersistentModelIndex mAppliedIndex; - LxQt::Settings* mSettings; + LXQt::Settings* mSettings; }; #endif diff --git a/liblxqt-config-cursor/translations/lxqt-config-cursor_el_GR.ts b/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts similarity index 73% rename from liblxqt-config-cursor/translations/lxqt-config-cursor_el_GR.ts rename to liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts index b9066d6..31fb306 100644 --- a/liblxqt-config-cursor/translations/lxqt-config-cursor_el_GR.ts +++ b/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts @@ -1,6 +1,6 @@ - + SelectWnd @@ -11,7 +11,7 @@ Select the cursor theme you want to use (hover preview to test cursor). <b>LXQt session needs restart after this change</b>: - Επιλέξτε το θέμα δείκτη που θέλετε να χρησιμοποιήσετε (κινηθείτε επάνω για προεπισκόπηση). <b>Χρειάζεται επανεκκίνηση της συνεδρίας LXQt μετά την αλλαγή</b>: + Επιλέξτε το θέμα του δρομέα που θέλετε να χρησιμοποιήσετε (κινηθείτε επάνω για προεπισκόπηση). <b>Χρειάζεται επανεκκίνηση της συνεδρίας LXQt μετά την αλλαγή</b>: @@ -29,12 +29,12 @@ &Close - Κλεί&σιμο + &Κλείσιμο XCurTheme error - Σφάλμα του θέματος δείκτη X + Σφάλμα του θέματος δρομέα X @@ -47,17 +47,17 @@ Form - + Παράθυρο διαλόγου LXQt could not find any cursor theme. The default X11 cursor theme will be used instead. LXQt looked in the following directories: - + Το LXQt δεν μπόρεσε να βρει κάποιο θέμα δρομέα. Θα χρησιμοποιηθεί ο εξ ορισμού δρομέας X11. Το LXQt έψαξε στους παρακάτω καταλόγους: Show... - + Εμφάνιση... diff --git a/liblxqt-config-cursor/translations/lxqt-config-cursor_it_IT.ts b/liblxqt-config-cursor/translations/lxqt-config-cursor_it.ts similarity index 100% rename from liblxqt-config-cursor/translations/lxqt-config-cursor_it_IT.ts rename to liblxqt-config-cursor/translations/lxqt-config-cursor_it.ts diff --git a/liblxqt-config-cursor/translations/lxqt-config-cursor_pt.ts b/liblxqt-config-cursor/translations/lxqt-config-cursor_pt.ts index 3f36943..85d357e 100644 --- a/liblxqt-config-cursor/translations/lxqt-config-cursor_pt.ts +++ b/liblxqt-config-cursor/translations/lxqt-config-cursor_pt.ts @@ -52,7 +52,7 @@ LXQt could not find any cursor theme. The default X11 cursor theme will be used instead. LXQt looked in the following directories: - O LxQt não encontrou quaisquer temas de cursor. Será utilizado o tema de cursor X11. O LxQt procurou nestes diretórios: + O LXQt não encontrou quaisquer temas de cursor. Será utilizado o tema de cursor X11. O LXQt procurou nestes diretórios: diff --git a/lxqt-config-appearance/CMakeLists.txt b/lxqt-config-appearance/CMakeLists.txt index d46e4d4..e160755 100644 --- a/lxqt-config-appearance/CMakeLists.txt +++ b/lxqt-config-appearance/CMakeLists.txt @@ -75,6 +75,11 @@ target_link_libraries(${PROJECT_NAME} lxqt-config-cursor ) +set_target_properties("${PROJECT_NAME}" + PROPERTIES + INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${LXQT_CONFIG_PROJECT}" +) + install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" diff --git a/lxqt-config-appearance/fontsconfig.cpp b/lxqt-config-appearance/fontsconfig.cpp index ca10f66..687fe83 100644 --- a/lxqt-config-appearance/fontsconfig.cpp +++ b/lxqt-config-appearance/fontsconfig.cpp @@ -45,11 +45,11 @@ extern void qt_x11_apply_settings_in_all_apps(); static const char* subpixelNames[] = {"none", "rgb", "bgr", "vrgb", "vbgr"}; static const char* hintStyleNames[] = {"hintnone", "hintslight", "hintmedium", "hintfull"}; -FontsConfig::FontsConfig(LxQt::Settings* settings, QSettings* qtSettings, QWidget* parent) : +FontsConfig::FontsConfig(LXQt::Settings* settings, QSettings* qtSettings, QWidget* parent) : QWidget(parent), ui(new Ui::FontsConfig), - mSettings(settings), mQtSettings(qtSettings), + mSettings(settings), mFontConfigFile() { ui->setupUi(this); diff --git a/lxqt-config-appearance/fontsconfig.h b/lxqt-config-appearance/fontsconfig.h index 945c8a7..807fd45 100644 --- a/lxqt-config-appearance/fontsconfig.h +++ b/lxqt-config-appearance/fontsconfig.h @@ -45,7 +45,7 @@ class FontsConfig : public QWidget Q_OBJECT public: - explicit FontsConfig(LxQt::Settings *settings, QSettings *qtSettings, QWidget *parent = 0); + explicit FontsConfig(LXQt::Settings *settings, QSettings *qtSettings, QWidget *parent = 0); ~FontsConfig(); public Q_SLOTS: @@ -63,7 +63,7 @@ private Q_SLOTS: private: Ui::FontsConfig *ui; QSettings *mQtSettings; - LxQt::Settings *mSettings; + LXQt::Settings *mSettings; FontConfigFile mFontConfigFile; }; diff --git a/lxqt-config-appearance/iconthemeconfig.cpp b/lxqt-config-appearance/iconthemeconfig.cpp index a5e73f4..509d486 100644 --- a/lxqt-config-appearance/iconthemeconfig.cpp +++ b/lxqt-config-appearance/iconthemeconfig.cpp @@ -39,7 +39,7 @@ using namespace QtXdg; -IconThemeConfig::IconThemeConfig(LxQt::Settings* settings, QWidget* parent): +IconThemeConfig::IconThemeConfig(LXQt::Settings* settings, QWidget* parent): QWidget(parent), m_settings(settings) { @@ -50,7 +50,7 @@ IconThemeConfig::IconThemeConfig(LxQt::Settings* settings, QWidget* parent): connect(iconThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(iconThemeSelected(QTreeWidgetItem*,int))); - connect(LxQt::Settings::globalSettings(), SIGNAL(settingsChanged()), + connect(LXQt::Settings::globalSettings(), SIGNAL(settingsChanged()), this, SLOT(update())); } @@ -126,7 +126,7 @@ void IconThemeConfig::initIconsThemes() void IconThemeConfig::initControls() { - QString currentTheme = LxQt::Settings::globalSettings()->value("icon_theme").toString(); + QString currentTheme = LXQt::Settings::globalSettings()->value("icon_theme").toString(); XdgIcon::setThemeName(currentTheme); QTreeWidgetItemIterator it(iconThemeList); while (*it) { diff --git a/lxqt-config-appearance/iconthemeconfig.h b/lxqt-config-appearance/iconthemeconfig.h index 288cc6c..7ab2e08 100644 --- a/lxqt-config-appearance/iconthemeconfig.h +++ b/lxqt-config-appearance/iconthemeconfig.h @@ -31,7 +31,7 @@ #include "ui_iconthemeconfig.h" #include "iconthemeinfo.h" -namespace LxQt { +namespace LXQt { class Settings; } @@ -41,11 +41,11 @@ class IconThemeConfig : public QWidget, public Ui::IconThemeConfig Q_OBJECT public: - IconThemeConfig(LxQt::Settings *settings, QWidget *parent = 0); + IconThemeConfig(LXQt::Settings *settings, QWidget *parent = 0); ~IconThemeConfig(); private: - LxQt::Settings *m_settings; + LXQt::Settings *m_settings; void initIconsThemes(); public slots: diff --git a/lxqt-config-appearance/lxqt-config-appearance.desktop.in b/lxqt-config-appearance/lxqt-config-appearance.desktop.in index 2fae068..8565232 100644 --- a/lxqt-config-appearance/lxqt-config-appearance.desktop.in +++ b/lxqt-config-appearance/lxqt-config-appearance.desktop.in @@ -6,6 +6,6 @@ Comment=Appearance settings for LXQt Exec=lxqt-config-appearance Icon=preferences-desktop-theme Categories=Settings;DesktopSettings;Qt;LXQt; -OnlyShowIn=LXDE;LXQt; +OnlyShowIn=LXQt; #TRANSLATIONS_DIR=translations diff --git a/lxqt-config-appearance/lxqtthemeconfig.cpp b/lxqt-config-appearance/lxqtthemeconfig.cpp index 06ebe13..ffda79d 100644 --- a/lxqt-config-appearance/lxqtthemeconfig.cpp +++ b/lxqt-config-appearance/lxqtthemeconfig.cpp @@ -31,9 +31,9 @@ #include #include -LxQtThemeConfig::LxQtThemeConfig(LxQt::Settings *settings, QWidget *parent) : +LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) : QWidget(parent), - ui(new Ui::LxQtThemeConfig), + ui(new Ui::LXQtThemeConfig), mSettings(settings) { ui->setupUi(this); @@ -42,8 +42,8 @@ LxQtThemeConfig::LxQtThemeConfig(LxQt::Settings *settings, QWidget *parent) : this, SLOT(lxqtThemeSelected(QTreeWidgetItem*,int))); - QList themes = LxQt::LxQtTheme::allThemes(); - foreach(LxQt::LxQtTheme theme, themes) + QList themes = LXQt::LXQtTheme::allThemes(); + foreach(LXQt::LXQtTheme theme, themes) { QString themeName = theme.name(); themeName[0] = themeName[0].toTitleCase(); @@ -61,13 +61,13 @@ LxQtThemeConfig::LxQtThemeConfig(LxQt::Settings *settings, QWidget *parent) : } -LxQtThemeConfig::~LxQtThemeConfig() +LXQtThemeConfig::~LXQtThemeConfig() { delete ui; } -void LxQtThemeConfig::initControls() +void LXQtThemeConfig::initControls() { QString currentTheme = mSettings->value("theme").toString(); @@ -85,7 +85,7 @@ void LxQtThemeConfig::initControls() } -void LxQtThemeConfig::lxqtThemeSelected(QTreeWidgetItem* item, int column) +void LXQtThemeConfig::lxqtThemeSelected(QTreeWidgetItem* item, int column) { Q_UNUSED(column); if (!item) @@ -94,7 +94,7 @@ void LxQtThemeConfig::lxqtThemeSelected(QTreeWidgetItem* item, int column) QVariant themeName = item->data(0, Qt::UserRole); mSettings->setValue("theme", themeName); - LxQt::LxQtTheme theme(themeName.toString()); + LXQt::LXQtTheme theme(themeName.toString()); if(theme.isValid()) { QString wallpaper = theme.desktopBackground(); if(!wallpaper.isEmpty()) { diff --git a/lxqt-config-appearance/lxqtthemeconfig.h b/lxqt-config-appearance/lxqtthemeconfig.h index f94e35d..fcdff5c 100644 --- a/lxqt-config-appearance/lxqtthemeconfig.h +++ b/lxqt-config-appearance/lxqtthemeconfig.h @@ -34,16 +34,16 @@ class QTreeWidgetItem; namespace Ui { - class LxQtThemeConfig; + class LXQtThemeConfig; } -class LxQtThemeConfig : public QWidget +class LXQtThemeConfig : public QWidget { Q_OBJECT public: - explicit LxQtThemeConfig(LxQt::Settings *settings, QWidget *parent = 0); - ~LxQtThemeConfig(); + explicit LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent = 0); + ~LXQtThemeConfig(); public slots: void initControls(); @@ -52,8 +52,8 @@ private slots: void lxqtThemeSelected(QTreeWidgetItem* item, int column); private: - Ui::LxQtThemeConfig *ui; - LxQt::Settings *mSettings; + Ui::LXQtThemeConfig *ui; + LXQt::Settings *mSettings; }; #endif // LXQTTHEMECONFIG_H diff --git a/lxqt-config-appearance/lxqtthemeconfig.ui b/lxqt-config-appearance/lxqtthemeconfig.ui index d4a02c5..ba102fb 100644 --- a/lxqt-config-appearance/lxqtthemeconfig.ui +++ b/lxqt-config-appearance/lxqtthemeconfig.ui @@ -1,6 +1,6 @@ - LxQtThemeConfig + LXQtThemeConfig diff --git a/lxqt-config-appearance/main.cpp b/lxqt-config-appearance/main.cpp index 5b85160..7b42609 100644 --- a/lxqt-config-appearance/main.cpp +++ b/lxqt-config-appearance/main.cpp @@ -40,10 +40,10 @@ int main (int argc, char **argv) { - LxQt::SingleApplication app(argc, argv); - LxQt::Settings* settings = new LxQt::Settings("lxqt"); - LxQt::Settings* sessionSettings = new LxQt::Settings("session"); - LxQt::ConfigDialog* dialog = new LxQt::ConfigDialog(QObject::tr("LXQt Appearance Configuration"), settings); + LXQt::SingleApplication app(argc, argv); + LXQt::Settings* settings = new LXQt::Settings("lxqt"); + LXQt::Settings* sessionSettings = new LXQt::Settings("session"); + LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Appearance Configuration"), settings); app.setActivationWindow(dialog); @@ -56,7 +56,7 @@ int main (int argc, char **argv) dialog->addPage(iconPage, QObject::tr("Icons Theme"), QStringList() << "preferences-desktop-icons" << "preferences-desktop"); QObject::connect(dialog, SIGNAL(reset()), iconPage, SLOT(initControls())); - LxQtThemeConfig* themePage = new LxQtThemeConfig(settings, dialog); + LXQtThemeConfig* themePage = new LXQtThemeConfig(settings, dialog); dialog->addPage(themePage, QObject::tr("LXQt Theme"), QStringList() << "preferences-desktop-color" << "preferences-desktop"); QObject::connect(dialog, SIGNAL(reset()), themePage, SLOT(initControls())); diff --git a/lxqt-config-appearance/styleconfig.cpp b/lxqt-config-appearance/styleconfig.cpp index 51834ca..1a99596 100644 --- a/lxqt-config-appearance/styleconfig.cpp +++ b/lxqt-config-appearance/styleconfig.cpp @@ -41,11 +41,11 @@ extern void qt_x11_apply_settings_in_all_apps(); #endif -StyleConfig::StyleConfig(LxQt::Settings* settings, QSettings* qtSettings, QWidget* parent) : +StyleConfig::StyleConfig(LXQt::Settings* settings, QSettings* qtSettings, QWidget* parent) : QWidget(parent), ui(new Ui::StyleConfig), - mSettings(settings), - mQtSettings(qtSettings) + mQtSettings(qtSettings), + mSettings(settings) { ui->setupUi(this); @@ -88,7 +88,7 @@ void StyleConfig::initControls() ++it; } - // read other widget related settings form LxQt settings. + // read other widget related settings form LXQt settings. QByteArray tb_style = mSettings->value("tool_button_style").toByteArray(); // convert toolbar style name to value QMetaEnum me = QToolBar::staticMetaObject.property(QToolBar::staticMetaObject.indexOfProperty("toolButtonStyle")).enumerator(); diff --git a/lxqt-config-appearance/styleconfig.h b/lxqt-config-appearance/styleconfig.h index 4608a98..a680ca8 100644 --- a/lxqt-config-appearance/styleconfig.h +++ b/lxqt-config-appearance/styleconfig.h @@ -43,7 +43,7 @@ class StyleConfig : public QWidget Q_OBJECT public: - explicit StyleConfig(LxQt::Settings *settings, QSettings *qtSettings, QWidget *parent = 0); + explicit StyleConfig(LXQt::Settings *settings, QSettings *qtSettings, QWidget *parent = 0); ~StyleConfig(); public slots: @@ -57,7 +57,7 @@ private slots: private: Ui::StyleConfig *ui; QSettings *mQtSettings; - LxQt::Settings *mSettings; + LXQt::Settings *mSettings; }; #endif // STYLECONFIG_H diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance.ts b/lxqt-config-appearance/translations/lxqt-config-appearance.ts index 7052000..015ec70 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration - + Widget Style - + Icons Theme - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts index b218f7a..d425ad4 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - واجهة ريزر المخصَّصة - - - - LxQtThemeConfig LXQt Theme - واجهة ريزر المخصَّصة + واجهة ريزر المخصَّصة QObject - + LXQt Appearance Configuration تهيئة مظهر ريزر - + Widget Style - + Icons Theme نماذج اﻷيقونات - + LXQt Theme واجهة ريزر المخصَّصة - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_cs.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.desktop index 520ed07..ca0140a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_cs.desktop +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.desktop @@ -1,4 +1,4 @@ # Translations -Comment[cs]=Nastavit vzhled pracovní plochy LxQt +Comment[cs]=Nastavit vzhled pracovní plochy LXQt GenericName[cs]=Nastavení vzhledu Name[cs]=Nastavení vzhledu diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts index 3190bc8..865bbab 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Motiv LXQt - - - - LxQtThemeConfig LXQt Theme - Motiv LXQt + Motiv LXQt QObject - + LXQt Appearance Configuration Nastavení vzhledu - + Widget Style - + Icons Theme Téma ikon - + LXQt Theme Motiv LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts index 5c50f96..6132069 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Motiv LXQt - - - - LxQtThemeConfig LXQt Theme - Motiv LXQt + Motiv LXQt QObject - + LXQt Appearance Configuration Nastavení vzhledu - + Widget Style - + Icons Theme Téma ikon - + LXQt Theme Motiv LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts index dd95333..3b8bd23 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt Tema - - - - LxQtThemeConfig LXQt Theme - LXQt Tema + LXQt Tema QObject - + LXQt Appearance Configuration LXQt Indstillinger for Udseende - + Widget Style - + Icons Theme Ikontema - + LXQt Theme LXQt Tema - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts index ba4d4db..c347fe3 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt Tema - - - - LxQtThemeConfig LXQt Theme - LXQt Tema + LXQt Tema QObject - + LXQt Appearance Configuration LXQt Indstillinger for Udseende - + Widget Style - + Icons Theme Ikontema - + LXQt Theme LXQt Tema - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts index 7bbde19..724356a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration LXQt Erscheinungsbild-Konfiguration - + Widget Style Stil der Bedienelemente - + Icons Theme Symboldesign - + LXQt Theme LXQt-Design - + Font Schriftart - + Cursor Mauszeiger diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_el.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_el.desktop new file mode 100644 index 0000000..c9e42fe --- /dev/null +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_el.desktop @@ -0,0 +1,4 @@ +# Translations +Comment[el]=Διαμόρφωση εμφάνισης της επιφάνειας εργασίας LXQt +GenericName[el]=Διαμόρφωση εμφάνισης LXQt +Name[el]=Διαμόρφωση εμφάνισης LXQt diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_el.ts similarity index 63% rename from lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.ts rename to lxqt-config-appearance/translations/lxqt-config-appearance_el.ts index dc62275..d3f092f 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_el.ts @@ -1,128 +1,128 @@ - + FontsConfig Font - + Γραμματοσειρά Default font for user interface - + Εξ ορισμού γραμματοσειρά του περιβάλλοντος χρήστη Font name: - + Όνομα γραμματοσειράς: Style: - + Ύφος: Point size: - + Μέγεθος σημείου: Normal - + Κανονικό Bold - + Έντονα Italic - + Πλάγια Bold Italic - + Έντονα πλάγια The following settings only affect newly started applications - + Οι παρακάτω ρυθμίσεις επηρεάζουν μόνο τις εφεξής εφαρμογές Use antialias fonts - + Χρήση της εξομάλυνσης γραμματοσειρών Font hinting style: - + Ύφος υπόδειξης των γραμματοσειρών: None - + Κανένα Slight - + Ελαφρύ Medium - + Μεσαίο Full - + Πλήρες Font hinting - + Υπόδειξη γραμματοσειρών Resolution (DPI): - + Ανάλυση (DPI): Autohint - + Αυτόματη υπόδειξη (autohint) Subpixel antialiasing: - + Εξομάλυνση υποεικονοστοιχείων: RGB - + RGB BGR - + BGR VRGB - + VRGB VBGR - + VBGR @@ -130,7 +130,7 @@ LXQt Appearance Configuration - Διαμόρφωση εμφάνισης LXQt + Διαμόρφωση της εμφάνισης του LXQt @@ -140,50 +140,43 @@ LXQtThemeConfig - - LXQt Theme - Θέμα LXQt - - - - LxQtThemeConfig LXQt Theme - Θέμα LXQt + Θέμα του LXQt QObject - + LXQt Appearance Configuration - Διαμόρφωση εμφάνισης LXQt + Διαμόρφωση της εμφάνισης του LXQt - + Widget Style - + Στιλ συστατικού - + Icons Theme Θέμα εικονιδίων - + LXQt Theme Θέμα LXQt - + Font - + Γραμματοσειρά - + Cursor - + Δρομέας @@ -191,42 +184,42 @@ Widget Style - + Στιλ συστατικού Toolbar button style: - + Ύφος των κουμπιών της γραμμής εργαλείων: Only display the icon - + Εμφάνιση μόνον του εικονιδίου Only display the text - + Εμφάνιση μόνον του κειμένου The text appears beside the icon - + Το κείμενο εμφανίζεται δίπλα από το εικονίδιο The text appears under the icon - + Το κείμενο εμφανίζεται κάτω από το εικονίδιο Default - + Εξ ορισμού Activate item on single click - + Ενεργοποίηση των αντικειμένων με μονό κλικ diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.desktop deleted file mode 100644 index 850a708..0000000 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_el_GR.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[el_GR]=Διαμόρφωση εμφάνισης της επιφάνειας εργασίας LXQt -GenericName[el_GR]=Διαμόρφωση εμφάνισης LXQt -Name[el_GR]=Διαμόρφωση εμφάνισης LXQt diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts index 4a709cd..7098e54 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Etoso de LXQt - - - - LxQtThemeConfig LXQt Theme - Etoso de LXQt + Etoso de LXQt QObject - + LXQt Appearance Configuration Agordoj de apero de LXQto - + Widget Style - + Icons Theme Etoso de piktogramoj - + LXQt Theme Etoso de LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts index 372dac5..bbae1b3 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Tema de LXQt - - - - LxQtThemeConfig LXQt Theme - Tema de LXQt + Tema de LXQt QObject - + LXQt Appearance Configuration Configuración de apariencia de LXQt - + Widget Style - + Icons Theme Tema de iconos - + LXQt Theme Tema de LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts index b72e1d7..88d31fc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Tema LXQt - - - - LxQtThemeConfig LXQt Theme - Tema LXQt + Tema LXQt QObject - + LXQt Appearance Configuration Configuración de apariencia de LXQt - + Widget Style - + Icons Theme Tema de iconos - + LXQt Theme Tema LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts index 0a890aa..4eb61c8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt gaia - - - - LxQtThemeConfig LXQt Theme - LXQt gaia + LXQt gaia QObject - + LXQt Appearance Configuration LXQt itxuraren konfigurazioa - + Widget Style - + Icons Theme Ikonoen gaia - + LXQt Theme LXQt gaia - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts index f257a1c..98a2440 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt-teema - - - - LxQtThemeConfig LXQt Theme - LXQt-teema + LXQt-teema QObject - + LXQt Appearance Configuration LXQtin ulkoasun hallinta - + Widget Style - + Icons Theme Kuvaketeema - + LXQt Theme LXQt-teema - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts index 0b84f1e..9f5b669 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Thème de LXQt - - - - LxQtThemeConfig LXQt Theme - Thème de LXQt + Thème de LXQt QObject - + LXQt Appearance Configuration Configuration de l'apparence de LXQt - + Widget Style - + Icons Theme Thème d'icones - + LXQt Theme Thème de LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts index 4841659..21d6d06 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts @@ -140,13 +140,6 @@ LXQtThemeConfig - - LXQt Theme - LXQt téma - - - - LxQtThemeConfig LXQt Theme @@ -156,32 +149,32 @@ QObject - + LXQt Appearance Configuration LXQt megjelenésbeállító - + Widget Style Bigyótéma - + Icons Theme Ikontéma - + LXQt Theme LXQt téma - + Font Betű - + Cursor Kurzor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts index 6781b30..36349ad 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -160,32 +160,32 @@ QObject - + LXQt Appearance Configuration LXQt megjelenésbeállító - + Widget Style Bigyótéma - + Icons Theme Ikontémák - + LXQt Theme LXQT téma - + Font Betű - + Cursor Kurzor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts index 16f90be..776fd96 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration - + Widget Style - + Icons Theme - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts index 9d6af20..4594b4c 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration Konfigurasi Penampilan LXQt - + Widget Style - + Icons Theme Tema Ikon - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_it.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_it.desktop index 4e35f23..7adb9f6 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_it.desktop +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_it.desktop @@ -2,5 +2,3 @@ GenericName[it]=Aspetto Name[it]=Aspetto Comment[it]=Configura l'aspetto di LXQt - - diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts index 6988c22..efd963a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts @@ -140,7 +140,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -150,32 +150,32 @@ QObject - + LXQt Appearance Configuration Centro di Configurazione LXQt - + Widget Style Stile degli elementi - + Icons Theme Tema delle icone - + LXQt Theme Tema di LXQt - + Font Caratteri - + Cursor Cursore diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.desktop deleted file mode 100644 index 6f62c55..0000000 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[it_IT]=Configura l'aspetto del desktop LXQt -GenericName[it_IT]=Configurazione dell'aspetto di LXQt -Name[it_IT]=Configurazione dell'aspetto di LXQt diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.ts deleted file mode 100644 index 6988c22..0000000 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_it_IT.ts +++ /dev/null @@ -1,226 +0,0 @@ - - - - - FontsConfig - - - Font - Caratteri - - - - Default font for user interface - Carattere generale - - - - Font name: - Carattere: - - - - Style: - Stile: - - - - Point size: - Dimensione: - - - - Normal - Normale - - - - Bold - Grassetto - - - - Italic - Corsivo - - - - Bold Italic - Grassetto corsivo - - - - The following settings only affect newly started applications - Le impostazioni riguardano solo le applicazioni avviate nuovamente - - - - Use antialias fonts - Utilizza anti-aliasing per i caratteri - - - - Font hinting style: - Stile di hinting - - - - - None - Nessuno - - - - Slight - Leggero - - - - Medium - Medio - - - - Full - Forte - - - - Font hinting - Hinting caratteri - - - - Resolution (DPI): - Resoluzione (DPI): - - - - Autohint - Hinting automatico - - - - Subpixel antialiasing: - no idea how to translate that - - - - - RGB - - - - - BGR - - - - - VRGB - - - - - VBGR - - - - - IconThemeConfig - - - LXQt Appearance Configuration - Centro di Configurazione LXQt - - - - Icons Theme - Temi delle icone - - - - LxQtThemeConfig - - - LXQt Theme - Tema di LXQt - - - - QObject - - - LXQt Appearance Configuration - Centro di Configurazione LXQt - - - - Widget Style - Stile degli elementi - - - - Icons Theme - Tema delle icone - - - - LXQt Theme - Tema di LXQt - - - - Font - Caratteri - - - - Cursor - Cursore - - - - StyleConfig - - - Widget Style - Stile degli elementi - - - - Toolbar button style: - Stile della barra delle applicazioni: - - - - Only display the icon - Mostra solo icone - - - - Only display the text - Mostra solo testo - - - - The text appears beside the icon - Testo accanto le icone - - - - The text appears under the icon - Testo sotto le icone - - - - Default - - - - - Activate item on single click - Attiva elementi con clic singolo - - - diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts index b3da63f..616d9dc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration LXQt外観の設定 - + Widget Style ウィジェットのスタイル - + Icons Theme アイコンテーマ - + LXQt Theme LXQtテーマ - + Font フォント - + Cursor カーソル diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts index a0c46a9..e3ffdf8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration - + Widget Style - + Icons Theme - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts index 8327bc0..e654729 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt apipavidalinimas - - - - LxQtThemeConfig LXQt Theme - LXQt apipavidalinimas + LXQt apipavidalinimas QObject - + LXQt Appearance Configuration LXQt išvaizdos nustatymai - + Widget Style - + Icons Theme Piktogramų tema - + LXQt Theme LXQt apipavidalinimas - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts index 725ff00..d8a2db5 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt Thema - - - - LxQtThemeConfig LXQt Theme - LXQt Thema + LXQt Thema QObject - + LXQt Appearance Configuration LXQt Uiterlijk Configuratie - + Widget Style - + Icons Theme Pictogram Thema - + LXQt Theme LXQt Thema - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts index a9c40d7..1ca19a5 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration Menu - + Widget Style - + Icons Theme - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts index 1109194..aced0c8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts @@ -140,13 +140,6 @@ LXQtThemeConfig - - LXQt Theme - Motyw LXQt - - - - LxQtThemeConfig LXQt Theme @@ -156,32 +149,32 @@ QObject - + LXQt Appearance Configuration Konfiguracja wyglądu LXQt - + Widget Style Widżety - + Icons Theme Motyw ikon - + LXQt Theme Motyw LXQt - + Font Czcionka - + Cursor Kursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts index 398fb9a..cf36627 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Tema LXQt - - - - LxQtThemeConfig LXQt Theme - Tema LXQt + Tema LXQt QObject - + LXQt Appearance Configuration Configuração da aparência do LXQt - + Widget Style - + Icons Theme Tema de ícones - + LXQt Theme Tema LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts index 30f79a5..620b534 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Tema do LXQt - - - - LxQtThemeConfig LXQt Theme - Tema do LXQt + Tema do LXQt QObject - + LXQt Appearance Configuration Configuração da aparência do LXQt - + Widget Style - + Icons Theme Tema de ícones - + LXQt Theme Tema do LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts index 2537d1b..150879e 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Temă LXQt - - - - LxQtThemeConfig LXQt Theme - Temă LXQt + Temă LXQt QObject - + LXQt Appearance Configuration Părăsește - + Widget Style - + Icons Theme Temă pictograme - + LXQt Theme Temă LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts index b713179..a573297 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration Настройка внешнего вида LXQt - + Icons Theme Тема иконок - + LXQt Theme LXQt темы - + Widget Style Стиль виджетов - + Font Шрифт - + Cursor Курсор diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts index b713179..a573297 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration Настройка внешнего вида LXQt - + Icons Theme Тема иконок - + LXQt Theme LXQt темы - + Widget Style Стиль виджетов - + Font Шрифт - + Cursor Курсор diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts index 60aefde..d06da10 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -160,32 +160,32 @@ QObject - + LXQt Appearance Configuration Nastavenie vzhľadu prostredia LXQt - + Widget Style - + Icons Theme Téma ikon - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts index 1a3a080..f2a0f80 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Tema za LXQt - - - - LxQtThemeConfig LXQt Theme - Tema za LXQt + Tema za LXQt QObject - + LXQt Appearance Configuration Nastavitev videza za LXQt - + Widget Style - + Icons Theme Tema ikon - + LXQt Theme Tema za LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts index 61f8854..0bc7384 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -149,32 +149,32 @@ QObject - + LXQt Appearance Configuration Automatsko suspendovanje - + Widget Style - + Icons Theme - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts index c5b53da..09800d1 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -160,32 +160,32 @@ QObject - + LXQt Appearance Configuration Подешавање изгледа Рејзора - + Widget Style - + Icons Theme Тема икона - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts index 2380448..f43e97a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts @@ -139,7 +139,7 @@ - LxQtThemeConfig + LXQtThemeConfig LXQt Theme @@ -160,32 +160,32 @@ QObject - + LXQt Appearance Configuration Подешавање изгледа Рејзора - + Widget Style - + Icons Theme Тема икона - + LXQt Theme - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts index 0b94589..d0a5a7f 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - ชุดตกแต่ง LXQt - - - - LxQtThemeConfig LXQt Theme - ชุดตกแต่ง LXQt + ชุดตกแต่ง LXQt QObject - + LXQt Appearance Configuration ปรับแต่งรูปโฉม LXQt - + Widget Style - + Icons Theme ชุดตกแต่งไอคอน - + LXQt Theme ชุดตกแต่ง LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts index b6ba861..d5a9418 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt Teması - - - - LxQtThemeConfig LXQt Theme - LXQt Teması + LXQt Teması QObject - + LXQt Appearance Configuration LXQt Görünüm Ayarları - + Widget Style - + Icons Theme Simge Teması - + LXQt Theme LXQt Teması - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts index 116e064..fc4880a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - Тема LXQt - - - - LxQtThemeConfig LXQt Theme - Тема LXQt + Тема LXQt QObject - + LXQt Appearance Configuration Налаштування вигляду LXQt - + Widget Style - + Icons Theme Тема значків - + LXQt Theme Тема LXQt - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts index f0b01e9..68272fc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt 主题 - - - - LxQtThemeConfig LXQt Theme - LXQt 主题 + LXQt 主题 QObject - + LXQt Appearance Configuration LXQt 外观配置 - + Widget Style - + Icons Theme 图标主题 - + LXQt Theme LXQt 主题 - + Font - + Cursor diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts index 3b02a7b..a685000 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts @@ -140,48 +140,41 @@ LXQtThemeConfig - - LXQt Theme - LXQt主題 - - - - LxQtThemeConfig LXQt Theme - LXQt主題 + LXQt主題 QObject - + LXQt Appearance Configuration LXQt自訂外觀 - + Widget Style - + Icons Theme 圖示主題 - + LXQt Theme LXQt主題 - + Font - + Cursor diff --git a/lxqt-config-file-associations/lxqt-config-file-associations.desktop.in b/lxqt-config-file-associations/lxqt-config-file-associations.desktop.in index ca8ecd0..f686f7a 100644 --- a/lxqt-config-file-associations/lxqt-config-file-associations.desktop.in +++ b/lxqt-config-file-associations/lxqt-config-file-associations.desktop.in @@ -6,6 +6,6 @@ Comment=Configure applications associated with known file types Exec=lxqt-config-file-associations Icon=preferences-desktop-filetype-association Categories=Settings;DesktopSettings;Qt;LXQt; -OnlyShowIn=LXDE;LXQt; +OnlyShowIn=LXQt; #TRANSLATIONS_DIR=translations diff --git a/lxqt-config-file-associations/main.cpp b/lxqt-config-file-associations/main.cpp index 9c2bfed..05e5b26 100644 --- a/lxqt-config-file-associations/main.cpp +++ b/lxqt-config-file-associations/main.cpp @@ -40,7 +40,7 @@ int main (int argc, char **argv) { - LxQt::SingleApplication app(argc, argv); + LXQt::SingleApplication app(argc, argv); MimetypeViewer mimetypeViewer; app.setActivationWindow(&mimetypeViewer); diff --git a/lxqt-config-file-associations/mimetypeitemmodel.cpp b/lxqt-config-file-associations/mimetypeitemmodel.cpp index 5fc7e5c..b79d2bf 100644 --- a/lxqt-config-file-associations/mimetypeitemmodel.cpp +++ b/lxqt-config-file-associations/mimetypeitemmodel.cpp @@ -1,9 +1,12 @@ /* - * File: MimetypeItemModel.cpp - * Author: christian - * - * Created on 5. maj 2013, 09:18 - */ +* Copyright (c) Christian Surlykke +* +* This file is part of the LXQt project. +* It is distributed under the LGPL 2.1 or later license. +* Please refer to the LICENSE file for a copy of the license, and +* the AUTHORS file for copyright and authorship information. +*/ + #include #include diff --git a/lxqt-config-file-associations/mimetypeitemmodel.h b/lxqt-config-file-associations/mimetypeitemmodel.h index d8d02be..5155aa7 100644 --- a/lxqt-config-file-associations/mimetypeitemmodel.h +++ b/lxqt-config-file-associations/mimetypeitemmodel.h @@ -1,9 +1,11 @@ /* - * File: MimetypeItemModel.h - * Author: christian - * - * Created on 5. maj 2013, 09:18 - */ +* Copyright (c) Christian Surlykke +* +* This file is part of the LXQt project. +* It is distributed under the LGPL 2.1 or later license. +* Please refer to the LICENSE file for a copy of the license, and +* the AUTHORS file for copyright and authorship information. +*/ #ifndef MIMETYPEITEMMODEL_H #define MIMETYPEITEMMODEL_H diff --git a/lxqt-config-file-associations/mimetypeviewer.cpp b/lxqt-config-file-associations/mimetypeviewer.cpp index 4a7bac0..062520f 100644 --- a/lxqt-config-file-associations/mimetypeviewer.cpp +++ b/lxqt-config-file-associations/mimetypeviewer.cpp @@ -110,7 +110,7 @@ MimetypeViewer::MimetypeViewer(QWidget *parent) QString mimeappsListPath(XdgDirs::dataHome(true) + "/applications/mimeapps.list"); mDefaultsList = new QSettings(mimeappsListPath, XdgDesktopFileCache::desktopFileSettingsFormat(), this); - mSettingsCache = new LxQt::SettingsCache(mDefaultsList); + mSettingsCache = new LXQt::SettingsCache(mDefaultsList); mSettingsCache->loadFromSettings(); initializeMimetypeTreeView(); loadAllMimeTypes(); @@ -217,7 +217,6 @@ void MimetypeViewer::filter(const QString& pattern) { QMimeDatabase db; MimeTypeData mimeData; - const int count = widget.mimetypeTreeWidget->topLevelItemCount(); for (int i = 0; i < widget.mimetypeTreeWidget->topLevelItemCount(); ++i) { widget.mimetypeTreeWidget->topLevelItem(i)->setHidden(true); diff --git a/lxqt-config-file-associations/mimetypeviewer.h b/lxqt-config-file-associations/mimetypeviewer.h index 7474f2f..eb7aab4 100644 --- a/lxqt-config-file-associations/mimetypeviewer.h +++ b/lxqt-config-file-associations/mimetypeviewer.h @@ -37,7 +37,7 @@ class QSettings; -namespace LxQt { +namespace LXQt { class SettingsCache; } @@ -59,7 +59,7 @@ private: void loadAllMimeTypes(); XdgMimeType m_CurrentMime; QSettings* mDefaultsList; - LxQt::SettingsCache *mSettingsCache; + LXQt::SettingsCache *mSettingsCache; Ui::mimetypeviewer widget; QStringList mediaTypes; QList mItemList; diff --git a/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.desktop b/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.desktop new file mode 100644 index 0000000..4953479 --- /dev/null +++ b/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.desktop @@ -0,0 +1,4 @@ +# Translations +Name[el]=Συσχετίσεις αρχείων +GenericName[el]=Ρυθμίσεις των συσχετίσεων αρχείων +Comment[el]=Διαμόρφωση της συσχέτισης των εφαρμογών με γνωστούς τύπους αρχείων diff --git a/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.ts b/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.ts new file mode 100644 index 0000000..a90712a --- /dev/null +++ b/lxqt-config-file-associations/translations/lxqt-config-file-associations_el.ts @@ -0,0 +1,123 @@ + + + + + ApplicationChooser + + + ApplicationChooser + Επιλογέας εφαρμογής + + + + Pick an application for: + Επιλέξτε μια εφαρμογή για: + + + + 1 + 1 + + + + Applications that handle JPEG + Εφαρμογές που διαχειρίζονται αρχεία JPEG + + + + + + + New Subitem + Νέο υποαντικείμενο + + + + + Other applications + Άλλες εφαρμογές + + + + Applications that handle %1 + Εφαρμογές που διαχειρίζονται %1 + + + + No applications found + Δεν βρέθηκε εφαρμογή + + + + MimetypeViewer + + + + None + Καμία + + + + &Change... + &Αλλαγή... + + + + &Choose... + &Επιλογή... + + + + mimetypeviewer + + + File Associations + Συσχετίσεις αρχείων + + + + Default application + Εξ ορισμού εφαρμογή + + + + &Choose... + &Επιλογή... + + + + TextLabel + Ετικέτα + + + + None + Καμία + + + + Patterns + Σχηματομορφές + + + + *.txt *.xml + *.txt *.xml + + + + MIME type + Τύπος MIME + + + + Icon + Εικονίδιο + + + + Description + Περιγραφή + + + diff --git a/lxqt-config-file-associations/translations/lxqt-config-file-associations_it.desktop b/lxqt-config-file-associations/translations/lxqt-config-file-associations_it.desktop new file mode 100644 index 0000000..cc52e20 --- /dev/null +++ b/lxqt-config-file-associations/translations/lxqt-config-file-associations_it.desktop @@ -0,0 +1,4 @@ +# Translations +Name[it]=Associazioni file +GenericName[it]=Impostare le associazioni file +Comment[it]=Impostare le associazioni file per le applicazioni installate diff --git a/lxqt-config-input/CMakeLists.txt b/lxqt-config-input/CMakeLists.txt index bf9b063..5c42961 100644 --- a/lxqt-config-input/CMakeLists.txt +++ b/lxqt-config-input/CMakeLists.txt @@ -66,6 +66,11 @@ target_link_libraries(lxqt-config-input lxqt-config-cursor ) +set_target_properties(lxqt-config-input + PROPERTIES + INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${LXQT_CONFIG_PROJECT}" +) + install(TARGETS lxqt-config-input RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" diff --git a/lxqt-config-input/keyboardconfig.cpp b/lxqt-config-input/keyboardconfig.cpp index 66f9879..996d24d 100644 --- a/lxqt-config-input/keyboardconfig.cpp +++ b/lxqt-config-input/keyboardconfig.cpp @@ -35,7 +35,7 @@ extern void qt_x11_apply_settings_in_all_apps(); #endif -KeyboardConfig::KeyboardConfig(LxQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent): +KeyboardConfig::KeyboardConfig(LXQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent): QWidget(parent), settings(_settings), qtSettings(_qtSettings), @@ -44,7 +44,8 @@ KeyboardConfig::KeyboardConfig(LxQt::Settings* _settings, QSettings* _qtSettings interval(30), oldInterval(30), beep(true), - oldBeep(true) { + oldBeep(true), + numlock(false) { ui.setupUi(this); @@ -58,6 +59,7 @@ KeyboardConfig::KeyboardConfig(LxQt::Settings* _settings, QSettings* _qtSettings connect(ui.keyboardInterval, SIGNAL(valueChanged(int)), SLOT(onKeyboardSliderChanged(int))); connect(ui.keyboardBeep, SIGNAL(toggled(bool)), SLOT(onKeyboardBeepToggled(bool))); connect(ui.cursorFlashTime, SIGNAL(valueChanged(int)), SLOT(onCorsorFlashTimeChanged(int))); + connect(ui.keyboardNumLock, SIGNAL(toggled(bool)), SLOT(onKeyboardNumLockToggled(bool))); } KeyboardConfig::~KeyboardConfig() { @@ -68,6 +70,7 @@ void KeyboardConfig::initControls() { ui.keyboardDelay->setValue(delay); ui.keyboardInterval->setValue(interval); ui.keyboardBeep->setChecked(beep); + ui.keyboardNumLock->setChecked(numlock); qtSettings->beginGroup(QLatin1String("Qt")); int value = qtSettings->value(QLatin1String("cursorFlashTime"), 1000).toInt(); @@ -98,6 +101,11 @@ void KeyboardConfig::onKeyboardBeepToggled(bool checked) { accept(); } +void KeyboardConfig::onKeyboardNumLockToggled(bool checked) { + numlock = checked; + accept(); +} + void KeyboardConfig::onCorsorFlashTimeChanged(int value) { qtSettings->beginGroup(QLatin1String("Qt")); @@ -115,6 +123,7 @@ void KeyboardConfig::loadSettings() { oldDelay = delay = settings->value("delay", 500).toInt(); oldInterval = interval = settings->value("interval", 30).toInt(); oldBeep = beep = settings->value("beep", true).toBool(); + numlock = settings->value("numlock", false).toBool(); settings->endGroup(); } @@ -123,6 +132,7 @@ void KeyboardConfig::accept() { settings->setValue("delay", delay); settings->setValue("interval", interval); settings->setValue("beep", beep); + settings->setValue("numlock", numlock); settings->endGroup(); } diff --git a/lxqt-config-input/keyboardconfig.h b/lxqt-config-input/keyboardconfig.h index 857193b..505edc3 100644 --- a/lxqt-config-input/keyboardconfig.h +++ b/lxqt-config-input/keyboardconfig.h @@ -23,7 +23,7 @@ #include #include "ui_keyboardconfig.h" -namespace LxQt { +namespace LXQt { class Settings; } class QSettings; @@ -32,7 +32,7 @@ class KeyboardConfig : public QWidget { Q_OBJECT public: - KeyboardConfig(LxQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent = 0); + KeyboardConfig(LXQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent = 0); virtual ~KeyboardConfig(); void accept(); @@ -49,10 +49,11 @@ private Q_SLOTS: void onKeyboardSliderChanged(int value); void onKeyboardBeepToggled(bool checked); void onCorsorFlashTimeChanged(int value); + void onKeyboardNumLockToggled(bool checked); private: Ui::KeyboardConfig ui; - LxQt::Settings* settings; + LXQt::Settings* settings; QSettings* qtSettings; int delay; int oldDelay; @@ -60,6 +61,7 @@ private: int oldInterval; bool beep; bool oldBeep; + bool numlock; }; #endif // KEYBOARDCONFIG_H diff --git a/lxqt-config-input/keyboardconfig.ui b/lxqt-config-input/keyboardconfig.ui index c681023..99647f9 100644 --- a/lxqt-config-input/keyboardconfig.ui +++ b/lxqt-config-input/keyboardconfig.ui @@ -7,7 +7,7 @@ 0 0 375 - 232 + 276 @@ -161,6 +161,13 @@ + + + + Turn on NumLock after login + + + diff --git a/lxqt-config-input/keyboardlayoutconfig.cpp b/lxqt-config-input/keyboardlayoutconfig.cpp index 5449b4c..3f9f39b 100644 --- a/lxqt-config-input/keyboardlayoutconfig.cpp +++ b/lxqt-config-input/keyboardlayoutconfig.cpp @@ -26,7 +26,7 @@ #include "selectkeyboardlayoutdialog.h" #include -KeyboardLayoutConfig::KeyboardLayoutConfig(LxQt::Settings* _settings, QWidget* parent): +KeyboardLayoutConfig::KeyboardLayoutConfig(LXQt::Settings* _settings, QWidget* parent): QWidget(parent), settings(_settings) { ui.setupUi(this); diff --git a/lxqt-config-input/keyboardlayoutconfig.h b/lxqt-config-input/keyboardlayoutconfig.h index 36e40b5..40642e0 100644 --- a/lxqt-config-input/keyboardlayoutconfig.h +++ b/lxqt-config-input/keyboardlayoutconfig.h @@ -26,14 +26,14 @@ #include #include "ui_keyboardlayoutconfig.h" -namespace LxQt { +namespace LXQt { class Settings; } class KeyboardLayoutConfig : public QWidget { Q_OBJECT public: - KeyboardLayoutConfig(LxQt::Settings* _settings, QWidget* parent = 0); + KeyboardLayoutConfig(LXQt::Settings* _settings, QWidget* parent = 0); virtual ~KeyboardLayoutConfig(); public Q_SLOTS: @@ -57,7 +57,7 @@ private: QStringList currentOptions_; QList > currentLayouts_; QMap knownLayouts_; - LxQt::Settings* settings; + LXQt::Settings* settings; }; #endif // KEYBOARDLAYOUTCONFIG_H diff --git a/lxqt-config-input/lxqt-config-input.cpp b/lxqt-config-input/lxqt-config-input.cpp index 3a899de..d10e980 100644 --- a/lxqt-config-input/lxqt-config-input.cpp +++ b/lxqt-config-input/lxqt-config-input.cpp @@ -25,16 +25,16 @@ #include "keyboardlayoutconfig.h" int main(int argc, char** argv) { - LxQt::SingleApplication app(argc, argv); + LXQt::SingleApplication app(argc, argv); QByteArray configName = qgetenv("LXQT_SESSION_CONFIG"); if(configName.isEmpty()) configName = "session"; - LxQt::Settings settings(configName); - LxQt::ConfigDialog dlg(QObject::tr("Keyboard and Mouse Settings"), &settings); + LXQt::Settings settings(configName); + LXQt::ConfigDialog dlg(QObject::tr("Keyboard and Mouse Settings"), &settings); app.setActivationWindow(&dlg); - LxQt::Settings qtSettings("lxqt"); + LXQt::Settings qtSettings("lxqt"); MouseConfig* mouseConfig = new MouseConfig(&settings, &qtSettings, &dlg); dlg.addPage(mouseConfig, QObject::tr("Mouse"), "input-mouse"); QObject::connect(&dlg, SIGNAL(reset()), mouseConfig, SLOT(reset())); diff --git a/lxqt-config-input/lxqt-config-input.desktop.in b/lxqt-config-input/lxqt-config-input.desktop.in index 52f19f6..b1088b9 100644 --- a/lxqt-config-input/lxqt-config-input.desktop.in +++ b/lxqt-config-input/lxqt-config-input.desktop.in @@ -6,6 +6,6 @@ Comment=Configure keyboard, mouse, and other input devices Exec=lxqt-config-input Icon=input-keyboard Categories=Qt;Settings;HardwareSettings;DesktopSettings;LXQt; -OnlyShowIn=LXDE;LXQt; +OnlyShowIn=LXQt; #TRANSLATIONS_DIR=translations diff --git a/lxqt-config-input/lxqt-config-input.h b/lxqt-config-input/lxqt-config-input.h index a34befc..1f9e0e3 100644 --- a/lxqt-config-input/lxqt-config-input.h +++ b/lxqt-config-input/lxqt-config-input.h @@ -1,3 +1,12 @@ +/* +* Copyright (c) LXQt contributors. +* +* This file is part of the LXQt project. +* It is distributed under the LGPL 2.1 or later license. +* Please refer to the LICENSE file for a copy of the license, and +* the AUTHORS file for copyright and authorship information. +*/ + #ifndef LXQT_CONFIG_INPUT_H #define LXQT_CONFIG_INPUT_H diff --git a/lxqt-config-input/mouseconfig.cpp b/lxqt-config-input/mouseconfig.cpp index fdb3906..0db04a5 100644 --- a/lxqt-config-input/mouseconfig.cpp +++ b/lxqt-config-input/mouseconfig.cpp @@ -36,7 +36,7 @@ extern void qt_x11_apply_settings_in_all_apps(); #endif -MouseConfig::MouseConfig(LxQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent): +MouseConfig::MouseConfig(LXQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent): QWidget(parent), settings(_settings), qtSettings(_qtSettings), @@ -87,7 +87,6 @@ void MouseConfig::initControls() { void MouseConfig::onMouseAccelChanged(int value) { - QSlider* slider = static_cast(sender()); accel = value; XChangePointerControl(QX11Info::display(), True, False, accel, 10, 0); @@ -95,7 +94,6 @@ void MouseConfig::onMouseAccelChanged(int value) { } void MouseConfig::onMouseThresholdChanged(int value) { - QSlider* slider = static_cast(sender()); /* threshold = 110 - sensitivity. The lower the threshold, the higher the sensitivity */ threshold = 110 - value; XChangePointerControl(QX11Info::display(), False, True, @@ -175,8 +173,8 @@ void MouseConfig::loadSettings() { oldSingleClick = singleClick = qtSettings->value("single_click_activate", false).toBool(); settings->beginGroup("Mouse"); - oldAccel = accel = settings->value("acc_factor", 20).toInt(); - oldThreshold = threshold = settings->value("acc_threshold", 10).toInt(); + oldAccel = accel = settings->value("accel_factor", 20).toInt(); + oldThreshold = threshold = settings->value("accel_threshold", 10).toInt(); oldLeftHanded = leftHanded = settings->value("left_handed", false).toBool(); settings->endGroup(); } @@ -185,8 +183,8 @@ void MouseConfig::accept() { qtSettings->setValue("single_click_activate", singleClick); settings->beginGroup("Mouse"); - settings->setValue("acc_factor", accel); - settings->setValue("acc_threshold", threshold); + settings->setValue("accel_factor", accel); + settings->setValue("accel_threshold", threshold); settings->setValue("left_handed", leftHanded); settings->endGroup(); } diff --git a/lxqt-config-input/mouseconfig.h b/lxqt-config-input/mouseconfig.h index 3a998f1..d11ec9d 100644 --- a/lxqt-config-input/mouseconfig.h +++ b/lxqt-config-input/mouseconfig.h @@ -23,7 +23,7 @@ #include #include "ui_mouseconfig.h" -namespace LxQt { +namespace LXQt { class Settings; } class QSettings; @@ -32,7 +32,7 @@ class MouseConfig : public QWidget { Q_OBJECT public: - MouseConfig(LxQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent); + MouseConfig(LXQt::Settings* _settings, QSettings* _qtSettings, QWidget* parent); virtual ~MouseConfig(); void accept(); @@ -54,7 +54,7 @@ private Q_SLOTS: private: Ui::MouseConfig ui; - LxQt::Settings* settings; + LXQt::Settings* settings; QSettings* qtSettings; int accel; int oldAccel; diff --git a/lxqt-config-input/translations/lxqt-config-input.ts b/lxqt-config-input/translations/lxqt-config-input.ts index bda8e29..39ed269 100644 --- a/lxqt-config-input/translations/lxqt-config-input.ts +++ b/lxqt-config-input/translations/lxqt-config-input.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_af.ts b/lxqt-config-input/translations/lxqt-config-input_af.ts index ec68908..ac74948 100644 --- a/lxqt-config-input/translations/lxqt-config-input_af.ts +++ b/lxqt-config-input/translations/lxqt-config-input_af.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_ar.ts b/lxqt-config-input/translations/lxqt-config-input_ar.ts index 16e3cf7..d264db2 100644 --- a/lxqt-config-input/translations/lxqt-config-input_ar.ts +++ b/lxqt-config-input/translations/lxqt-config-input_ar.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_bg.ts b/lxqt-config-input/translations/lxqt-config-input_bg.ts index a2d0bd3..d4351ae 100644 --- a/lxqt-config-input/translations/lxqt-config-input_bg.ts +++ b/lxqt-config-input/translations/lxqt-config-input_bg.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_bn.ts b/lxqt-config-input/translations/lxqt-config-input_bn.ts index 09617e7..eb38981 100644 --- a/lxqt-config-input/translations/lxqt-config-input_bn.ts +++ b/lxqt-config-input/translations/lxqt-config-input_bn.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_bn_IN.ts b/lxqt-config-input/translations/lxqt-config-input_bn_IN.ts index b2571d8..5f7e60c 100644 --- a/lxqt-config-input/translations/lxqt-config-input_bn_IN.ts +++ b/lxqt-config-input/translations/lxqt-config-input_bn_IN.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_ca.ts b/lxqt-config-input/translations/lxqt-config-input_ca.ts index ac0d9ac..431b70e 100644 --- a/lxqt-config-input/translations/lxqt-config-input_ca.ts +++ b/lxqt-config-input/translations/lxqt-config-input_ca.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_cs.ts b/lxqt-config-input/translations/lxqt-config-input_cs.ts index 50e5590..7b52098 100644 --- a/lxqt-config-input/translations/lxqt-config-input_cs.ts +++ b/lxqt-config-input/translations/lxqt-config-input_cs.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_da.ts b/lxqt-config-input/translations/lxqt-config-input_da.ts index 24023a7..c2ca1f8 100644 --- a/lxqt-config-input/translations/lxqt-config-input_da.ts +++ b/lxqt-config-input/translations/lxqt-config-input_da.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_de.ts b/lxqt-config-input/translations/lxqt-config-input_de.ts index 0a0f767..1214980 100644 --- a/lxqt-config-input/translations/lxqt-config-input_de.ts +++ b/lxqt-config-input/translations/lxqt-config-input_de.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_el.desktop b/lxqt-config-input/translations/lxqt-config-input_el.desktop new file mode 100644 index 0000000..addfbad --- /dev/null +++ b/lxqt-config-input/translations/lxqt-config-input_el.desktop @@ -0,0 +1,4 @@ +#Translations +Name[el]=Πληκτρολόγιο και ποντίκι +GenericName[el]=Ρυθμίσεις εισαγωγής +Comment[el]=Διαμόρφωση του πληκτρολογίου, του ποντικιού, και άλλων συσκευών εισαγωγής diff --git a/lxqt-config-input/translations/lxqt-config-input_el.ts b/lxqt-config-input/translations/lxqt-config-input_el.ts new file mode 100644 index 0000000..06b0d1c --- /dev/null +++ b/lxqt-config-input/translations/lxqt-config-input_el.ts @@ -0,0 +1,258 @@ + + + + + KeyboardConfig + + + Form + Παράθυρο διαλόγου + + + + Cursor flash time: + Χρόνος αναβοσβήματος δρομέα: + + + + <b>Keyboard</b> + <b>Πληκτρολόγιο</b> + + + + Beep when there is an error of keyboard input + Προειδοποιητικός ήχος αν υπάρχει σφάλμα στην είσοδο πληκτρολογίου + + + + ms + ms + + + + Character Repeat + Επανάληψη χαρακτήρα + + + + + Long + Μακρύ + + + + Repeat delay: + Καθυστέρηση επανάληψης: + + + + + Short + Βραχύ + + + + Repeat interval: + Χρονικό διάστημα επανάληψης: + + + + Type in the following box to test your keyboard settings + Πληκτρολογήστε στο παρακάτω πλαίσιο για να δοκιμάσετε τις ρυθμίσεις του πληκτρολογίου + + + + + 0 + 0 + + + + Turn on NumLock after login + + + + + KeyboardLayoutConfig + + + <b>Keyboard Layout</b> + <b>Διάταξη πληκτρολογίου</b> + + + + Layout + Διάταξη + + + + Variant + Παραλλαγή + + + + &Add + &Προσθήκη + + + + &Remove + Α&φαίρεση + + + + up + πάνω + + + + down + κάτω + + + + Keyboard model: + Μοντέλο πληκτρολογίου: + + + + Keys to change layout: + Πλήκτρα αλλαγής της διάταξης: + + + + None + Κανένα + + + + <html><head/><body><p><span style=" font-weight:600;">Note</span>: If you are using an <span style=" font-weight:600;">input method</span>, such as IBus, uim, fcitx, or gcin, the settings here <span style=" font-weight:600;">might not work</span> because they are overridden by the input methods.</p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Σημείωση</span>: Αν χρησιμοποιείτε μια <span style=" font-weight:600;">μέθοδο εισαγωγής</span>, όπως IBus, uim, fcitx, ή gcin, οι παρούσες ρυθμίσεις ίσως να <span style=" font-weight:600;">μην λειτουργούν</span> ένεκα της αντικατάστασής τους από τις μεθόδους εισαγωγής.</p></body></html> + + + + MouseConfig + + + Form + Παράθυρο διαλόγου + + + + <b>Mouse</b> + <b>Ποντίκι</b> + + + + Motion + Κίνηση + + + + High + Υψηλό + + + + Fast + Γρήγορο + + + + Sensitivity: + Ευαισθησία: + + + + Low + Χαμηλό + + + + Acceleration: + Επιτάχυνση: + + + + Slow + Αργό + + + + + 0 + 0 + + + + Double click interval: + Χρονικό διάστημα διπλού κλικ: + + + + ms + ms + + + + Wheel scroll lines: + Γραμμές κύλισης τροχού: + + + + Left handed (Swap left and right mouse buttons) + Αριστερόχειρας (Εναλλαγή του δεξιού και αριστερού κουμπιού) + + + + Single click to activate items + Ενεργοποίηση των αντικειμένων με μονό κλικ + + + + QObject + + + Keyboard and Mouse Settings + Ρυθμίσεις πληκτρολογίου και ποντικιού + + + + Mouse + Ποντίκι + + + + Cursor + Δρομέας + + + + Keyboard + Πληκτρολόγιο + + + + Keyboard Layout + Διάταξη πληκτρολογίου + + + + SelectKeyboardLayoutDialog + + + Select a keyboard layout + Επιλέξτε μια διάταξη πληκτρολογίου + + + + Keyboard layout + Διάταξη πληκτρολογίου + + + + Variant + Παραλλαγή + + + diff --git a/lxqt-config-input/translations/lxqt-config-input_es.ts b/lxqt-config-input/translations/lxqt-config-input_es.ts index 4451382..ec98896 100644 --- a/lxqt-config-input/translations/lxqt-config-input_es.ts +++ b/lxqt-config-input/translations/lxqt-config-input_es.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_eu.ts b/lxqt-config-input/translations/lxqt-config-input_eu.ts index 5576c3f..ade7da1 100644 --- a/lxqt-config-input/translations/lxqt-config-input_eu.ts +++ b/lxqt-config-input/translations/lxqt-config-input_eu.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_fi.ts b/lxqt-config-input/translations/lxqt-config-input_fi.ts index 315f447..f13541f 100644 --- a/lxqt-config-input/translations/lxqt-config-input_fi.ts +++ b/lxqt-config-input/translations/lxqt-config-input_fi.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_fr.ts b/lxqt-config-input/translations/lxqt-config-input_fr.ts index c408867..c8c8f9b 100644 --- a/lxqt-config-input/translations/lxqt-config-input_fr.ts +++ b/lxqt-config-input/translations/lxqt-config-input_fr.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_gl.ts b/lxqt-config-input/translations/lxqt-config-input_gl.ts index b4d6ba8..2beab8e 100644 --- a/lxqt-config-input/translations/lxqt-config-input_gl.ts +++ b/lxqt-config-input/translations/lxqt-config-input_gl.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_hr.ts b/lxqt-config-input/translations/lxqt-config-input_hr.ts index b78fc03..e91824f 100644 --- a/lxqt-config-input/translations/lxqt-config-input_hr.ts +++ b/lxqt-config-input/translations/lxqt-config-input_hr.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_hu.ts b/lxqt-config-input/translations/lxqt-config-input_hu.ts index 1619984..d00fbc9 100644 --- a/lxqt-config-input/translations/lxqt-config-input_hu.ts +++ b/lxqt-config-input/translations/lxqt-config-input_hu.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_id.ts b/lxqt-config-input/translations/lxqt-config-input_id.ts index b5ee78b..172bd47 100644 --- a/lxqt-config-input/translations/lxqt-config-input_id.ts +++ b/lxqt-config-input/translations/lxqt-config-input_id.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_is.ts b/lxqt-config-input/translations/lxqt-config-input_is.ts index 18808fa..4af639e 100644 --- a/lxqt-config-input/translations/lxqt-config-input_is.ts +++ b/lxqt-config-input/translations/lxqt-config-input_is.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_it.desktop b/lxqt-config-input/translations/lxqt-config-input_it.desktop new file mode 100644 index 0000000..f13522d --- /dev/null +++ b/lxqt-config-input/translations/lxqt-config-input_it.desktop @@ -0,0 +1,6 @@ +# Translations +Name[it]=Tastiera e mouse +GenericName[it]=Configurazione dei dispositivi di immissione +Comment[it]=Configura tastiera, mouse e altri dispositivi di immissione + + diff --git a/lxqt-config-input/translations/lxqt-config-input_it.ts b/lxqt-config-input/translations/lxqt-config-input_it.ts index 689ee66..1f4418d 100644 --- a/lxqt-config-input/translations/lxqt-config-input_it.ts +++ b/lxqt-config-input/translations/lxqt-config-input_it.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_ja.ts b/lxqt-config-input/translations/lxqt-config-input_ja.ts index 481051d..18d41fd 100644 --- a/lxqt-config-input/translations/lxqt-config-input_ja.ts +++ b/lxqt-config-input/translations/lxqt-config-input_ja.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_nl.ts b/lxqt-config-input/translations/lxqt-config-input_nl.ts index e2fe793..ce3e93a 100644 --- a/lxqt-config-input/translations/lxqt-config-input_nl.ts +++ b/lxqt-config-input/translations/lxqt-config-input_nl.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_pa.ts b/lxqt-config-input/translations/lxqt-config-input_pa.ts index 46e7075..7d6df7b 100644 --- a/lxqt-config-input/translations/lxqt-config-input_pa.ts +++ b/lxqt-config-input/translations/lxqt-config-input_pa.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_pl.ts b/lxqt-config-input/translations/lxqt-config-input_pl.ts index e4aaf34..5723ad3 100644 --- a/lxqt-config-input/translations/lxqt-config-input_pl.ts +++ b/lxqt-config-input/translations/lxqt-config-input_pl.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_pt.ts b/lxqt-config-input/translations/lxqt-config-input_pt.ts index 14b85dd..01ee5d1 100644 --- a/lxqt-config-input/translations/lxqt-config-input_pt.ts +++ b/lxqt-config-input/translations/lxqt-config-input_pt.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_ru.ts b/lxqt-config-input/translations/lxqt-config-input_ru.ts index f1ed4b9..c46f176 100644 --- a/lxqt-config-input/translations/lxqt-config-input_ru.ts +++ b/lxqt-config-input/translations/lxqt-config-input_ru.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_ru_RU.ts b/lxqt-config-input/translations/lxqt-config-input_ru_RU.ts index e2aee1a..1ce7a0e 100644 --- a/lxqt-config-input/translations/lxqt-config-input_ru_RU.ts +++ b/lxqt-config-input/translations/lxqt-config-input_ru_RU.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_sv.ts b/lxqt-config-input/translations/lxqt-config-input_sv.ts index 40e66e7..dc53abc 100644 --- a/lxqt-config-input/translations/lxqt-config-input_sv.ts +++ b/lxqt-config-input/translations/lxqt-config-input_sv.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_uk.ts b/lxqt-config-input/translations/lxqt-config-input_uk.ts index c806938..c8d037e 100644 --- a/lxqt-config-input/translations/lxqt-config-input_uk.ts +++ b/lxqt-config-input/translations/lxqt-config-input_uk.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_zh_CN.ts b/lxqt-config-input/translations/lxqt-config-input_zh_CN.ts index 70097c9..182366b 100644 --- a/lxqt-config-input/translations/lxqt-config-input_zh_CN.ts +++ b/lxqt-config-input/translations/lxqt-config-input_zh_CN.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_zh_HK.ts b/lxqt-config-input/translations/lxqt-config-input_zh_HK.ts index 939b260..504462d 100644 --- a/lxqt-config-input/translations/lxqt-config-input_zh_HK.ts +++ b/lxqt-config-input/translations/lxqt-config-input_zh_HK.ts @@ -66,6 +66,11 @@ 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-input/translations/lxqt-config-input_zh_TW.ts b/lxqt-config-input/translations/lxqt-config-input_zh_TW.ts index e1e193b..9870b93 100644 --- a/lxqt-config-input/translations/lxqt-config-input_zh_TW.ts +++ b/lxqt-config-input/translations/lxqt-config-input_zh_TW.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig diff --git a/lxqt-config-locale/CMakeLists.txt b/lxqt-config-locale/CMakeLists.txt new file mode 100644 index 0000000..0ec12db --- /dev/null +++ b/lxqt-config-locale/CMakeLists.txt @@ -0,0 +1,58 @@ +project(lxqt-config-locale) + +set(H_FILES + localeconfig.h +) + + +set(CPP_FILES + main.cpp + localeconfig.cpp +) + +set(UI_FILES + localeconfig.ui +) + +# Translations ********************************** +lxqt_translate_ts(QM_FILES + UPDATE_TRANSLATIONS + ${UPDATE_TRANSLATIONS} + SOURCES + ${H_FILES} + ${CPP_FILES} + ${UI_FILES} + INSTALL_DIR + "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}" +) + +lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME}) +lxqt_translate_desktop(DESKTOP_FILES SOURCES ${PROJECT_NAME}.desktop.in) + +#************************************************ + +add_executable(${PROJECT_NAME} + ${CPP_FILES} + ${RESOURCES} + ${QRC_SOURCES} + ${QM_FILES} + ${DESKTOP_FILES} + ${QM_LOADER} +) + +target_link_libraries(${PROJECT_NAME} + Qt5::Widgets + Qt5::Xml + lxqt +) + +install(TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime +) +install(FILES + ${DESKTOP_FILES} + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" + COMPONENT Runtime +) diff --git a/lxqt-config-locale/localeconfig.cpp b/lxqt-config-locale/localeconfig.cpp new file mode 100644 index 0000000..69cfd31 --- /dev/null +++ b/lxqt-config-locale/localeconfig.cpp @@ -0,0 +1,452 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)GPL2+ + * + * + * Copyright: 2014 LXQt team + * 2014 Sebastian Kügler + * Authors: + * Julien Lavergne + * Sebastian Kügler + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * END_COMMON_COPYRIGHT_HEADER + * + * Based on plasma-desktop/kcms/formats module + */ + +#include "localeconfig.h" +#include "ui_localeconfig.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +const static QString lcLang = QStringLiteral("LANG"); + +const static QString lcNumeric = QStringLiteral("LC_NUMERIC"); +const static QString lcTime = QStringLiteral("LC_TIME"); +const static QString lcMonetary = QStringLiteral("LC_MONETARY"); +const static QString lcMeasurement = QStringLiteral("LC_MEASUREMENT"); +const static QString lcCollate = QStringLiteral("LC_COLLATE"); +const static QString lcCtype = QStringLiteral("LC_CTYPE"); + +const static QString lcLanguage = QStringLiteral("LANGUAGE"); + +LocaleConfig::LocaleConfig(LXQt::Settings* settings, LXQt::Settings* session_settings, QWidget* parent) : + QWidget(parent), + m_ui(new Ui::LocaleConfig), + hasChanged(new bool), + mSettings(settings), + sSettings(session_settings) + + +{ + m_ui->setupUi(this); + m_combos << m_ui->comboGlobal + << m_ui->comboNumbers + << m_ui->comboTime + << m_ui->comboCurrency + << m_ui->comboMeasurement + << m_ui->comboCollate; + + hasChanged = false; + + initControls(); +} + + +LocaleConfig::~LocaleConfig() +{ + delete m_ui; +} + +bool countryLessThan(const QLocale & c1, const QLocale & c2) +{ + return QString::localeAwareCompare(c1.nativeCountryName(), c2.nativeCountryName()) < 0; +} + +void LocaleConfig::load() +{ + QList allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry); + qSort(allLocales.begin(), allLocales.end(), countryLessThan); + foreach(QComboBox * combo, m_combos) + { + initCombo(combo, allLocales); + } + + readConfig(); + + foreach(QComboBox * combo, m_combos) + { + connectCombo(combo); + } + + connect(m_ui->checkDetailed, &QAbstractButton::toggled, [ = ]() + { + updateExample(); + updateEnabled(); + hasChanged = true; + }); + + updateEnabled(); + updateExample(); + hasChanged = false; +} + +void LocaleConfig::initCombo(QComboBox *combo, const QList & allLocales) +{ + combo->clear(); + const QString clabel = tr("No change"); + combo->setInsertPolicy(QComboBox::InsertAlphabetically); + combo->addItem(clabel, QString()); + foreach(const QLocale & l, allLocales) + { + addLocaleToCombo(combo, l); + } +} + +void LocaleConfig::connectCombo(QComboBox *combo) +{ + connect(combo, &QComboBox::currentTextChanged, [ = ]() + { + hasChanged = true; + updateExample(); + }); +} + +void LocaleConfig::addLocaleToCombo(QComboBox *combo, const QLocale &locale) +{ + const QString clabel = !locale.nativeCountryName().isEmpty() ? locale.nativeCountryName() : locale.countryToString(locale.country()); + // This needs to use name() rather than bcp47name() or later on the export will generate a non-sense locale (e.g. "it" instead of + // "it_IT") + // TODO: Properly handle scripts (@foo) + QString cvalue = locale.name(); + if (!cvalue.contains('.')) + { // explicitely add the encoding, otherwise Qt doesn't accept dead keys and garbles the output as well + cvalue.append(QLatin1Char('.') + QTextCodec::codecForLocale()->name()); + } + + QString flagcode; + const QStringList split = locale.name().split('_'); + if (split.count() > 1) + { + flagcode = split[1].toLower(); + } + /* TODO Find a better place for flags ... */ + QString flag(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/locale/countries/%1/flag.png").arg(flagcode))); + QIcon flagIcon; + if (!flag.isEmpty()) + { + flagIcon = QIcon(flag); + } + + QString itemResult; + itemResult = QString("%1 - %2 (%3)") + .arg(clabel) + .arg(locale.nativeLanguageName()) + .arg(locale.name()); + + combo->addItem(flagIcon, itemResult, cvalue); +} + +void setCombo(QComboBox *combo, const QString &key) +{ + const int ix = combo->findData(key); + if (ix > -1) + { + combo->setCurrentIndex(ix); + } +} + +void LocaleConfig::readConfig() +{ + mSettings->beginGroup("Formats"); + + bool useDetailed = mSettings->value("useDetailed", false).toBool(); + m_ui->checkDetailed->setChecked(useDetailed); + + setCombo(m_ui->comboGlobal, mSettings->value(lcLang, qgetenv(lcLang.toLatin1())).toString()); + + setCombo(m_ui->comboNumbers, mSettings->value(lcNumeric, qgetenv(lcNumeric.toLatin1())).toString()); + setCombo(m_ui->comboTime, mSettings->value(lcTime, qgetenv(lcTime.toLatin1())).toString()); + setCombo(m_ui->comboCollate, mSettings->value(lcCollate, qgetenv(lcCollate.toLatin1())).toString()); + setCombo(m_ui->comboCurrency, mSettings->value(lcMonetary, qgetenv(lcMonetary.toLatin1())).toString()); + setCombo(m_ui->comboMeasurement, mSettings->value(lcMeasurement, qgetenv(lcMeasurement.toLatin1())).toString()); + + updateEnabled(); + + mSettings->endGroup(); +} + +void LocaleConfig::writeConfig() +{ + mSettings->beginGroup("Formats"); + + // global ends up empty here when OK button is clicked from kcmshell5, + // apparently the data in the combo is gone by the time save() is called. + // This might be a problem in KCModule, but does not directly affect us + // since within systemsettings, it works fine. + // See https://bugs.kde.org/show_bug.cgi?id=334624 + if (m_ui->comboGlobal->count() == 0) + { + qWarning() << "Couldn't read data from UI, writing configuration failed."; + return; + } + const QString global = m_ui->comboGlobal->currentData().toString(); + + if (!m_ui->checkDetailed->isChecked()) + { + // Global setting, clean up config + mSettings->remove("useDetailed"); + if (global.isEmpty()) + { + mSettings->remove(lcLang); + } + else + { + mSettings->setValue(lcLang, global); + } + mSettings->remove(lcNumeric); + mSettings->remove(lcTime); + mSettings->remove(lcMonetary); + mSettings->remove(lcMeasurement); + mSettings->remove(lcCollate); + mSettings->remove(lcCtype); + } + else + { + // Save detailed settings + mSettings->setValue("useDetailed", true); + + if (global.isEmpty()) + { + mSettings->remove(lcLang); + } + else + { + mSettings->setValue(lcLang, global); + } + + const QString numeric = m_ui->comboNumbers->currentData().toString(); + if (numeric.isEmpty()) + { + mSettings->remove(lcNumeric); + } + else + { + mSettings->setValue(lcNumeric, numeric); + } + + const QString time = m_ui->comboTime->currentData().toString(); + if (time.isEmpty()) + { + mSettings->remove(lcTime); + } + else + { + mSettings->setValue(lcTime, time); + } + + const QString monetary = m_ui->comboCurrency->currentData().toString(); + if (monetary.isEmpty()) + { + mSettings->remove(lcMonetary); + } + else + { + mSettings->setValue(lcMonetary, monetary); + } + + const QString measurement = m_ui->comboMeasurement->currentData().toString(); + if (measurement.isEmpty()) + { + mSettings->remove(lcMeasurement); + } + else + { + mSettings->setValue(lcMeasurement, measurement); + } + + const QString collate = m_ui->comboCollate->currentData().toString(); + if (collate.isEmpty()) + { + mSettings->remove(lcCollate); + } + else + { + mSettings->setValue(lcCollate, collate); + } + } + mSettings->endGroup(); +} + +void LocaleConfig::saveSettings() +{ + if (hasChanged) + { + QMessageBox msgBox; + msgBox.setWindowTitle(tr("Format Settings Changed")); + msgBox.setText(tr("Save the settings ? (they will take effect the next time you log in)")); + msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Cancel); + + int ret = msgBox.exec(); + if( ret == QMessageBox::Save ) + { + writeConfig(); + writeExports(); + } + } + +} + +void LocaleConfig::writeExports() +{ + sSettings->beginGroup("Environment"); + mSettings->beginGroup("Formats"); + if (!mSettings->value(lcLang).toString().isNull()) + { + sSettings->setValue(lcLang, mSettings->value(lcLang).toString()); + + if (mSettings->value("useDetailed").toBool()) + { + if (!mSettings->value(lcNumeric).toString().isNull()) + { + sSettings->setValue(lcNumeric, mSettings->value(lcNumeric).toString()); + } + if (!mSettings->value(lcTime).toString().isNull()) + { + sSettings->setValue(lcTime, mSettings->value(lcTime).toString()); + } + if (!mSettings->value(lcCollate).toString().isNull()) + { + sSettings->setValue(lcCollate, mSettings->value(lcCollate).toString()); + } + if (!mSettings->value(lcMonetary).toString().isNull()) + { + sSettings->setValue(lcMonetary, mSettings->value(lcMonetary).toString()); + } + if (!mSettings->value(lcMeasurement).toString().isNull()) + { + sSettings->setValue(lcMeasurement, mSettings->value(lcMeasurement).toString()); + } + } + else + { + sSettings->setValue(lcNumeric, mSettings->value(lcLang).toString()); + sSettings->setValue(lcTime, mSettings->value(lcLang).toString()); + sSettings->setValue(lcCollate, mSettings->value(lcLang).toString()); + sSettings->setValue(lcMonetary, mSettings->value(lcLang).toString()); + sSettings->setValue(lcMeasurement, mSettings->value(lcLang).toString()); + } + } + mSettings->endGroup(); + sSettings->endGroup(); + sSettings->sync(); +} + +void LocaleConfig::defaults() +{ + m_ui->checkDetailed->setChecked(false); + + // restore user defaults from env vars + setCombo(m_ui->comboGlobal, qgetenv(lcLang.toLatin1())); + setCombo(m_ui->comboNumbers, qgetenv(lcNumeric.toLatin1())); + setCombo(m_ui->comboTime, qgetenv(lcTime.toLatin1())); + setCombo(m_ui->comboCollate, qgetenv(lcCollate.toLatin1())); + setCombo(m_ui->comboCurrency, qgetenv(lcMonetary.toLatin1())); + setCombo(m_ui->comboMeasurement, qgetenv(lcMeasurement.toLatin1())); + + updateEnabled(); +} + +void LocaleConfig::updateEnabled() +{ + const bool enabled = m_ui->checkDetailed->isChecked(); + + m_ui->labelNumbers->setEnabled(enabled); + m_ui->labelTime->setEnabled(enabled); + m_ui->labelCurrency->setEnabled(enabled); + m_ui->labelMeasurement->setEnabled(enabled); + m_ui->labelCollate->setEnabled(enabled); + m_ui->comboNumbers->setEnabled(enabled); + m_ui->comboTime->setEnabled(enabled); + m_ui->comboCurrency->setEnabled(enabled); + m_ui->comboMeasurement->setEnabled(enabled); + m_ui->comboCollate->setEnabled(enabled); +} + +void LocaleConfig::updateExample() +{ + const bool useDetailed = m_ui->checkDetailed->isChecked(); + + QLocale nloc; + QLocale tloc; + QLocale cloc; + QLocale mloc; + + if (useDetailed) + { + nloc = QLocale(m_ui->comboNumbers->currentData().toString()); + tloc = QLocale(m_ui->comboTime->currentData().toString()); + cloc = QLocale(m_ui->comboCurrency->currentData().toString()); + mloc = QLocale(m_ui->comboMeasurement->currentData().toString()); + } + else + { + nloc = QLocale(m_ui->comboGlobal->currentData().toString()); + tloc = QLocale(m_ui->comboGlobal->currentData().toString()); + cloc = QLocale(m_ui->comboGlobal->currentData().toString()); + mloc = QLocale(m_ui->comboGlobal->currentData().toString()); + } + + const QString numberExample = nloc.toString(1000.01); + const QString timeExample = tloc.toString(QDateTime::currentDateTime()); + const QString currencyExample = cloc.toCurrencyString(24); + + QString measurementSetting; + if (mloc.measurementSystem() == QLocale::ImperialUKSystem) + { + measurementSetting = tr("Imperial UK"); + } + else if (mloc.measurementSystem() == QLocale::ImperialUSSystem) + { + measurementSetting = tr("Imperial US"); + } + else + { + measurementSetting = tr("Metric"); + } + + m_ui->exampleNumbers->setText(numberExample); + m_ui->exampleTime->setText(timeExample); + m_ui->exampleCurrency->setText(currencyExample); + m_ui->exampleMeasurement->setText(measurementSetting); +} + +void LocaleConfig::initControls() +{ + defaults(); + load(); + hasChanged = false; +} diff --git a/lxqt-config-locale/localeconfig.h b/lxqt-config-locale/localeconfig.h new file mode 100644 index 0000000..a25a513 --- /dev/null +++ b/lxqt-config-locale/localeconfig.h @@ -0,0 +1,79 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)GPL2+ + * + * + * Copyright: 2014 LXQt team + * 2014 Sebastian Kügler + * Authors: + * Julien Lavergne + * Sebastian Kügler + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * END_COMMON_COPYRIGHT_HEADER */ + +#ifndef LOCALECONFIG_H +#define LOCALECONFIG_H + +#include +#include + +class QTreeWidgetItem; +class QSettings; + + +namespace Ui { + class LocaleConfig; +} + +class QComboBox; +class QMessageWidget; + +class LocaleConfig : public QWidget +{ + Q_OBJECT + +public: + explicit LocaleConfig(LXQt::Settings *settings, LXQt::Settings *session_settings, QWidget *parent = 0); + ~LocaleConfig(); + + void load(); + void save(); + void defaults(); + +public slots: + void initControls(); + void saveSettings(); + +private: + void addLocaleToCombo(QComboBox *combo, const QLocale &locale); + void initCombo(QComboBox *combo, const QList &allLocales); + void connectCombo(QComboBox *combo); + QList m_combos; + + void readConfig(); + void writeConfig(); + void writeExports(); + + void updateExample(); + void updateEnabled(); + + Ui::LocaleConfig *m_ui; + bool hasChanged; + LXQt::Settings *mSettings; + LXQt::Settings *sSettings; +}; + +#endif // LOCALECONFIG_H diff --git a/lxqt-config-locale/localeconfig.ui b/lxqt-config-locale/localeconfig.ui new file mode 100644 index 0000000..f7aecc3 --- /dev/null +++ b/lxqt-config-locale/localeconfig.ui @@ -0,0 +1,385 @@ + + + Sebastian Kuegler + LocaleConfig + + + + 0 + 0 + 600 + 450 + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 16 + + + + + + + + + + QFormLayout::ExpandingFieldsGrow + + + 6 + + + 6 + + + + + Re&gion: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboGlobal + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + De&tailed Settings + + + + + + + &Numbers: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboNumbers + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + &Time: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboTime + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + Currenc&y: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboCurrency + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + Measurement &Units: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboMeasurement + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + Co&llation and Sorting: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + comboCollate + + + + + + + + 0 + 0 + + + + + 300 + 0 + + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + <b>Examples</b> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Numbers: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Time: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Currency: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Measurement Units: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 16 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 16 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 32 + + + + + + + + + + + + + + + + diff --git a/lxqt-config-locale/lxqt-config-locale.desktop.in b/lxqt-config-locale/lxqt-config-locale.desktop.in new file mode 100644 index 0000000..46cf666 --- /dev/null +++ b/lxqt-config-locale/lxqt-config-locale.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Locale +GenericName=Locale settings +Comment=Locale settings for LXQt +Exec=lxqt-config-locale +Icon=preferences-desktop-locale +Categories=Settings;DesktopSettings;Qt;LXQt; +OnlyShowIn=LXQt; + +#TRANSLATIONS_DIR=translations diff --git a/lxqt-config-locale/main.cpp b/lxqt-config-locale/main.cpp new file mode 100644 index 0000000..e4373be --- /dev/null +++ b/lxqt-config-locale/main.cpp @@ -0,0 +1,53 @@ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)GPL2+ + * + * + * Copyright: 2014 LXQt team + * + * Authors: + * Julien Lavergne + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * END_COMMON_COPYRIGHT_HEADER */ + +#include + +#include +#include +#include +#include "localeconfig.h" + +int main (int argc, char **argv) +{ + LXQt::SingleApplication app(argc, argv); + LXQt::Settings settings("lxqt-config-locale"); + LXQt::Settings session_settings("session"); + LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Locale Configuration"), &settings); + + app.setActivationWindow(dialog); + + LocaleConfig* localePage = new LocaleConfig(&settings, &session_settings, dialog); + dialog->addPage(localePage, QObject::tr("Locale Settings"), QStringList() << "preferences-desktop-locale" << "preferences-desktop"); + QObject::connect(dialog, SIGNAL(reset()), localePage, SLOT(initControls())); + QObject::connect(dialog, SIGNAL(save()), localePage, SLOT(saveSettings())); + + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->setWindowIcon(QIcon::fromTheme("preferences-desktop-locale")); + dialog->show(); + + return app.exec(); +} + diff --git a/lxqt-config-locale/translations/lxqt-config-locale.ts b/lxqt-config-locale/translations/lxqt-config-locale.ts new file mode 100644 index 0000000..af5e4f7 --- /dev/null +++ b/lxqt-config-locale/translations/lxqt-config-locale.ts @@ -0,0 +1,110 @@ + + + + + LocaleConfig + + + Re&gion: + + + + + De&tailed Settings + + + + + &Numbers: + + + + + &Time: + + + + + Currenc&y: + + + + + Measurement &Units: + + + + + Co&llation and Sorting: + + + + + <b>Examples</b> + + + + + Numbers: + + + + + Time: + + + + + Currency: + + + + + Measurement Units: + + + + + No change + + + + + Format Settings Changed + + + + + Save the settings ? (they will take effect the next time you log in) + + + + + Imperial UK + + + + + Imperial US + + + + + Metric + + + + + QObject + + + LXQt Locale Configuration + + + + + Locale Settings + + + + diff --git a/lxqt-config-monitor/CMakeLists.txt b/lxqt-config-monitor/CMakeLists.txt index 9948b63..1eae738 100644 --- a/lxqt-config-monitor/CMakeLists.txt +++ b/lxqt-config-monitor/CMakeLists.txt @@ -1,73 +1,65 @@ project(lxqt-config-monitor) +find_package(KF5Screen REQUIRED) find_package(Qt5Svg REQUIRED) -set(H_FILES - main.h +set(HEADERS monitorsettingsdialog.h monitor.h monitorwidget.h - xrandr.h monitorpicture.h - quickoptions.h - savesettings.h + loadsettings.h + settingsdialog.h ) -set(CPP_FILES +set(SOURCES main.cpp monitorsettingsdialog.cpp - xrandr.cpp monitor.cpp monitorwidget.cpp timeoutdialog.cpp monitorpicture.cpp - quickoptions.cpp - savesettings.cpp + loadsettings.cpp + settingsdialog.cpp ) -set(UI_FILES - mainwindow.ui +set(UIS + monitorsettingsdialog.ui monitorwidget.ui timeoutdialog.ui monitorpicture.ui - quickoptions.ui - savesettings.ui ) -set(ICON_FILES +set(ICONS icons/monitor.svg - icons/extended.svg - icons/monitor1onmonitor2ff.svg - icons/unified.svg - icons/monitor1offmonitor2on.svg ) # Config file -configure_file ( configure.in configure.h ) +configure_file(resources/configure.in configure.h) # Translations ********************************** lxqt_translate_ts(QM_FILES UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS} SOURCES - ${H_FILES} - ${CPP_FILES} - ${UI_FILES} + ${HEADERS} + ${SOURCES} + ${UIS} INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}" ) lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME}) -lxqt_translate_desktop(DESKTOP_FILES SOURCES ${PROJECT_NAME}.desktop.in) +lxqt_translate_desktop(DESKTOP_FILES SOURCES "resources/${PROJECT_NAME}.desktop.in") #************************************************ add_executable(${PROJECT_NAME} - ${CPP_FILES} + ${SOURCES} ${RESOURCES} ${QRC_SOURCES} - ${QM_FILES} ${DESKTOP_FILES} + ${QM_FILES} ${QM_LOADER} ) @@ -75,21 +67,10 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::X11Extras Qt5::Svg + KF5::Screen lxqt ) -install(TARGETS - ${PROJECT_NAME} - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT Runtime -) -install(FILES - ${DESKTOP_FILES} - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" - COMPONENT Runtime -) -install(FILES - ${ICON_FILES} - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/lxqt/icons" - COMPONENT Runtime -) +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) +install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/applications") +install(FILES ${ICON_FILES} DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/lxqt/icons") diff --git a/lxqt-config-monitor/README.md b/lxqt-config-monitor/README.md index d6afe26..7574bf9 100644 --- a/lxqt-config-monitor/README.md +++ b/lxqt-config-monitor/README.md @@ -1,4 +1,4 @@ lxqt-config-monitor =================== -This tool lets you change monitor settings. It is based on lxrandr-qt. +This tool lets you change monitor settings. It was based on lxrandr-qt but now uses libkscreen. diff --git a/lxqt-config-monitor/icons/extended.svg b/lxqt-config-monitor/icons/extended.svg deleted file mode 100644 index ef6b25d..0000000 --- a/lxqt-config-monitor/icons/extended.svg +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MoonBook - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - 2011-09-06T14:48:13 - Aluminum unibody laptop computer with glare screen. - https://openclipart.org/detail/159331/moonbook-laptop-by-dchest - - - dchest - - - - - computer - laptop - mac - macbook - notebook - - - - - - - - - - - diff --git a/lxqt-config-monitor/icons/monitor1offmonitor2on.svg b/lxqt-config-monitor/icons/monitor1offmonitor2on.svg deleted file mode 100644 index 550c797..0000000 --- a/lxqt-config-monitor/icons/monitor1offmonitor2on.svg +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MoonBook - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - 2011-09-06T14:48:13 - Aluminum unibody laptop computer with glare screen. - https://openclipart.org/detail/159331/moonbook-laptop-by-dchest - - - dchest - - - - - computer - laptop - mac - macbook - notebook - - - - - - - - - - - diff --git a/lxqt-config-monitor/icons/monitor1onmonitor2ff.svg b/lxqt-config-monitor/icons/monitor1onmonitor2ff.svg deleted file mode 100644 index 15c5875..0000000 --- a/lxqt-config-monitor/icons/monitor1onmonitor2ff.svg +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MoonBook - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - 2011-09-06T14:48:13 - Aluminum unibody laptop computer with glare screen. - https://openclipart.org/detail/159331/moonbook-laptop-by-dchest - - - dchest - - - - - computer - laptop - mac - macbook - notebook - - - - - - - - - - - diff --git a/lxqt-config-monitor/icons/unified.svg b/lxqt-config-monitor/icons/unified.svg deleted file mode 100644 index 7e41840..0000000 --- a/lxqt-config-monitor/icons/unified.svg +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MoonBook - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - 2011-09-06T14:48:13 - Aluminum unibody laptop computer with glare screen. - https://openclipart.org/detail/159331/moonbook-laptop-by-dchest - - - dchest - - - - - computer - laptop - mac - macbook - notebook - - - - - - - - - - - diff --git a/lxqt-config-monitor/info-for-developers.txt b/lxqt-config-monitor/info-for-developers.txt deleted file mode 100644 index 4a24eba..0000000 --- a/lxqt-config-monitor/info-for-developers.txt +++ /dev/null @@ -1,34 +0,0 @@ -Info for developers -============== - -lxqt-config-monitor has 3 important modules: - -- Monitor (monitor.h and monitor.cpp) -- MonitorSettingsDialog (monitorsettingsdialog.h and monitorsettingsdialog.cpp) -- XRandR (xrandr.h and xrandr.cpp) - -MonitorSettingsDialog module contains all code related to GUI. - -XRandR module contains code related to get or set settings from XRandR X11 driver. XRandR doesn't need MonitorSettingsDialog to work. - -Monitor module is a glue between MonitorSettingsDialog and XRandR. - -Indeep, XRandR module can be replaced and other modules won't need changes. Example, Wayland or Mir can use other tool for monitor settings. Other module can be added to work with that tool. - - -Module XRandR -============ - -Contains an implementation of class Backend. This class has got two methods in order to get or set configs. - -This is only a simple implementation. It reads info from a pipe to a xrandr command. - -Module Monitor -============ - -Contains 4 classes: - -- Backend: Ii is an abstract class. It have to be implemented by monitor drivers. In X11 this driver is XRandR -- MonitorInfo: This class contains all information about one monitor. It is obtained from Backend::getMonitorsInfo method. -- MonitorSettings: This class is used by Backend::setMonitorsSettings method. This class contains settings for one monitor. -- Monitor: This class is used by MonitorSettingsDialog in order to store monitor settings. diff --git a/lxqt-config-monitor/loadsettings.cpp b/lxqt-config-monitor/loadsettings.cpp new file mode 100644 index 0000000..01536e8 --- /dev/null +++ b/lxqt-config-monitor/loadsettings.cpp @@ -0,0 +1,89 @@ +/* + Copyright (C) 2015 P.L. Lucas + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + + + + +#include "loadsettings.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + +LoadSettings::LoadSettings(QObject *parent):QObject(parent) +{ + KScreen::GetConfigOperation *operation = new KScreen::GetConfigOperation(); + connect(operation, &KScreen::GetConfigOperation::finished, [this, operation] (KScreen::ConfigOperation *op) { + KScreen::GetConfigOperation *configOp = qobject_cast(op); + if (configOp) + { + loadConfiguration(configOp->config()); + operation->deleteLater(); + } + }); +} + +void LoadSettings::loadConfiguration(KScreen::ConfigPtr config) +{ + QSettings settings("LXQt", "lxqt-config-monitor"); + QJsonDocument document = QJsonDocument::fromJson( settings.value("currentConfig").toByteArray() ); + QJsonObject json = document.object(); + QJsonArray array = json["outputs"].toArray(); + KScreen::OutputList outputs = config->outputs(); + for (const KScreen::OutputPtr &output : outputs) + { + qDebug() << "Output: " << output->name(); + for(int i=0;iname() ) + { + KScreen::Edid* edid = output->edid(); + if (edid && edid->isValid()) + if( monitorSettings["hash"].toString() != edid->hash() ) + { + qDebug() << "Hash: " << monitorSettings["hash"].toString() << "==" << edid->hash(); + return exit(1); // Saved settings are from other monitor + } + if( monitorSettings["connected"].toBool() != output->isConnected() ) + return exit(2); // Saved settings are from other monitor + if( !output->isConnected() ) + continue; + output->setEnabled( monitorSettings["enabled"].toBool() ); + output->setPrimary( monitorSettings["primary"].toBool() ); + output->setPos( QPoint(monitorSettings["xPos"].toInt(),monitorSettings["yPos"].toInt()) ); + output->setCurrentModeId( monitorSettings["currentMode"].toString() ); + output->setRotation( (KScreen::Output::Rotation)(monitorSettings["rotation"].toInt()) ); + } + } + } + + if (KScreen::Config::canBeApplied(config)) + KScreen::SetConfigOperation(config).exec(); + + exit(0); +} + diff --git a/lxqt-config-monitor/xrandr.h b/lxqt-config-monitor/loadsettings.h similarity index 62% rename from lxqt-config-monitor/xrandr.h rename to lxqt-config-monitor/loadsettings.h index 7861aba..096de8b 100644 --- a/lxqt-config-monitor/xrandr.h +++ b/lxqt-config-monitor/loadsettings.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 P.L. Lucas + Copyright (C) 2015 P.L. Lucas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,21 +16,27 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef _XRANDR_H_ -#define _XRANDR_H_ +#ifndef __LOADSETTINGS_H__ +#define __LOADSETTINGS_H__ -#include "monitor.h" -#include +#include +#include + +class LoadSettings : public QObject +{ + Q_OBJECT -class XRandRBackend: public MonitorSettingsBackend { - Q_OBJECT public: - // Execute xrandr command and read its output - QList getMonitorsInfo(); - // Set changes in xrandr - bool setMonitorsSettings(const QList monitors); - QString getCommand(const QList monitors); + LoadSettings(QObject *parent = 0); + +private Q_SLOTS: + void loadConfiguration(KScreen::ConfigPtr config); + +private: + + // Configutarions + KScreen::ConfigPtr mConfig; }; -#endif \ No newline at end of file +#endif // __LOADSETTINGS_H__ diff --git a/lxqt-config-monitor/main.cpp b/lxqt-config-monitor/main.cpp index db6e656..d8283cb 100644 --- a/lxqt-config-monitor/main.cpp +++ b/lxqt-config-monitor/main.cpp @@ -16,60 +16,56 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - -#include "main.h" #include #include #include #include +#include +#include +#include #include "monitorsettingsdialog.h" -#include "quickoptions.h" -#include "xrandr.h" -#include "savesettings.h" - -int main(int argc, char** argv) { - LxQt::SingleApplication app(argc, argv); +#include +#include "loadsettings.h" - QByteArray configName = qgetenv("LXQT_SESSION_CONFIG"); - if(configName.isEmpty()) - configName = "MonitorSettings"; - LxQt::Settings settings(configName); - LxQt::ConfigDialog dlg(QObject::tr("Monitor Settings"), &settings); - dlg.setButtons(QDialogButtonBox::QDialogButtonBox::Apply|QDialogButtonBox::Close); - app.setActivationWindow(&dlg); - dlg.setWindowIcon(QIcon::fromTheme("preferences-desktop-display")); +static bool loadSettingsOk(int argc, char** argv) +{ + for(int i=0; iconnect(&dlg, SIGNAL(clicked(QDialogButtonBox::StandardButton)), SLOT(processClickedFromDialog(QDialogButtonBox::StandardButton))); - { - QList monitorsInfo = xrandr->getMonitorsInfo(); - // If this is a laptop and there is an external monitor, offer quick options - if(monitorsInfo.length() == 2) { - QuickOptions *quickOptions = new QuickOptions(); - monitorSettingsDialog->connect(quickOptions->ui.useBoth, SIGNAL(clicked(bool)), SLOT(onUseBoth())); - monitorSettingsDialog->connect(quickOptions->ui.externalOnly, SIGNAL(clicked(bool)), SLOT(onExternalOnly())); - monitorSettingsDialog->connect(quickOptions->ui.laptopOnly, SIGNAL(clicked(bool)), SLOT(onLaptopOnly())); - monitorSettingsDialog->connect(quickOptions->ui.extended, SIGNAL(clicked(bool)), SLOT(onExtended())); - dlg.addPage(quickOptions, QObject::tr("Quick Options"), "format-justify-left"); - } - } +int main(int argc, char** argv) +{ + if( loadSettingsOk(argc, argv) ) + { + // If -l option is provided, settings are loaded and app is closed. + QCoreApplication app(argc, argv); + LoadSettings load; + return app.exec(); + } - dlg.addPage(monitorSettingsDialog, QObject::tr("Settings"), "preferences-desktop-display"); + LXQt::SingleApplication app(argc, argv); - SaveSettings *saveSettings = new SaveSettings(&settings); - saveSettings->setHardwareIdentifier(monitorSettingsDialog->getHardwareIdentifier()); - // monitorSettingsDialog->connect(saveSettings->ui.saveSettings, SIGNAL(clicked(bool)), SLOT(saveSettingsSettings())); - monitorSettingsDialog->connect(saveSettings->ui.save, SIGNAL(clicked(bool)), SLOT(saveSettings())); - saveSettings->connect(monitorSettingsDialog, SIGNAL(settingsSaved()), SLOT(loadSettings())); + // Command line options + QCommandLineParser parser; + QCommandLineOption loadOption(QStringList() << "l" << "loadlast", + app.tr("Load last settings.")); + parser.addOption(loadOption); + QCommandLineOption helpOption = parser.addHelpOption(); + parser.addOption(loadOption); + parser.addOption(helpOption); - dlg.addPage(saveSettings, QObject::tr("Save settings"), "system-run"); + //parser.process(app); + //bool loadLastSettings = parser.isSet(loadOption); - QObject::connect(&dlg, SIGNAL(reset()), &dlg, SLOT(accept())); + MonitorSettingsDialog dlg; + app.setActivationWindow(&dlg); + dlg.setWindowIcon(QIcon::fromTheme("preferences-desktop-display")); + dlg.show(); - if(QDialog::Accepted == dlg.exec() ) { - main(argc, argv); - } + return app.exec(); - return 0; } diff --git a/lxqt-config-monitor/mainwindow.ui b/lxqt-config-monitor/mainwindow.ui deleted file mode 100644 index afa434b..0000000 --- a/lxqt-config-monitor/mainwindow.ui +++ /dev/null @@ -1,123 +0,0 @@ - - - MonitorSettingsDialog - - - - 0 - 0 - 527 - 362 - - - - Monitor Settings - - - - - - - - - - - - - - - - - 0 - 1 - - - - Qt::ScrollBarAlwaysOff - - - - - - - - 1 - 1 - - - - - - - - - - - - Unify all monitors - - - - - - - Monitor Position - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Primary monitor: - - - - - - - - - - - - - - - - - - - - - - - monitorList - currentRowChanged(int) - stackedWidget - setCurrentIndex(int) - - - 146 - 146 - - - 394 - 146 - - - - - diff --git a/lxqt-config-monitor/monitor.cpp b/lxqt-config-monitor/monitor.cpp index f8e8a4f..2e4f8e6 100644 --- a/lxqt-config-monitor/monitor.cpp +++ b/lxqt-config-monitor/monitor.cpp @@ -17,55 +17,57 @@ */ #include "monitor.h" -#include bool MonitorInfo::LVDS_Ok = false; -bool MonitorSettingsBackend::isUnified(const QList< MonitorInfo* > monitors) { - Q_FOREACH(MonitorInfo * monitor, monitors) { - if(monitor->position != MonitorSettings::None) - return false; - } - return true; +QSize sizeFromString(QString str) +{ + int width = 0; + int height = 0; + int x = str.indexOf('x'); + if (x > 0) + { + width = str.left(x).toInt(); + height = str.mid(x + 1).toInt(); + } + return QSize(width, height); } -MonitorSettings::MonitorSettings(QObject* parent): QObject(parent) { - position = None; - primaryOk = false; - enabledOk = false; +MonitorSettings::MonitorSettings(QObject* parent) : + QObject(parent) +{ + position = None; + primaryOk = false; + enabledOk = false; } -MonitorInfo::MonitorInfo(QObject* parent): MonitorSettings(parent) { +MonitorInfo::MonitorInfo(QObject* parent) : + MonitorSettings(parent) +{ } -QString MonitorInfo::humanReadableName() { - if(name.startsWith("LVDS")) - return tr("Laptop LCD Monitor"); - else if(name.startsWith("VGA") || name.startsWith("Analog")) - return LVDS_Ok ? tr("External VGA Monitor") : tr("VGA Monitor"); - else if(name.startsWith("DVI") || name.startsWith("TMDS") || name.startsWith("Digital") || name.startsWith("LVDS")) - return LVDS_Ok ? tr("External DVI Monitor") : tr("DVI Monitor"); - else if(name.startsWith("TV") || name.startsWith("S-Video")) - return tr("TV"); - else if(name == "default") - return tr("Default Monitor"); - return name; -} +QString MonitorInfo::humanReadableName() +{ + if (name.startsWith("LVDS")) + return tr("Laptop LCD Monitor"); + else if (name.startsWith("VGA") || name.startsWith("Analog")) + return LVDS_Ok ? tr("External VGA Monitor") : tr("VGA Monitor"); + else if (name.startsWith("DVI") || name.startsWith("TMDS") || name.startsWith("Digital") || name.startsWith("LVDS")) + return LVDS_Ok ? tr("External DVI Monitor") : tr("DVI Monitor"); + else if (name.startsWith("TV") || name.startsWith("S-Video")) + return tr("TV"); + else if (name == "default") + return tr("Default Monitor"); + return name; +} -MonitorMode::MonitorMode(QString modeName, QObject *parent):QObject(parent) { - mode = modeName; - width = -1; - height = -1; +QSize MonitorSettings::currentSize() +{ + return sizeFromString(currentMode); } -QSize sizeFromString(QString str) { - int width = 0; - int height = 0; - int x = str.indexOf('x'); - if(x > 0) { - width = str.left(x).toInt(); - height = str.mid(x + 1).toInt(); - } - return QSize(width, height); +QRect MonitorSettings::geometry() +{ + return QRect(QPoint(xPos, yPos), currentSize()); } diff --git a/lxqt-config-monitor/monitor.h b/lxqt-config-monitor/monitor.h index b5df05b..89acc67 100644 --- a/lxqt-config-monitor/monitor.h +++ b/lxqt-config-monitor/monitor.h @@ -16,7 +16,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - #ifndef _MONITOR_H_ #define _MONITOR_H_ @@ -25,69 +24,51 @@ #include #include #include +#include //Settings to pass to backend -class MonitorSettings: public QObject { - Q_OBJECT -public: - MonitorSettings(QObject* parent = 0); - QString name; - QString currentMode; - QString currentRate; - QString gamma; - QString brightness; - QString backlight; - QString backlightMin; - QString backlightMax; - int xPos; - int yPos; - bool enabledOk; - enum Position {None = 0, Manual}; - Position position; - bool primaryOk; -}; +class MonitorSettings : public QObject +{ + Q_OBJECT -// Monitor mode and suported rates -class MonitorMode: public QObject { - Q_OBJECT public: - MonitorMode(QString modeName, QObject *parent = 0); - QString mode; - QStringList modeLines; - int width; - int height; + MonitorSettings(QObject* parent = 0); + QString name; + QString currentMode; + QString currentRate; + QString gamma; + int xPos; + int yPos; + bool enabledOk; + enum Position {None = 0, Manual}; + Position position; + bool primaryOk; + + QSize currentSize(); + QRect geometry(); }; // Monitor information from backend -class MonitorInfo: public MonitorSettings { - Q_OBJECT -public: - MonitorInfo(QObject* parent = 0); - QStringList modes; // Modes of this monitor in order - QHash monitorModes; // Rates suported by each mode - QString preferredMode; - QString preferredRate; - QString edid; // EDID data, not used yet, can be used to detect vendor name of the monitor - QString vendor; - - static bool LVDS_Ok; // Is true if LVDS (Laptop monitor) is connected. - QString humanReadableName(); -}; - +class MonitorInfo : public MonitorSettings +{ + Q_OBJECT -class MonitorSettingsBackend: public QObject { - Q_OBJECT public: - virtual QList getMonitorsInfo() = 0; - virtual bool setMonitorsSettings(const QList monitors) = 0; - virtual QString getCommand(const QList monitors) = 0; - virtual bool isUnified(const QList monitors); + KScreen::ConfigPtr mConfig; + + MonitorInfo(QObject* parent = 0); + QStringList modes; // Modes of this monitor in order + QHash modeLines; // Rates suported by each mode + QString preferredMode; + QString preferredRate; + QString edid; // EDID data, not used yet, can be used to detect vendor name of the monitor + QString vendor; + + static bool LVDS_Ok; // Is true if LVDS (Laptop monitor) is connected. + QString humanReadableName(); }; - - -/**Gets size from string rate. String rate format is "widthxheight". Example: 800x600*/ +// Gets size from string rate. String rate format is "widthxheight". Example: 800x600 QSize sizeFromString(QString str); - #endif // _MONITOR_H_ diff --git a/lxqt-config-monitor/monitorpicture.cpp b/lxqt-config-monitor/monitorpicture.cpp index f42bdbb..814ff9a 100644 --- a/lxqt-config-monitor/monitorpicture.cpp +++ b/lxqt-config-monitor/monitorpicture.cpp @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2014 P.L. Lucas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include "monitorpicture.h" #include @@ -7,250 +25,361 @@ #include #include "configure.h" - -MonitorPictureDialog::MonitorPictureDialog(QWidget * parent, Qt::WindowFlags f): QDialog(parent,f) { - ui.setupUi(this); +MonitorPictureProxy::MonitorPictureProxy(QObject *parent, MonitorPicture *monitorPicture):QObject(parent) +{ + this->monitorPicture = monitorPicture; } +void MonitorPictureProxy::updateSize() +{ + KScreen::OutputPtr output = monitorPicture->monitorWidget->output; + QSize size = output->currentMode()->size(); + monitorPicture->updateSize(size); +} -void MonitorPictureDialog::setScene(QList monitors) { - int monitorsWidth = 100.0; - int monitorsHeight = 100.0; - QGraphicsScene *scene = new QGraphicsScene(); - Q_FOREACH(MonitorWidget * monitor, monitors) { - MonitorPicture *monitorPicture = new MonitorPicture(NULL, monitor, this); - pictures.append(monitorPicture); - scene->addItem(monitorPicture); - monitorsWidth+=monitorPicture->rect().width(); - monitorsHeight+=monitorPicture->rect().height(); - } - ui.graphicsView->scale(200.0/(float)monitorsWidth,200.0/(float)monitorsHeight); - ui.graphicsView->setScene(scene); +void MonitorPictureProxy::updatePosition() +{ + KScreen::OutputPtr output = monitorPicture->monitorWidget->output; + QPoint pos = output->pos(); + //qDebug() << "MonitorPictureProxy:updatePosition]" << pos; + monitorPicture->setMonitorPosition(pos.x(), pos.y()); } -void MonitorPictureDialog::updateScene() { - ui.graphicsView->scene()->update(); +MonitorPictureDialog::MonitorPictureDialog(KScreen::ConfigPtr config, QWidget * parent, Qt::WindowFlags f) : + QDialog(parent,f) +{ + updatingOk = false; + mConfig = config; + ui.setupUi(this); } -void MonitorPictureDialog::updateMonitorWidgets(QString primaryMonitor) { - int x0, y0; - x0 = y0 =0; - Q_FOREACH(MonitorPicture * picture, pictures) { - if( picture->monitorWidget->monitorInfo->name == primaryMonitor || primaryMonitor=="") { - x0 = picture->monitorWidget->ui.xPosSpinBox->value() + picture->pos().x(); - y0 = picture->monitorWidget->ui.yPosSpinBox->value() + picture->pos().y(); - break; + +void MonitorPictureDialog::setScene(QList monitors) +{ + int monitorsWidth =0; + int monitorsHeight = 0; + QGraphicsScene *scene = new QGraphicsScene(); + for (MonitorWidget *monitor : monitors) + { + MonitorPicture *monitorPicture = new MonitorPicture(nullptr, monitor, this); + pictures.append(monitorPicture); + scene->addItem(monitorPicture); + monitorsWidth += monitorPicture->rect().width(); + monitorsHeight += monitorPicture->rect().height(); + MonitorPictureProxy *proxy = new MonitorPictureProxy(this, monitorPicture); + proxy->connect(monitor->output.data(), SIGNAL(currentModeIdChanged()), SLOT(updateSize())); + proxy->connect(monitor->output.data(), SIGNAL(posChanged()), SLOT(updatePosition())); } - } - Q_FOREACH(MonitorPicture * picture, pictures) { - int x = -x0 + picture->monitorWidget->ui.xPosSpinBox->value(); - int y = -y0 + picture->monitorWidget->ui.yPosSpinBox->value(); - picture->monitorWidget->ui.xPosSpinBox->setValue(x + picture->pos().x()); - picture->monitorWidget->ui.yPosSpinBox->setValue(y + picture->pos().y()); - } + // The blue rectangle is maximum size of virtual screen (framebuffer) + scene->addRect(0, 0, mConfig->screen()->maxSize().width(), mConfig->screen()->maxSize().height(), QPen(Qt::blue, 20))->setOpacity(0.5); + int minWidgetLength = qMin(ui.graphicsView->size().width(), ui.graphicsView->size().width()) / 1.5; + int maxMonitorSize = qMax(monitorsWidth, monitorsHeight); + ui.graphicsView->scale(minWidgetLength / (float) maxMonitorSize, minWidgetLength / (float) maxMonitorSize); + ui.graphicsView->setScene(scene); } +void MonitorPictureDialog::updateScene() +{ + ui.graphicsView->scene()->update(); +} - -MonitorPicture::MonitorPicture(QGraphicsItem * parent, MonitorWidget *monitorWidget, MonitorPictureDialog *monitorPictureDialog):QGraphicsRectItem(parent) +void MonitorPictureDialog::updateMonitorWidgets(QString primaryMonitor) { - this->monitorWidget = monitorWidget; - this->monitorPictureDialog = monitorPictureDialog; - //QString modeName = monitorWidget->ui.resolutionCombo->currentText(); - //int currentSizeWidth = monitorWidget->monitorInfo->monitorModes[modeName]->width; - //int currentSizeHeight = monitorWidget->monitorInfo->monitorModes[modeName]->height; - MonitorMode *monitorModeInfo = monitorWidget->ui.resolutionCombo->currentData().value(); - int currentSizeWidth = monitorModeInfo->width; - int currentSizeHeight = monitorModeInfo->height; - int x = monitorWidget->ui.xPosSpinBox->value(); - int y = monitorWidget->ui.yPosSpinBox->value(); - setAcceptedMouseButtons(Qt::LeftButton); - setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemSendsGeometryChanges); - setRect(x, y, currentSizeWidth, currentSizeHeight); - originX = x; - originY = y; - - - QSvgRenderer *renderer = new QSvgRenderer(QLatin1String(ICON_PATH "monitor.svg")); - svgItem = new QGraphicsSvgItem(); - svgItem->setSharedRenderer(renderer); - svgItem->setX(x); - svgItem->setY(y); - svgItem->setOpacity(0.7); - svgItem->setParentItem(this); - - - textItem = new QGraphicsTextItem(monitorWidget->monitorInfo->name, this); - textItem->setDefaultTextColor(Qt::white); - textItem->setX(x); - textItem->setY(y); - textItem->setParentItem(this); - setPen(QPen(Qt::black, 20)); - - adjustNameSize(); + // This method update spin boxes of position. + // If position is changed when this method is running, position is changed until buffer overflow. + // updatingOk control that this method can not be run twice in the same position change. + + if(updatingOk) + return; + updatingOk = true; + int x0, y0; + x0 = y0 = 0; + + for (MonitorPicture *picture : pictures) + { + if (picture->monitorWidget->output->name() == primaryMonitor + || primaryMonitor == QStringLiteral("")) + { + x0 = picture->originX + picture->pos().x(); + y0 = picture->originY + picture->pos().y(); + break; + } + } + + if( primaryMonitor == QStringLiteral("") ) + { + for(MonitorPicture *picture: pictures) + { + int x1 = picture->originX + picture->pos().x(); + int y1 = picture->originY + picture->pos().y(); + x0 = qMin(x0, x1); + y0 = qMin(y0, y1); + } + } + + for (MonitorPicture *picture : pictures) + { + int x = picture->originX + picture->pos().x() - x0; + int y = picture->originY + picture->pos().y() - y0; + if( x != picture->monitorWidget->ui.xPosSpinBox->value() ) + picture->monitorWidget->ui.xPosSpinBox->setValue(x); + //else + // qDebug() << "x Iguales"; + if( y != picture->monitorWidget->ui.yPosSpinBox->value() ) + picture->monitorWidget->ui.yPosSpinBox->setValue(y); + //else + // qDebug() << "y Iguales"; + //qDebug() << "[MonitorPictureDialog::updateMonitorWidgets]" << x << '=' << picture->monitorWidget->ui.xPosSpinBox->value() << ',' << y << '=' << picture->monitorWidget->ui.yPosSpinBox->value(); + } + updatingOk = false; } +MonitorPicture::MonitorPicture(QGraphicsItem * parent, + MonitorWidget *monitorWidget, + MonitorPictureDialog *monitorPictureDialog) : + QGraphicsRectItem(parent) +{ + this->monitorWidget = monitorWidget; + this->monitorPictureDialog = monitorPictureDialog; + QSize currentSize = sizeFromString(monitorWidget->ui.resolutionCombo->currentText()); + if( monitorWidget->output->rotation() == KScreen::Output::Left || monitorWidget->output->rotation() == KScreen::Output::Right ) + currentSize.transpose(); + int x = monitorWidget->ui.xPosSpinBox->value(); + int y = monitorWidget->ui.yPosSpinBox->value(); + setAcceptedMouseButtons(Qt::LeftButton); + setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemSendsGeometryChanges); + originX = x; + originY = y; + + setRect(x, y, currentSize.width(), currentSize.height()); + // setPen(QPen(Qt::black, 20)); + // textItem = new QGraphicsTextItem(monitorWidget->output->name(), this); + // textItem->setX(x); + // textItem->setY(y); + // textItem->setParentItem(this); + + QSvgRenderer *renderer = new QSvgRenderer(QLatin1String(ICON_PATH "monitor.svg")); + svgItem = new QGraphicsSvgItem(); + svgItem->setSharedRenderer(renderer); + svgItem->setX(x); + svgItem->setY(y); + svgItem->setOpacity(0.7); + svgItem->setParentItem(this); + + + textItem = new QGraphicsTextItem(monitorWidget->output->name(), this); + textItem->setDefaultTextColor(Qt::white); + textItem->setX(x); + textItem->setY(y); + textItem->setParentItem(this); + setPen(QPen(Qt::black, 20)); + + + adjustNameSize(); +} -void MonitorPicture::adjustNameSize() { - prepareGeometryChange(); - qreal fontWidth = QFontMetrics(textItem->font()).width(monitorWidget->monitorInfo->name+" "); - textItem->setScale((qreal)this->rect().width()/fontWidth); - QTransform transform; - qreal width = qAbs(this->rect().width()/svgItem->boundingRect().width()); - qreal height = qAbs(this->rect().height()/svgItem->boundingRect().height()); - transform.scale(width, height); - svgItem->setTransform(transform); +void MonitorPicture::adjustNameSize() +{ + prepareGeometryChange(); + qreal fontWidth = QFontMetrics(textItem->font()).width(monitorWidget->output->name() + QStringLiteral(" ")); + textItem->setScale((qreal) this->rect().width() / fontWidth); + QTransform transform; + qreal width = qAbs(this->rect().width()/svgItem->boundingRect().width()); + qreal height = qAbs(this->rect().height()/svgItem->boundingRect().height()); + qDebug() << "Width x Height" << width << "x" << height; + transform.scale(width, height); + svgItem->setTransform(transform); } +void MonitorPicture::updateSize(QSize currentSize) +{ + QRectF r = rect(); + r.setSize(currentSize); + setRect(r); + adjustNameSize(); +} QVariant MonitorPicture::itemChange(GraphicsItemChange change, const QVariant & value) { - //qDebug() << "[MonitorPicture::itemChange]: "; - //if ( change == ItemPositionChange && scene()) { - // value is the new position. - //QPointF newPos = value.toPointF(); - //qDebug() << "[MonitorPictureDialog::updateMonitorWidgets]: " << newPos.x() << "x" << newPos.y(); - //} - return QGraphicsItem::itemChange(change, value); + //qDebug() << "[MonitorPicture::itemChange]: "; + //if ( change == ItemPositionChange && scene()) { + // value is the new position. + //QPointF newPos = value.toPointF(); + //qDebug() << "[MonitorPictureDialog::updateMonitorWidgets]: " << newPos.x() << "x" << newPos.y(); + //} + QVariant v = QGraphicsItem::itemChange(change, value); + //monitorPictureDialog->updateMonitorWidgets(QString()); + return v; } - void MonitorPicture::setMonitorPosition(int x, int y) { - setPos(x,y); + setX( x - originX ); + setY( y - originY ); } - void MonitorPicture::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) { - QGraphicsRectItem::mouseReleaseEvent(event); - monitorPictureDialog->moveMonitorPictureToNearest(this); + QGraphicsRectItem::mouseReleaseEvent(event); + monitorPictureDialog->moveMonitorPictureToNearest(this); + monitorPictureDialog->updateMonitorWidgets(QString()); } - ////////////////////////////////////////////////////////////////////////////////// // Move picture to nearest picture procedure. // Read magnetic_attraction.html for more info about the algorithm used. ////////////////////////////////////////////////////////////////////////////////// struct Parameters { - float t1, t2; - QVector2D cutPoint; + float t1, t2; + QVector2D cutPoint; }; static Parameters segmentsCut(QVector2D p0, QVector2D p1, QVector2D s0, QVector2D s1) { - Parameters result; - QVector2D v0 = p1 - p0; - QVector2D v1 = s1 - s0; - QVector2D P = s0 - p0; - float det = v0.y()*v1.x() - v0.x()*v1.y(); - if( det == 0.0 ) { - result.t1 = result.t2 = -1.0; - } - result.t1 = 1/det * ( -v1.y()*P.x() + v1.x()*P.y() ); - result.t2 = 1/det * ( -v0.y()*P.x() + v0.x()*P.y() ); - result.cutPoint = v0*result.t1 + p0; - return result; + Parameters result; + QVector2D v0 = p1 - p0; + QVector2D v1 = s1 - s0; + QVector2D P = s0 - p0; + + float det = v0.y() * v1.x() - v0.x() * v1.y(); + if (det == 0.0) + result.t1 = result.t2 = -1.0; + + result.t1 = 1 / det * (-v1.y() * P.x() + v1.x() * P.y()); + result.t2 = 1 / det * (-v0.y() * P.x() + v0.x() * P.y()); + result.cutPoint = v0 * result.t1 + p0; + return result; } static QVector2D computeCenter(MonitorPicture* monitorPicture) { - float x0 = monitorPicture->x() + monitorPicture->originX; - float y0 = monitorPicture->y() + monitorPicture->originY; - float x1 = x0 + monitorPicture->rect().width(); - float y1 = y0 + monitorPicture->rect().height(); - QVector2D p0(x0,y0); - QVector2D p1(x1,y1); - QVector2D center = p0 + (p1-p0)*0.5; - return center; + float x0 = monitorPicture->x() + monitorPicture->originX; + float y0 = monitorPicture->y() + monitorPicture->originY; + float x1 = x0 + monitorPicture->rect().width(); + float y1 = y0 + monitorPicture->rect().height(); + QVector2D p0(x0, y0); + QVector2D p1(x1, y1); + QVector2D center = p0 + (p1 - p0) * 0.5; + return center; } struct Result_moveMonitorPictureToNearest { - bool ok; - QVector2D vector; + bool ok; + QVector2D vector; }; -static Result_moveMonitorPictureToNearest compareTwoMonitors(MonitorPicture* monitorPicture1, MonitorPicture* monitorPicture2) +static Result_moveMonitorPictureToNearest compareTwoMonitors(MonitorPicture* monitorPicture1, + MonitorPicture* monitorPicture2) { - Result_moveMonitorPictureToNearest result; - QVector2D center1 = computeCenter(monitorPicture1); - QVector2D center2 = computeCenter(monitorPicture2); - float x0 = monitorPicture2->x() + monitorPicture2->originX; - float y0 = monitorPicture2->y() + monitorPicture2->originY; - float x1 = x0 + monitorPicture2->rect().width(); - float y1 = y0 + monitorPicture2->rect().height(); - QVector2D p0(x0,y0); - QVector2D p1(x1,y1); - QVector2D P1, P2; - float t1=-1.0, t2=-1.0; - Parameters params = segmentsCut(center1, center2, QVector2D(x0,y0), QVector2D(x1,y0)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t1<0) {t1 = params.t1; P1 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x0,y0), QVector2D(x0,y1)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t1<0) {t1 = params.t1; P1 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x1,y1), QVector2D(x1,y0)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t1<0) {t1 = params.t1; P1 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x1,y1), QVector2D(x0,y1)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t1<0) {t1 = params.t1; P1 = params.cutPoint;} - } - x0 = monitorPicture1->x() + monitorPicture1->originX; - y0 = monitorPicture1->y() + monitorPicture1->originY; - x1 = x0 + monitorPicture1->rect().width(); - y1 = y0 + monitorPicture1->rect().height(); - p0 = QVector2D(x0,y0); - p1 = QVector2D(x1,y1); - params = segmentsCut(center1, center2, QVector2D(x0,y0), QVector2D(x1,y0)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t2<0) {t2 = params.t1; P2 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x0,y0), QVector2D(x0,y1)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t2<0) {t2 = params.t1; P2 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x1,y1), QVector2D(x1,y0)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t2<0) {t2 = params.t1; P2 = params.cutPoint;} - } - params = segmentsCut(center1, center2, QVector2D(x1,y1), QVector2D(x0,y1)); - if(params.t1>=0.0 && params.t1<=1.0 && params.t2>=0.0 && params.t2<=1.0) { - if(t2<0) {t2 = params.t1; P2 = params.cutPoint;} - } - - if(t1>t2) { //Monitor outside - result.vector = P1-P2; - result.ok = false; - } else { - result.ok = true; - } - - return result; + Result_moveMonitorPictureToNearest result; + QVector2D center1 = computeCenter(monitorPicture1); + QVector2D center2 = computeCenter(monitorPicture2); + float x0 = monitorPicture2->x() + monitorPicture2->originX; + float y0 = monitorPicture2->y() + monitorPicture2->originY; + float x1 = x0 + monitorPicture2->rect().width(); + float y1 = y0 + monitorPicture2->rect().height(); + + QVector2D p0(x0, y0); + QVector2D p1(x1, y1); + QVector2D P1, P2; + float t1 = -1.0, t2 = -1.0; + + Parameters params = segmentsCut(center1, center2, QVector2D(x0, y0), QVector2D(x1, y0)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t1 < 0) + { + t1 = params.t1; + P1 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x0, y0), QVector2D(x0, y1)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t1 < 0) + { + t1 = params.t1; + P1 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x1, y1), QVector2D(x1, y0)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t1 < 0) + { + t1 = params.t1; + P1 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x1, y1), QVector2D(x0, y1)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t1 < 0) + { + t1 = params.t1; + P1 = params.cutPoint; + } + + x0 = monitorPicture1->x() + monitorPicture1->originX; + y0 = monitorPicture1->y() + monitorPicture1->originY; + x1 = x0 + monitorPicture1->rect().width(); + y1 = y0 + monitorPicture1->rect().height(); + p0 = QVector2D(x0, y0); + p1 = QVector2D(x1, y1); + + params = segmentsCut(center1, center2, QVector2D(x0, y0), QVector2D(x1, y0)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t2 < 0) + { + t2 = params.t1; + P2 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x0, y0), QVector2D(x0, y1)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t2 < 0) + { + t2 = params.t1; + P2 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x1, y1), QVector2D(x1, y0)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t2 < 0) + { + t2 = params.t1; + P2 = params.cutPoint; + } + + params = segmentsCut(center1, center2, QVector2D(x1, y1), QVector2D(x0, y1)); + if (params.t1 >= 0.0 && params.t1 <= 1.0 && params.t2 >= 0.0 && params.t2 <= 1.0 && t2 < 0) + { + t2 = params.t1; + P2 = params.cutPoint; + } + + // Monitor outside + if (t1 > t2) + { + result.vector = P1 - P2; + result.ok = false; + } else + result.ok = true; + + return result; } void MonitorPictureDialog::moveMonitorPictureToNearest(MonitorPicture* monitorPicture) { - if(!ui.magneticCheckBox->isChecked()) - return; - QVector2D vector(0,0); - foreach(MonitorPicture* picture, pictures) { - if(picture==monitorPicture) continue; - Result_moveMonitorPictureToNearest result = compareTwoMonitors(monitorPicture, picture); - if(result.ok) { - return; - } else { - if(result.vector.length()isChecked()) + return; + + QVector2D vector(0, 0); + for (MonitorPicture *picture : pictures) + { + if (picture == monitorPicture) + continue; + + Result_moveMonitorPictureToNearest result = compareTwoMonitors(monitorPicture, picture); + if (result.ok) + return; + else if (result.vector.length() < vector.length() || vector.length() == 0.0) + vector = result.vector; } - } - int x = monitorPicture->x(); - int y = monitorPicture->y(); - monitorPicture->setX( x + vector.x() ); - monitorPicture->setY( y + vector.y() ); + + int x = monitorPicture->x(); + int y = monitorPicture->y(); + monitorPicture->setX(x + vector.x()); + monitorPicture->setY(y + vector.y()); } diff --git a/lxqt-config-monitor/monitorpicture.h b/lxqt-config-monitor/monitorpicture.h index efa3daf..6dcda52 100644 --- a/lxqt-config-monitor/monitorpicture.h +++ b/lxqt-config-monitor/monitorpicture.h @@ -16,53 +16,75 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - #ifndef _MONITORPICTURE_H_ #define _MONITORPICTURE_H_ #include #include #include -#include -#include #include +#include +#include #include "monitor.h" #include "ui_monitorpicture.h" #include "monitorwidget.h" class MonitorPicture; -class MonitorPictureDialog: public QDialog { - Q_OBJECT +class MonitorPictureDialog : public QDialog +{ + Q_OBJECT + public: - MonitorPictureDialog(QWidget * parent = 0, Qt::WindowFlags f = 0); - void setScene(QList monitors); - void updateMonitorWidgets(QString primaryMonitor); - void moveMonitorPictureToNearest(MonitorPicture* monitorPicture); - void updateScene(); + MonitorPictureDialog(KScreen::ConfigPtr config, QWidget * parent = 0, Qt::WindowFlags f = 0); + void setScene(QList monitors); + void updateMonitorWidgets(QString primaryMonitor); + void moveMonitorPictureToNearest(MonitorPicture* monitorPicture); + void updateScene(); + private: - Ui::MonitorPictureDialog ui; - QList pictures; + Ui::MonitorPictureDialog ui; + QList pictures; + bool updatingOk; + KScreen::ConfigPtr mConfig; }; +class MonitorPicture : public QGraphicsRectItem +{ +public: + MonitorPicture(QGraphicsItem *parent, + MonitorWidget *monitorWidget, + MonitorPictureDialog *monitorPictureDialog); + void setMonitorPosition(int x, int y); + void adjustNameSize(); -class MonitorPicture: public QGraphicsRectItem { + MonitorWidget *monitorWidget; + int originX, originY; -public: - MonitorPicture(QGraphicsItem * parent, MonitorWidget *monitorWidget, MonitorPictureDialog *monitorPictureDialog); - void setMonitorPosition(int x, int y); - void adjustNameSize(); + void updateSize(QSize size); - MonitorWidget *monitorWidget; - int originX, originY; private: - QGraphicsTextItem *textItem; - QGraphicsSvgItem *svgItem; - MonitorPictureDialog *monitorPictureDialog; + QGraphicsTextItem *textItem; + QGraphicsSvgItem *svgItem; + MonitorPictureDialog *monitorPictureDialog; + protected: - QVariant itemChange(GraphicsItemChange change, const QVariant & value); - void mouseReleaseEvent(QGraphicsSceneMouseEvent * event); + QVariant itemChange(GraphicsItemChange change, const QVariant & value); + void mouseReleaseEvent(QGraphicsSceneMouseEvent * event); +}; + +class MonitorPictureProxy: public QObject +{ + Q_OBJECT + public: + MonitorPictureProxy(QObject *parent, MonitorPicture *monitorPicture); + MonitorPicture *monitorPicture; + + public slots: + void updateSize(); + void updatePosition(); + }; diff --git a/lxqt-config-monitor/monitorpicture.ui b/lxqt-config-monitor/monitorpicture.ui index 29d9853..c0aa496 100644 --- a/lxqt-config-monitor/monitorpicture.ui +++ b/lxqt-config-monitor/monitorpicture.ui @@ -24,58 +24,15 @@ - Magnetic attraction + Keep monitors attached true - - - - Qt::Horizontal - - - QDialogButtonBox::Ok - - - - - - buttonBox - accepted() - MonitorPictureDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - MonitorPictureDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - + diff --git a/lxqt-config-monitor/monitorsettingsdialog.cpp b/lxqt-config-monitor/monitorsettingsdialog.cpp index 8f073d8..d0283b7 100644 --- a/lxqt-config-monitor/monitorsettingsdialog.cpp +++ b/lxqt-config-monitor/monitorsettingsdialog.cpp @@ -17,281 +17,182 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - #include "monitorsettingsdialog.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "monitorwidget.h" #include "timeoutdialog.h" -#include "xrandr.h" #include "monitorpicture.h" +#include "settingsdialog.h" -MonitorSettingsDialog::MonitorSettingsDialog(MonitorSettingsBackend* backend, LxQt::Settings *applicationSettings): - QDialog(NULL, 0), - LVDS(NULL) { - timeoutDialog = NULL; - timer = NULL; - this->applicationSettings = applicationSettings; - this->backend = backend; - backend->setParent(this); - setupUi(); -} - +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -MonitorSettingsDialog::~MonitorSettingsDialog() { +MonitorSettingsDialog::MonitorSettingsDialog() : + QDialog(nullptr, 0) +{ + ui.setupUi(this); + + KScreen::GetConfigOperation *operation = new KScreen::GetConfigOperation(); + connect(operation, &KScreen::GetConfigOperation::finished, [this, operation] (KScreen::ConfigOperation *op) { + KScreen::GetConfigOperation *configOp = qobject_cast(op); + if (configOp) + { + mOldConfig = configOp->config()->clone(); + loadConfiguration(configOp->config()); + operation->deleteLater(); + } + }); + + connect(ui.buttonBox, &QDialogButtonBox::clicked, [&] (QAbstractButton *button) { + if (ui.buttonBox->standardButton(button) == QDialogButtonBox::Apply) + applyConfiguration(false); + if (ui.buttonBox->standardButton(button) == QDialogButtonBox::Save) + { + applyConfiguration(true); + } + + }); + + ui.settingsButton->hide(); // Hide settings button until daemon works OK. + connect(ui.settingsButton, SIGNAL(clicked()), this, SLOT(showSettingsDialog())); +} + +MonitorSettingsDialog::~MonitorSettingsDialog() +{ } +void MonitorSettingsDialog::loadConfiguration(KScreen::ConfigPtr config) +{ + if (mConfig == config) + return; -void MonitorSettingsDialog::deleteTimeoutData() { - timeoutDialog = NULL; - Q_FOREACH(MonitorInfo * monitorInfo, timeoutSettings) { - delete monitorInfo; - } - timeoutSettings.clear(); -} + mConfig = config; -void MonitorSettingsDialog::onCancelSettings() { - // restore the old settings - QList settings; - Q_FOREACH(MonitorInfo * monitorInfo, timeoutSettings) { - settings.append((MonitorSettings*)monitorInfo); - } - backend->setMonitorsSettings(settings); - deleteTimeoutData(); -} + MonitorPictureDialog *monitorPicture = nullptr; + KScreen::OutputList outputs = mConfig->outputs(); -QList MonitorSettingsDialog::getMonitorsSettings() { - // Build list of monitor and their settings - QList settings; - Q_FOREACH(MonitorWidget * monitor, monitors) { - MonitorSettings* s = monitor->getSettings(); - settings.append(s); - if(ui.primaryCombo->currentText() == monitor->monitorInfo->name) - s->primaryOk = true; - } - if(ui.unify->isChecked()) { - Q_FOREACH(MonitorSettings * s, settings) { - s->position = MonitorSettings::None; - } - } - return settings; -} - -void MonitorSettingsDialog::setMonitorsConfig() { - deleteTimeoutData(); - timeoutSettings = backend->getMonitorsInfo(); - // Show timeout dialog - timeoutDialog = new TimeoutDialog(this); - connect(timeoutDialog, SIGNAL(rejected()), this, SLOT(onCancelSettings())); - connect(timeoutDialog, SIGNAL(finished(int)), timeoutDialog, SLOT(deleteLater())); - // Build list of monitor and their settings - QList settings = getMonitorsSettings(); - backend->setMonitorsSettings(settings); - Q_FOREACH(MonitorSettings * s, settings) { - delete s; - } - timeoutDialog->show(); -} + int nMonitors = 0; + for (const KScreen::OutputPtr &output : outputs) + { + if (output->isConnected()) + nMonitors++; -// turn on both laptop LCD and the external monitor -void MonitorSettingsDialog::onUseBoth() { - if(monitors.length() == 0) - return; - ui.unify->setChecked(true); - MonitorWidget* monitor = monitors[0]; - bool ok; - QString mode; - for(int i = 0; i < monitor->monitorInfo->modes.length(); i++) { - mode = monitor->monitorInfo->modes[i]; - ok = true; - Q_FOREACH(MonitorWidget * monitor2, monitors) { - ok = ok && monitor2->monitorInfo->modes.contains(mode); + if (nMonitors > 1) + { + monitorPicture = new MonitorPictureDialog(config, this); + ui.monitorList->addItem(tr("Set position")); + ui.stackedWidget->addWidget(monitorPicture); + break; + } } - if(ok) - break; - } - qDebug() << "Mode selected" << mode << ok; - Q_FOREACH(MonitorWidget * monitor2, monitors) { - int index = monitor2->monitorInfo->modes.indexOf(mode) + 1; - if(monitor2->ui.resolutionCombo->count() > index) - monitor2->ui.resolutionCombo->setCurrentIndex(index); - else - monitor2->chooseMaxResolution(); - monitor2->enableMonitor(true); - qDebug() << "Mode selected index" << index << "Mode" << monitor->ui.resolutionCombo->currentText(); - } - setMonitorsConfig(); -} - -// external monitor only -void MonitorSettingsDialog::onExternalOnly() { - Q_FOREACH(MonitorWidget * monitor, monitors) { - monitor->chooseMaxResolution(); - monitor->enableMonitor(monitor != LVDS); - } - setMonitorsConfig(); -} - -// laptop panel - LVDS only -void MonitorSettingsDialog::onLaptopOnly() { - Q_FOREACH(MonitorWidget * monitor, monitors) { - monitor->chooseMaxResolution(); - monitor->enableMonitor(monitor == LVDS); - } - setMonitorsConfig(); -} - -void MonitorSettingsDialog::onExtended() { - ui.unify->setChecked(false); - int virtualWidth = 0; - Q_FOREACH(MonitorWidget * monitor, monitors) { - monitor->chooseMaxResolution(); - monitor->enableMonitor(true); - monitor->disablePositionOption(false); - QString modeName = monitor->ui.resolutionCombo->currentText(); - int modeWidth = monitor->monitorInfo->monitorModes[modeName]->width; - monitor->ui.xPosSpinBox->setValue(virtualWidth); - monitor->ui.yPosSpinBox->setValue(0); - virtualWidth+=modeWidth; - } - setMonitorsConfig(); -} -void MonitorSettingsDialog::setupUi() { - ui.setupUi(this); - connect(ui.positionPushButton, SIGNAL(clicked()), SLOT(onPositionButtonClicked())); - - // Get monitors information - QList monitorsInfo = backend->getMonitorsInfo(); - - // Search if LVSD monitor is connected - hardwareIdentifier = ""; - Q_FOREACH(MonitorInfo * monitorInfo, monitorsInfo) { - hardwareIdentifier+=monitorInfo->edid; - if(! LVDS && (monitorInfo->name.startsWith("LVDS") || monitorInfo->name.startsWith("PANEL"))) { - MonitorInfo::LVDS_Ok = true; - break; - } - } - - int i = 0; - connect(ui.unify, SIGNAL(toggled(bool)), this, SLOT(disablePositionOption(bool))); - Q_FOREACH(MonitorInfo * monitorInfo, monitorsInfo) { - ui.primaryCombo->addItem(monitorInfo->name); - if(monitorInfo->primaryOk) - ui.primaryCombo->setCurrentIndex(ui.primaryCombo->findText(monitorInfo->name)); - - qDebug() << "Monitor" << monitorInfo->name; - MonitorWidget* monitor = new MonitorWidget(monitorInfo, monitorsInfo, this); - QString title = QString("Monitor %1: %2 (%3) %4") - .arg(i + 1) - .arg(monitor->monitorInfo->name) - .arg(monitor->monitorInfo->humanReadableName()) - .arg(monitor->monitorInfo->vendor); - qDebug() << "Monitor" << title; - monitor->setTitle(title); - - connect(ui.unify, SIGNAL(toggled(bool)), monitor, SLOT(disablePositionOption(bool))); - monitors.append(monitor); - if(! LVDS && (monitorInfo->name.startsWith("LVDS") || monitorInfo->name.startsWith("PANEL"))) { - LVDS = monitor; - } - ui.stackedWidget->addWidget(monitor); - ui.monitorList->addItem(monitor->monitorInfo->name); - ++i; - } - ui.monitorList->setCurrentRow(0); - // set the max width of the list widget to the maximal width of its rows + the width of a vertical scrollbar. - ui.monitorList->setMaximumWidth(ui.monitorList->sizeHintForColumn(0) + style()->pixelMetric(QStyle::PM_ScrollBarExtent) + 40); - - // are the monitors unified? - if(monitorsInfo.length() > 1) - ui.unify->setChecked(backend->isUnified(monitorsInfo)); - else {// disable the option if we only have one monitor - ui.unify->setEnabled(false); - ui.positionPushButton->setEnabled(false); - } - - // If this is a laptop and there is an external monitor, offer quick options - if(monitors.length() == 2) { - // If there is only two monitors,offer quick options - if(! LVDS) { - LVDS = monitors[0]; + QList monitors; + + for (const KScreen::OutputPtr &output : outputs) + { + if (output->isConnected()) + { + MonitorWidget *monitor = new MonitorWidget(output, mConfig, this); + ui.monitorList->addItem(output->name()); + ui.stackedWidget->addWidget(monitor); + monitors.append(monitor); + } } - } - adjustSize(); -} + if (monitorPicture) + monitorPicture->setScene(monitors); -void MonitorSettingsDialog::accept() { - setMonitorsConfig(); - QDialog::accept(); + ui.monitorList->setCurrentRow(0); + adjustSize(); } -void MonitorSettingsDialog::disablePositionOption(bool disable) { - ui.positionPushButton->setEnabled(!disable); +void MonitorSettingsDialog::applyConfiguration(bool saveConfigOk) +{ + if (mConfig && KScreen::Config::canBeApplied(mConfig)) + { + KScreen::SetConfigOperation(mConfig).exec(); + + TimeoutDialog mTimeoutDialog; + if (mTimeoutDialog.exec() == QDialog::Rejected) + KScreen::SetConfigOperation(mOldConfig).exec(); + else + { + mOldConfig = mConfig->clone(); + if (saveConfigOk) + saveConfiguration(mConfig); + } + } } -void MonitorSettingsDialog::onPositionButtonClicked() { - MonitorPictureDialog *dialog = new MonitorPictureDialog(this); - dialog->setScene(monitors); - dialog->exec(); - dialog->updateMonitorWidgets(ui.primaryCombo->currentText()); - delete dialog; +void MonitorSettingsDialog::accept() +{ + //applyConfiguration(true); + QDialog::accept(); } -void MonitorSettingsDialog::applySettings() { - setMonitorsConfig(); +void MonitorSettingsDialog::reject() +{ + QDialog::reject(); } -void MonitorSettingsDialog::saveSettings() { - // Save config and exit - QMessageBox msgBox; - msgBox.setText(tr("Do you want to save changes?")); - msgBox.setInformativeText(tr("Please, check the settings before saving.")); - msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel); - msgBox.setDefaultButton(QMessageBox::Cancel); - int ret = msgBox.exec(); - if( ret == QMessageBox::Cancel ) - return; - bool ok; - QString configName = QInputDialog::getText(this, tr("Name"), - tr("Name:"), QLineEdit::Normal, - tr("Actual"), &ok); - if (!ok || configName.isEmpty()) - return; - QList settings = getMonitorsSettings(); - QString cmd = backend->getCommand(settings); - Q_FOREACH(MonitorSettings * s, settings) { - delete s; +void MonitorSettingsDialog::saveConfiguration(KScreen::ConfigPtr config) +{ + QJsonObject json; + QJsonArray jsonArray; + KScreen::OutputList outputs = config->outputs(); + for (const KScreen::OutputPtr &output : outputs) + { + QJsonObject monitorSettings; + monitorSettings["name"] = output->name(); + KScreen::Edid* edid = output->edid(); + if (edid && edid->isValid()) + monitorSettings["hash"] = edid->hash(); + monitorSettings["connected"] = output->isConnected(); + if ( output->isConnected() ) + { + monitorSettings["enabled"] = output->isEnabled(); + monitorSettings["primary"] = output->isPrimary(); + monitorSettings["xPos"] = output->pos().x(); + monitorSettings["yPos"] = output->pos().y(); + monitorSettings["currentMode"] = output->currentMode()->id(); + monitorSettings["rotation"] = output->rotation(); + } + jsonArray.append(monitorSettings); } + json["outputs"] = jsonArray; + + QSettings settings("LXQt", "lxqt-config-monitor"); + settings.setValue("currentConfig", QVariant(QJsonDocument(json).toJson())); + QString desktop = QString("[Desktop Entry]\n" "Type=Application\n" "Name=LXQt-config-monitor autostart\n" "Comment=Autostart monitor settings for LXQt-config-monitor\n" "Exec=%1\n" - "OnlyShowIn=LXQt\n").arg(cmd); - // Check if ~/.config/autostart/ exists - ok = true; - QFileInfo fileInfo(QDir::homePath() + "/.config/autostart/"); - if( ! fileInfo.exists() ) - ok = QDir::root().mkpath(QDir::homePath() + "/.config/autostart/"); - QFile file(QDir::homePath() + "/.config/autostart/lxqt-config-monitor-autostart.desktop"); + "OnlyShowIn=LXQt\n").arg("lxqt-config-monitor -l"); + + // Check autostart path: $XDG_CONFIG_HOME or ~/.config/autostart + QString autostartPath; + bool ok = true; + if(qEnvironmentVariableIsSet("XDG_CONFIG_HOME")) + autostartPath = QString(qgetenv("XDG_CONFIG_HOME")); + else + { + autostartPath = QDir::homePath() + "/.config/autostart/"; + // Check if ~/.config/autostart/ exists + QFileInfo fileInfo(autostartPath); + if( ! fileInfo.exists() ) + ok = QDir::root().mkpath(autostartPath); + } + QFile file(autostartPath + "/lxqt-config-monitor-autostart.desktop"); if(ok) ok = file.open(QIODevice::WriteOnly | QIODevice::Text); if(!ok) { @@ -303,29 +204,17 @@ void MonitorSettingsDialog::saveSettings() { out.flush(); file.close(); - // Save config in applicationSettings - applicationSettings->beginGroup("configMonitor"); - QJsonArray savedConfigs = QJsonDocument::fromJson(applicationSettings->value("saved").toByteArray()).array(); - QJsonObject monitorConfig; - monitorConfig["hardwareIdentifier"] = hardwareIdentifier; - monitorConfig["command"] = cmd; - monitorConfig["name"] = configName; - savedConfigs.append(monitorConfig); - applicationSettings->setValue("saved", QVariant(QJsonDocument(savedConfigs).toJson())); - applicationSettings->endGroup(); - emit(settingsSaved()); } -#include - -void MonitorSettingsDialog::processClickedFromDialog(QDialogButtonBox::StandardButton button) +void MonitorSettingsDialog::showSettingsDialog() { - qDebug() << "[MonitorSettingsDialog::processClickedFromDialog]"; - if(button == QDialogButtonBox::Apply) - setMonitorsConfig(); -} + QByteArray configName = qgetenv("LXQT_SESSION_CONFIG"); -QString MonitorSettingsDialog::getHardwareIdentifier() -{ - return hardwareIdentifier; + if (configName.isEmpty()) + configName = "MonitorSettings"; + + LXQt::Settings settings(configName); + + SettingsDialog settingsDialog(tr("Advanced settings"), &settings); + settingsDialog.exec(); } diff --git a/lxqt-config-monitor/monitorsettingsdialog.h b/lxqt-config-monitor/monitorsettingsdialog.h index 0976ab0..dbd8af7 100644 --- a/lxqt-config-monitor/monitorsettingsdialog.h +++ b/lxqt-config-monitor/monitorsettingsdialog.h @@ -17,70 +17,44 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - #ifndef MONITORSETTINGSDIALOG_H #define MONITORSETTINGSDIALOG_H -#include -#include -#include -#include "ui_mainwindow.h" -#include "monitor.h" -#include "monitorwidget.h" +#include "ui_monitorsettingsdialog.h" +#include "timeoutdialog.h" -class TimeoutDialog; -class QTimer; +#include +#include +#include +#include -class MonitorSettingsDialog: public QDialog { - Q_OBJECT +class MonitorSettingsDialog : public QDialog +{ + Q_OBJECT public: - MonitorSettingsDialog(MonitorSettingsBackend* backend, LxQt::Settings *applicationSettings); - virtual ~MonitorSettingsDialog(); - virtual void accept(); - QString getHardwareIdentifier(); - -public Q_SLOTS: - // quick options - void onUseBoth(); - void onExternalOnly(); - void onLaptopOnly(); - void onExtended(); - // applying and saving settings - void applySettings(); - void saveSettings(); - - // Apply settings from ConfigDialog - void processClickedFromDialog(QDialogButtonBox::StandardButton button); + MonitorSettingsDialog(); + virtual ~MonitorSettingsDialog(); -signals: - void settingsSaved(); + virtual void accept(); + virtual void reject(); private: - void setMonitorsConfig(); - void setupUi(); - QList getMonitorsSettings(); - - void deleteTimeoutData(); // Used to delete data from TimeoutDialog + void applyConfiguration(bool saveConfigOk); + void cancelConfiguration(); private Q_SLOTS: - // Timeout dialog signals - void onCancelSettings(); - - void onPositionButtonClicked(); - void disablePositionOption(bool disable); + void loadConfiguration(KScreen::ConfigPtr config); + void showSettingsDialog(); private: - Ui::MonitorSettingsDialog ui; - QList monitors; - MonitorWidget* LVDS; - MonitorSettingsBackend* backend; - // TimeoutDialog data - TimeoutDialog* timeoutDialog; - QTimer* timer; - QList timeoutSettings; - LxQt::Settings *applicationSettings; - QString hardwareIdentifier; + void saveConfiguration(KScreen::ConfigPtr config); + + Ui::MonitorSettingsDialog ui; + + // Configutarions + KScreen::ConfigPtr mOldConfig; + KScreen::ConfigPtr mConfig; }; #endif // MONITORSETTINGSDIALOG_H diff --git a/lxqt-config-monitor/monitorsettingsdialog.ui b/lxqt-config-monitor/monitorsettingsdialog.ui new file mode 100644 index 0000000..4d153cc --- /dev/null +++ b/lxqt-config-monitor/monitorsettingsdialog.ui @@ -0,0 +1,136 @@ + + + MonitorSettingsDialog + + + + 0 + 0 + 510 + 131 + + + + Monitor Settings + + + + + + + + + + + Qt::Horizontal + + + false + + + + + 0 + 0 + + + + + 150 + 0 + + + + Qt::ScrollBarAlwaysOff + + + QListView::Adjust + + + + + + 1 + 0 + + + + + 300 + 0 + + + + + + + + + + + Settings + + + + + + Qt::ToolButtonTextBesideIcon + + + false + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Save + + + false + + + + + + + + + + + monitorList + currentRowChanged(int) + stackedWidget + setCurrentIndex(int) + + + 126 + 181 + + + 20 + 20 + + + + + buttonBox + rejected() + MonitorSettingsDialog + reject() + + + 338 + 439 + + + 286 + 257 + + + + + diff --git a/lxqt-config-monitor/monitorwidget.cpp b/lxqt-config-monitor/monitorwidget.cpp index bcc378e..5fa7430 100644 --- a/lxqt-config-monitor/monitorwidget.cpp +++ b/lxqt-config-monitor/monitorwidget.cpp @@ -19,130 +19,329 @@ #include "monitorwidget.h" #include "monitor.h" -#include - -MonitorWidget::MonitorWidget(MonitorInfo* monitor, const QList monitorsInfo, QWidget* parent): - QGroupBox(parent) { - ui.enabled = NULL; - monitorInfo = monitor; - monitor->setParent(this); // take the ownership - - ui.setupUi(this); - - if(monitorsInfo.length() == 1) { - disablePositionOption(true); - - // turn off screen is not allowed since there should be at least one monitor available. - ui.enabled->setEnabled(false); - } - - ui.xPosSpinBox->setValue(monitor->xPos); - ui.yPosSpinBox->setValue(monitor->yPos); - - if(monitor->enabledOk) - ui.enabled->setChecked(true); - - connect(ui.resolutionCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onResolutionChanged(int))); - ui.resolutionCombo->addItem(tr("Auto")); - Q_FOREACH(QString _mode_line, monitor->modes) { - QVariant monitorModeInfo = QVariant::fromValue(monitor->monitorModes[_mode_line]); - ui.resolutionCombo->addItem(_mode_line, monitorModeInfo); - } - - - if(!monitor->currentMode.isEmpty()) - ui.resolutionCombo->setCurrentIndex(ui.resolutionCombo->findText(monitor->currentMode)); - else - ui.resolutionCombo->setCurrentIndex(0); - if(!monitor->currentRate.isEmpty()) - ui.rateCombo->setCurrentIndex(ui.rateCombo->findText(monitor->currentRate)); - else - ui.rateCombo->setCurrentIndex(0); - - int brightness; - if( !monitorInfo->brightness.isEmpty() ) - brightness = monitorInfo->brightness.toFloat()*100; - else - brightness = 100; - ui.brightnessSlider->setValue(brightness); - - // Set gamma values - ui.redSpinBox->setSingleStep(0.01); - ui.greenSpinBox->setSingleStep(0.01); - ui.blueSpinBox->setSingleStep(0.01); - if(!monitor->gamma.isEmpty()) { - QStringList gammaValues = monitor->gamma.split(":"); - ui.redSpinBox->setValue(gammaValues[0].toFloat()); - ui.greenSpinBox->setValue(gammaValues[1].toFloat()); - ui.blueSpinBox->setValue(gammaValues[2].toFloat()); - } - - //Set backlight values - if( !monitor->backlight.isEmpty() ) { - ui.backlightSlider->setMinimum(monitor->backlightMin.toInt()); - ui.backlightSlider->setMaximum(monitor->backlightMax.toInt()); - ui.backlightSlider->setSingleStep(1); - ui.backlightSlider->setValue(monitor->backlight.toInt()); - } else { - ui.backlightSlider->setEnabled(false); - ui.backlightLabel->setEnabled(false); - } -} - -void MonitorWidget::onResolutionChanged(int index) { - QComboBox* combo =ui.resolutionCombo; - QComboBox* rateCombo = ui.rateCombo; - QString mode = combo->currentText(); - rateCombo->clear(); - rateCombo->addItem(tr("Auto")); - if( monitorInfo->monitorModes.contains(mode)) { - QStringList mode_lines = combo->currentData().value()->modeLines; - //QStringList mode_lines = monitorInfo->monitorModes[mode]->modeLines; - Q_FOREACH(QString rate, mode_lines) { - rateCombo->addItem(rate); + +#include +#include +#include +#include + + + +QString modeToString(KScreen::ModePtr mode) +{ + // mode->name() can be anything, not just widthxheight. eg if added with cvt. + return QString("%1x%2").arg(mode->size().width()).arg(mode->size().height()); +} + +KScreen::OutputPtr getOutputById(int id, KScreen::OutputList outputs) +{ + for (const KScreen::OutputPtr &output : outputs) + if (output->id() == id) + return output; + + return KScreen::OutputPtr(nullptr); +} + +KScreen::ModePtr getModeById(QString id, KScreen::ModeList modes) +{ + for (const KScreen::ModePtr &mode : modes) + if (mode->id() == id) + return mode; + + return KScreen::ModePtr(NULL); +} + +static bool sizeBiggerThan(const KScreen::ModePtr &modeA, const KScreen::ModePtr &modeB) +{ + QSize sizeA = modeA->size(); + QSize sizeB = modeB->size(); + return sizeA.width() * sizeA.height() > sizeB.width() * sizeB.height(); +} + + +MonitorWidget::MonitorWidget(KScreen::OutputPtr output, KScreen::ConfigPtr config, QWidget* parent) : + QGroupBox(parent) +{ + this->output = output; + this->config = config; + + ui.setupUi(this); + + ui.enabledCheckbox->setChecked(output->isEnabled()); + + QList modeList = output->modes().values(); + + // Remove duplicate sizes + QMap noDuplicateModes; + foreach(const KScreen::ModePtr &mode, modeList) + { + if( noDuplicateModes.keys().contains(modeToString(mode)) ) + { + KScreen::ModePtr actual = noDuplicateModes[modeToString(mode)]; + bool isActualPreferred = output->preferredModes().contains(actual->id()); + bool isModePreferred = output->preferredModes().contains(mode->id()); + if( ( mode->refreshRate() > actual->refreshRate() && !isActualPreferred ) || isModePreferred ) + noDuplicateModes[modeToString(mode)] = mode; + } + else + noDuplicateModes[modeToString(mode)] = mode; } - rateCombo->setCurrentIndex(0); - } -} - - -void MonitorWidget::disablePositionOption(bool disable) { - bool enable = !disable; - ui.xPosSpinBox->setEnabled(enable); - ui.yPosSpinBox->setEnabled(enable); - ui.xPosLabel->setEnabled(enable); - ui.yPosLabel->setEnabled(enable); - ui.positionLabel->setEnabled(enable); -} - -MonitorSettings* MonitorWidget::getSettings() { - MonitorSettings* s = new MonitorSettings(); - s->name = monitorInfo->name; - s->enabledOk = ui.enabled->isChecked(); - s->currentMode = ui.resolutionCombo->currentText(); - s->currentRate = ui.rateCombo->currentText(); - if( ! ui.xPosSpinBox->isEnabled() ) { // If no unify monitor is selected, then position is disabled. - s->position = MonitorSettings::None; - } else { - s->position = MonitorSettings::Manual; - } - s->xPos=ui.xPosSpinBox->value(); - s->yPos=ui.yPosSpinBox->value(); - s->brightness = QString("%1").arg((float)(ui.brightnessSlider->value())/100.0); - s->gamma = QString("%1:%2:%3").arg(ui.redSpinBox->value()).arg(ui.greenSpinBox->value()).arg(ui.blueSpinBox->value()); - if(ui.backlightSlider->isEnabled()) { - s->backlight = QString("%1").arg(ui.backlightSlider->value()); - s->backlightMax = QString("%1").arg(ui.backlightSlider->maximum()); - s->backlightMin = QString("%1").arg(ui.backlightSlider->minimum()); - } - return s; -} - -void MonitorWidget::chooseMaxResolution() { - if(ui.resolutionCombo->count() > 1) - ui.resolutionCombo->setCurrentIndex(1); -} - -void MonitorWidget::enableMonitor(bool enable) { - ui.enabled->setChecked(enable); + + // Sort modes by size + modeList = noDuplicateModes.values(); + qSort(modeList.begin(), modeList.end(), sizeBiggerThan); + + // Add each mode to the list + foreach (const KScreen::ModePtr &mode, modeList) + { + ui.resolutionCombo->addItem(modeToString(mode), mode->id()); + if(output->preferredModes().contains(mode->id())) + { + // Make bold preferredModes + QFont font = ui.resolutionCombo->font(); + font.setBold(true); + ui.resolutionCombo->setItemData(ui.resolutionCombo->count()-1, font, Qt::FontRole); + } + } + connect(ui.resolutionCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onResolutionChanged(int))); + + // Select actual mode in list + if (output->currentMode()) + { + // Set the current mode in dropdown + int idx = ui.resolutionCombo->findData(output->currentMode()->id()); + if (idx < 0) + { + // Select mode with same size + foreach (const KScreen::ModePtr &mode, modeList) + { + if( mode->size() == output->currentMode()->size() ) + idx = ui.resolutionCombo->findData(output->currentMode()->id()); + } + } + if(idx < 0) + idx = ui.resolutionCombo->findData(output->preferredMode()->id()); + if (idx >= 0) + ui.resolutionCombo->setCurrentIndex(idx); + } + updateRefreshRates(); + + + // Update EDID information + // KScreen doesn't make much public but that's ok... + KScreen::Edid* edid = output->edid(); + if (edid && edid->isValid()) + { + ui.outputInfoLabel->setText( + tr("Name: %1\n").arg(edid->name()) % + tr("Vendor: %1\n").arg(edid->vendor()) % + tr("Serial: %1\n").arg(edid->serial()) % + tr("Display size: %1cm x %2cm\n").arg(edid->width()).arg(edid->height()) % + tr("Serial number: %1\n").arg(edid->serial()) % + tr("EISA device ID: %1\n").arg(edid->eisaId()) + ); + } + + if (config->connectedOutputs().count() == 1) + { + setOnlyMonitor(true); + // There isn't always a primary output. Gross. + output->setPrimary(true); + } + else + { + for (const KScreen::OutputPtr &other : config->connectedOutputs()) + { + // We can't clone ourselves, or an output that already clones another + if (other == output) + continue; + + ui.clonesCombo->addItem(other->name(), other->id()); + ui.relativeScreensCombo->addItem(other->name(), other->id()); + } + connect(ui.clonesCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCloneChanged(int))); + } + + + ui.xPosSpinBox->setValue(output->pos().x()); + ui.yPosSpinBox->setValue(output->pos().y()); + + // Behavior chooser + if (output->isPrimary()) + ui.behaviorCombo->setCurrentIndex(PrimaryDisplay); + else if (!output->clone()) + { + // Is this right? + ui.behaviorCombo->setCurrentIndex(CloneDisplay); + int idx = ui.resolutionCombo->findData(output->clone()->id()); + ui.clonesCombo->setCurrentIndex(idx); + } + else + ui.behaviorCombo->setCurrentIndex(ExtendDisplay); + + // Insert orientations + ui.orientationCombo->addItem(tr("None"), KScreen::Output::None); + ui.orientationCombo->addItem(tr("Left"), KScreen::Output::Left); + ui.orientationCombo->addItem(tr("Right"), KScreen::Output::Right); + ui.orientationCombo->addItem(tr("Inverted"), KScreen::Output::Inverted); + switch(output->rotation()) + { + case KScreen::Output::None: + ui.orientationCombo->setCurrentIndex(0); + break; + case KScreen::Output::Left: + ui.orientationCombo->setCurrentIndex(1); + break; + case KScreen::Output::Right: + ui.orientationCombo->setCurrentIndex(2); + break; + case KScreen::Output::Inverted: + ui.orientationCombo->setCurrentIndex(3); + break; + } + + connect(ui.enabledCheckbox, SIGNAL(toggled(bool)), this, SLOT(onEnabledChanged(bool))); + connect(ui.behaviorCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onBehaviorChanged(int))); + connect(ui.positioningCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onPositioningChanged(int))); + connect(ui.xPosSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onPositionChanged(int))); + connect(ui.yPosSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onPositionChanged(int))); + connect(ui.orientationCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onOrientationChanged(int))); + + // Force update behavior visibility + onBehaviorChanged(ui.behaviorCombo->currentIndex()); +} + +MonitorWidget::~MonitorWidget() +{ +} + +void MonitorWidget::onEnabledChanged(bool enabled) +{ + output->setEnabled(enabled); + + // If we're enabling a disabled output for the first time + if (enabled && !output->currentMode()) + { + // order here matters + onResolutionChanged(ui.resolutionCombo->currentIndex()); + onOrientationChanged(ui.orientationCombo->currentIndex()); + onPositioningChanged(ui.positioningCombo->currentIndex()); + onBehaviorChanged(ui.behaviorCombo->currentIndex()); + } +} + +void MonitorWidget::onOrientationChanged(int idx) +{ + output->setRotation((KScreen::Output::Rotation) ui.orientationCombo->currentData().toInt(0)); +} + +void MonitorWidget::onBehaviorChanged(int idx) +{ + // Behavior should match the index of the selected element + ui.positioningCombo->setVisible(idx == ExtendDisplay); + ui.clonesCombo->setVisible(idx == CloneDisplay); + ui.relativeScreensCombo->setVisible(idx == ExtendDisplay); + ui.xPosSpinBox->setVisible(idx == ExtendDisplay); + ui.yPosSpinBox->setVisible(idx == ExtendDisplay); + ui.relativeScreensCombo->setEnabled(true); + if(idx == CloneDisplay) + onCloneChanged(ui.clonesCombo->currentIndex()); + + output->setPrimary(idx == PrimaryDisplay); +} + +void MonitorWidget::onCloneChanged(int idx) +{ + KScreen::OutputPtr other = getOutputById(ui.clonesCombo->currentData().toInt(), + config->outputs()); + output->setPos( other->pos() ); +} + +void MonitorWidget::onPositioningChanged(int idx) +{ + // Update the x/y spinboxes with the correct values + KScreen::OutputPtr other = getOutputById(ui.relativeScreensCombo->currentData().toInt(), + config->outputs()); + + // TODO: Figure out what to do here + if (!other->currentMode() || !output->currentMode()) + return; + + QSize otherSize = other->currentMode()->size(); + QSize thisSize = output->currentMode()->size(); + + int x = other->pos().x(); + int y = other->pos().y(); + + switch (idx) { + case RightOf: + x += otherSize.width(); + break; + case LeftOf: + x += thisSize.width(); + break; + case Above: + y += otherSize.height(); + break; + case Below: + y += thisSize.height(); + break; + case Manually: + default: + break; + } + + ui.xPosSpinBox->setValue(x); + ui.yPosSpinBox->setValue(y); + // Disable the other screens combo box if we don't need it + ui.relativeScreensCombo->setEnabled(idx && idx != Manually); +} + +void MonitorWidget::onPositionChanged(int value) +{ + output->setPos(QPoint(ui.xPosSpinBox->value(), ui.yPosSpinBox->value())); +} + +void MonitorWidget::onResolutionChanged(int index) +{ + output->setCurrentModeId(ui.resolutionCombo->currentData().toString()); + updateRefreshRates(); +} + +void MonitorWidget::onRateChanged(int index) +{ + output->setCurrentModeId(ui.rateCombo->currentData().toString()); +} + +void MonitorWidget::updateRefreshRates() +{ + disconnect(ui.rateCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onRateChanged(int))); + ui.rateCombo->clear(); + + if (output->modes().size() < 0) + return; + + KScreen::ModePtr selectedMode = output->currentMode(); + if (selectedMode) + { + for (const KScreen::ModePtr &mode : output->modes()) + if (mode->size() == selectedMode->size()) + ui.rateCombo->addItem(tr("%1 Hz").arg(mode->refreshRate()), mode->id()); + + int idx = ui.rateCombo->findData(selectedMode->id()); + if (idx >= 0) + ui.rateCombo->setCurrentIndex(idx); + } + + connect(ui.rateCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onRateChanged(int))); +} + +void MonitorWidget::setOnlyMonitor(bool isOnlyMonitor) +{ + ui.enabledCheckbox->setEnabled(!isOnlyMonitor); + ui.behaviorCombo->setEnabled(!isOnlyMonitor); + ui.xPosSpinBox->setVisible(!isOnlyMonitor); + ui.yPosSpinBox->setVisible(!isOnlyMonitor); + ui.relativeScreensCombo->setVisible(!isOnlyMonitor); + ui.clonesCombo->setVisible(!isOnlyMonitor); } diff --git a/lxqt-config-monitor/monitorwidget.h b/lxqt-config-monitor/monitorwidget.h index 12a09e6..0e43c06 100644 --- a/lxqt-config-monitor/monitorwidget.h +++ b/lxqt-config-monitor/monitorwidget.h @@ -17,37 +17,59 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - #ifndef _MONITORWIDGET_H_ #define _MONITORWIDGET_H_ +#include "ui_monitorwidget.h" + #include #include #include #include -#include "ui_monitorwidget.h" +#include +#include -class MonitorInfo; -class MonitorSettings; +#define PrimaryDisplay 0 +#define ExtendDisplay 1 +#define CloneDisplay 2 -// Monitor info -class MonitorWidget : public QGroupBox { +#define RightOf 0 +#define LeftOf 1 +#define Above 2 +#define Below 3 +#define Manually 4 + +class MonitorWidget : public QGroupBox +{ Q_OBJECT + friend class MonitorPicture; + friend class MonitorPictureDialog; + public: - MonitorWidget(MonitorInfo* monitor, const QList< MonitorInfo* > monitorsInfo, QWidget* parent = 0); - MonitorSettings* getSettings(); - void chooseMaxResolution(); - void enableMonitor(bool enable); + MonitorWidget(KScreen::OutputPtr output, KScreen::ConfigPtr config, QWidget* parent = 0); + ~MonitorWidget(); - MonitorInfo* monitorInfo; + void updateRefreshRates(); + + KScreen::OutputPtr output; + KScreen::ConfigPtr config; - Ui::MonitorWidget ui; public Q_SLOTS: - void disablePositionOption(bool disabled); + void setOnlyMonitor(bool isOnlyMonitor); private Q_SLOTS: - void onResolutionChanged(int); + void onEnabledChanged(bool); + void onBehaviorChanged(int); + void onPositioningChanged(int); + void onPositionChanged(int); + void onResolutionChanged(int); + void onRateChanged(int); + void onOrientationChanged(int); + void onCloneChanged(int); + +private: + Ui::MonitorWidget ui; }; #endif // _MONITORWIDGET_H_ diff --git a/lxqt-config-monitor/monitorwidget.ui b/lxqt-config-monitor/monitorwidget.ui index 000cb9c..38624e4 100644 --- a/lxqt-config-monitor/monitorwidget.ui +++ b/lxqt-config-monitor/monitorwidget.ui @@ -6,199 +6,249 @@ 0 0 - 345 - 286 + 313 + 274 - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - Turn on - - - - - - - Resolution: - - - - - - - - - - Rate: - - - - - - - - - - - - - 0 - 0 - - - - Hz - - - - - - - - - Position: - - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - x: - - - - - - - -10000000 - - - 10000000 - - - - - - - y: - - - - - - - -10000000 - - - 10000000 - - - - - - - - - Brightness: - - - - - - - 100 - - - 100 - - - Qt::Horizontal - - - - - - - Gamma: - - - - - - - - - 10.000000000000000 - - - 1.000000000000000 - - - - - - - : - - - - - - - 10.000000000000000 - - - 1.000000000000000 - - - - - - - : - - - - - - - 10.000000000000000 - - - 1.000000000000000 - - - 1.000000000000000 - - - - - - - - - Backlight: - - - - - - - Qt::Horizontal + + + + + 0 + + + Setup + + + + + + + + (x) + + + + + + -10000000 + + + 10000000 + + + + + + + (y) + + + + + + -10000000 + + + 10000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Resolution: + + + + + + + + + + + + Enable this display + + + + + + + + This is my primary display + + + + + This screen extends another display + + + + + This screen clones another display + + + + + + + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + + + + false + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Advanced + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Refresh rate: + + + + + + + Rotation: + + + + + + + + + + + 0 + 0 + + + + + + + + + + + Info + + + + + + Display information + + + true + + + + + + + Qt::Vertical + + + + 20 + 1 + + + + + + diff --git a/lxqt-config-monitor/quickoptions.cpp b/lxqt-config-monitor/quickoptions.cpp deleted file mode 100644 index 876efea..0000000 --- a/lxqt-config-monitor/quickoptions.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2015 P.L. Lucas - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#include "quickoptions.h" -#include "configure.h" - - -QuickOptions::QuickOptions(QWidget* parent): - QDialog(parent) { - - ui.setupUi(this); - - ui.useBoth->setIcon(QIcon(ICON_PATH "unified.svg")); - ui.externalOnly->setIcon(QIcon(ICON_PATH "monitor1offmonitor2on.svg")); - ui.extended->setIcon(QIcon(ICON_PATH "extended.svg")); - ui.laptopOnly->setIcon(QIcon(ICON_PATH "monitor1onmonitor2ff.svg")); - - QSize size(128,64); - ui.useBoth->setIconSize(size); - ui.externalOnly->setIconSize(size); - ui.extended->setIconSize(size); - ui.laptopOnly->setIconSize(size); - -} diff --git a/lxqt-config-monitor/quickoptions.ui b/lxqt-config-monitor/quickoptions.ui deleted file mode 100644 index 3bd6f97..0000000 --- a/lxqt-config-monitor/quickoptions.ui +++ /dev/null @@ -1,107 +0,0 @@ - - - QuickOptions - - - - 0 - 0 - 549 - 258 - - - - Monitor Settings - - - - - - - - - - - - - - 0 - 0 - - - - Show the same screen on both laptop LCD and external monitor - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Extended view - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Turn off laptop LCD and use external monitor only - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Turn off external monitor and use laptop LCD only - - - Qt::ToolButtonTextBesideIcon - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - diff --git a/lxqt-config-monitor/configure.in b/lxqt-config-monitor/resources/configure.in similarity index 100% rename from lxqt-config-monitor/configure.in rename to lxqt-config-monitor/resources/configure.in diff --git a/lxqt-config-monitor/lxqt-config-monitor.desktop.in b/lxqt-config-monitor/resources/lxqt-config-monitor.desktop.in similarity index 100% rename from lxqt-config-monitor/lxqt-config-monitor.desktop.in rename to lxqt-config-monitor/resources/lxqt-config-monitor.desktop.in diff --git a/lxqt-config-monitor/magnetic_attraction.html b/lxqt-config-monitor/resources/magnetic_attraction.html similarity index 91% rename from lxqt-config-monitor/magnetic_attraction.html rename to lxqt-config-monitor/resources/magnetic_attraction.html index 1fc4fd3..0fd6900 100644 --- a/lxqt-config-monitor/magnetic_attraction.html +++ b/lxqt-config-monitor/resources/magnetic_attraction.html @@ -5,9 +5,9 @@

Magnetic attraction algorithm

-

The algorithm used to move monitors to the nearest one in "position dialog" is explained here.

-

Segment equation is used. Let's explain segment equation in order to understand the proccess:

-

If you have two points, p0, p1 ∈ ℝ 2, the equation of straigh line between p0 and p1 is:

+

The algorithm used to move monitors to the nearest one in “position dialog” is explained here.

+

Segment equation is used. Let’s explain segment equation in order to understand the proccess:

+

If you have two points, p0, p1 ∈ ℝ 2, the equation of straight line between p0 and p1 is:

r = v · t + p0 @@ -39,4 +39,4 @@

r2 = v· t2 + c0

Iff t2<t1, c0 monitor must be moved, and its displacement is provided by r = r1-r2

- \ No newline at end of file + diff --git a/lxqt-config-monitor/savesettings.cpp b/lxqt-config-monitor/savesettings.cpp index 334de4b..331f164 100644 --- a/lxqt-config-monitor/savesettings.cpp +++ b/lxqt-config-monitor/savesettings.cpp @@ -25,7 +25,7 @@ #include #include -SaveSettings::SaveSettings(LxQt::Settings*applicationSettings, QWidget* parent): +SaveSettings::SaveSettings(LXQt::Settings*applicationSettings, QWidget* parent): QDialog(parent) { this->applicationSettings = applicationSettings; diff --git a/lxqt-config-monitor/savesettings.h b/lxqt-config-monitor/savesettings.h deleted file mode 100644 index 7a05aed..0000000 --- a/lxqt-config-monitor/savesettings.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2015 P.L. Lucas - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - - -#ifndef _SAVESETTINGS_H_ -#define _SAVESETTINGS_H_ - -#include "ui_savesettings.h" -#include - -// Monitor info -class SaveSettings : public QDialog { - Q_OBJECT - -public: - SaveSettings(LxQt::Settings*applicationSettings, QWidget* parent = 0); - - Ui::SaveSettings ui; - -public slots: - /*! Load settings to QListWidgets. - eids is hardware code to detect hardware compatible settings. - */ - void loadSettings(); - - void setHardwareIdentifier(QString hardwareIdentifier); - - void setSavedSettings(QListWidgetItem * item); - - void onDeleteItem(); - - void onRenameItem(); - -private: - LxQt::Settings*applicationSettings; - QString hardwareIdentifier; - -}; - -#endif // _SAVESETTINGS_H_ diff --git a/lxqt-config-monitor/savesettings.ui b/lxqt-config-monitor/savesettings.ui deleted file mode 100644 index 6471e0f..0000000 --- a/lxqt-config-monitor/savesettings.ui +++ /dev/null @@ -1,93 +0,0 @@ - - - SaveSettings - - - - 0 - 0 - 521 - 312 - - - - Monitor Settings - - - - - - - - - - - - - - 0 - 0 - - - - Save - - - Qt::ToolButtonTextBesideIcon - - - - - - - Saved settings - - - - - - All: - - - - - - - Hardware compatible: - - - - - - - - - - - - - - - Rename - - - - - - - Delete - - - - - - - - - - - - - - - diff --git a/lxqt-config-monitor/main.h b/lxqt-config-monitor/settingsdialog.cpp similarity index 58% rename from lxqt-config-monitor/main.h rename to lxqt-config-monitor/settingsdialog.cpp index afc99d8..9411d65 100644 --- a/lxqt-config-monitor/main.h +++ b/lxqt-config-monitor/settingsdialog.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 P.L. Lucas + Copyright (C) 2015 P.L. Lucas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,14 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "settingsdialog.h" -#ifndef _MAIN_H_ -#define _MAIN_H_ +SettingsDialog::SettingsDialog(const QString &title, LXQt::Settings *settings, QWidget *parent) + : LXQt::ConfigDialog(title, settings, parent) +{ + setButtons(QDialogButtonBox::QDialogButtonBox::Apply | QDialogButtonBox::Close); + setWindowIcon(QIcon::fromTheme("preferences-desktop-display")); - -#endif // _MAIN_H_ + //DaemonSettings *daemon = new DaemonSettings(settings, this); + //addPage(daemon, QObject::tr("Daemon"), "system-run"); +} diff --git a/lxqt-config-monitor/quickoptions.h b/lxqt-config-monitor/settingsdialog.h similarity index 69% rename from lxqt-config-monitor/quickoptions.h rename to lxqt-config-monitor/settingsdialog.h index 779ac3a..fe892db 100644 --- a/lxqt-config-monitor/quickoptions.h +++ b/lxqt-config-monitor/settingsdialog.h @@ -16,21 +16,26 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef __SETTINGSDIALOG_H__ +#define __SETTINGSDIALOG_H__ -#ifndef _QUICKOPTIONS_H_ -#define _QUICKOPTIONS_H_ +#include +#include -#include "ui_quickoptions.h" -// Monitor info -class QuickOptions : public QDialog { - Q_OBJECT +class SettingsDialog : public LXQt::ConfigDialog +{ + Q_OBJECT public: - QuickOptions(QWidget* parent = 0); + SettingsDialog(const QString &title, LXQt::Settings *settings, QWidget *parent = 0); - Ui::QuickOptions ui; +private Q_SLOTS: +private: + + // Configutarions }; -#endif // _QUICKOPTIONS_H_ +#endif // __SETTINGSDIALOG_H__ + diff --git a/lxqt-config-monitor/timeoutdialog.cpp b/lxqt-config-monitor/timeoutdialog.cpp index 7ba9844..3b86516 100644 --- a/lxqt-config-monitor/timeoutdialog.cpp +++ b/lxqt-config-monitor/timeoutdialog.cpp @@ -18,37 +18,48 @@ * */ +#define TIMER_DURATION 10 + #include "timeoutdialog.h" -#include -TimeoutDialog::TimeoutDialog(QWidget* parent, Qt::WindowFlags f) { - ui.setupUi(this); +TimeoutDialog::TimeoutDialog(QWidget* parent, Qt::WindowFlags f) : + QDialog(parent, f) +{ + ui.setupUi(this); - QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion); - int size = style()->pixelMetric(QStyle::PM_MessageBoxIconSize); - ui.icon->setPixmap(icon.pixmap(QSize(size, size))); + QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion); + int size = style()->pixelMetric(QStyle::PM_MessageBoxIconSize); + ui.icon->setPixmap(icon.pixmap(QSize(size, size))); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(onTimeout())); - adjustSize(); + connect(&timer, &QTimer::timeout, this, &TimeoutDialog::onTimeout); + adjustSize(); } -TimeoutDialog::~TimeoutDialog() { +TimeoutDialog::~TimeoutDialog() +{ } -void TimeoutDialog::showEvent(QShowEvent* e) { - timer->start(1000); - QDialog::showEvent(e); +void TimeoutDialog::showEvent(QShowEvent* e) +{ + timer.start(1000); + QDialog::showEvent(e); } -void TimeoutDialog::onTimeout() { - int time = ui.progressBar->value() + 1; - if(time >= 10) { // If time is finished, settings are restored. - timer->stop(); - reject(); - } - else { - ui.progressBar->setValue(time); - ui.progressBar->setFormat(tr("%1 second(s) remaining").arg(10 - time)); - } +void TimeoutDialog::onTimeout() +{ + int maximum = ui.progressBar->maximum(); + int time = ui.progressBar->value() + maximum / TIMER_DURATION; + + // if time is finished, settings are restored. + if (time >= maximum) + { + timer.stop(); + reject(); + } + else + { + int remaining = maximum / TIMER_DURATION - TIMER_DURATION * time / maximum; + ui.remainingTime->setText(tr("%1 second(s) remaining").arg(remaining)); + ui.progressBar->setValue(time); + } } diff --git a/lxqt-config-monitor/timeoutdialog.h b/lxqt-config-monitor/timeoutdialog.h index 18611ee..c6c0601 100644 --- a/lxqt-config-monitor/timeoutdialog.h +++ b/lxqt-config-monitor/timeoutdialog.h @@ -21,26 +21,27 @@ #ifndef TIMEOUTDIALOG_H #define TIMEOUTDIALOG_H -#include #include "ui_timeoutdialog.h" +#include +#include -class QTimer; +class TimeoutDialog : public QDialog +{ + Q_OBJECT -class TimeoutDialog : public QDialog { - Q_OBJECT public: - TimeoutDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); - virtual ~TimeoutDialog(); + TimeoutDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); + virtual ~TimeoutDialog(); protected: - virtual void showEvent(QShowEvent* e); + virtual void showEvent(QShowEvent* e); private Q_SLOTS: - void onTimeout(); + void onTimeout(); private: - Ui::TimeoutDialog ui; - QTimer* timer; + Ui::TimeoutDialog ui; + QTimer timer; }; #endif // TIMEOUTDIALOG_H diff --git a/lxqt-config-monitor/timeoutdialog.ui b/lxqt-config-monitor/timeoutdialog.ui index f220e14..0d1ec14 100644 --- a/lxqt-config-monitor/timeoutdialog.ui +++ b/lxqt-config-monitor/timeoutdialog.ui @@ -6,8 +6,8 @@ 0 0 - 390 - 109 + 255 + 152
@@ -17,13 +17,6 @@ true - - - - Are the current settings OK for you? - - - @@ -37,7 +30,7 @@ - + Qt::Horizontal @@ -47,16 +40,30 @@ + + + + Are the current settings OK for you? + + + 10 + + + - - 10 + + false - - 0 + + + + + + Qt::AlignCenter - - + + 5 diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor.ts b/lxqt-config-monitor/translations/lxqt-config-monitor.ts index eadc6a7..ff4ae85 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor - + External VGA Monitor - + VGA Monitor - + External DVI Monitor - + DVI Monitor - + TV - + Default Monitor @@ -48,235 +48,194 @@ - Magnetic attraction + Keep monitors attached MonitorSettingsDialog - + Monitor Settings - - Unify all monitors - - - - - Monitor Position - - - - - Primary monitor: - - - - - Do you want to save changes? - - - - - Please, check the settings before saving. - - - - - Name + + Settings - - Name: + + Set position - - Actual + + Error - - Error + + Config can not be saved - - Config can not be saved + + Advanced settings MonitorWidget - - Turn on + + Setup - - Resolution: + + (x) - - Rate: + + (y) - - Hz + + Resolution: - - Position: + + Enable this display - - x: + + This is my primary display - - y: + + This screen extends another display - - Brightness: + + This screen clones another display - - Gamma: + + Right of... - - - : + + Left of... - - Backlight: + + Above... - - - Auto + + Below... - - - QObject - - - Auto + + Positioned manually - - Monitor Settings + + Advanced - - Quick Options + + Refresh rate: - - Settings + + Rotation: - - Save settings + + Info - - - QuickOptions - - Monitor Settings + + Display information - - Show the same screen on both laptop LCD and external monitor + + Name: %1 + - - Extended view + + Vendor: %1 + - - Turn off laptop LCD and use external monitor only - - - - - Turn off external monitor and use laptop LCD only - - - - - SaveSettings - - - Monitor Settings + + Serial: %1 + - - Save + + Display size: %1cm x %2cm + - - Saved settings + + Serial number: %1 + - - All: + + EISA device ID: %1 + - - Hardware compatible: + + None - - Rename + + Left - - Delete + + Right - - Name + + Inverted - - Name: + + %1 Hz @@ -288,12 +247,12 @@ - + Are the current settings OK for you? - + %1 second(s) remaining diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_de.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_de.ts index e9224a2..2b362ef 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_de.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_de.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Laptop-Bildschirm - + External VGA Monitor Externer VGA-Bildschirm - + VGA Monitor VGA-Bildschirm - + External DVI Monitor Externer DVI-Bildschirm - + DVI Monitor DVI-Bildschirm - + TV Fernseher - + Default Monitor Standardbildschirm @@ -48,236 +48,360 @@ + Keep monitors attached + + + Magnetic attraction - Magnetische Anziehungskraft + Magnetische Anziehungskraft MonitorSettingsDialog - + Monitor Settings Bildschirmeinstellungen - + + Settings + Einstellungen + + Unify all monitors - Alle Bildschirme gleich behandeln + Alle Bildschirme gleich behandeln - Monitor Position - Bildschirmposition + Bildschirmposition - Primary monitor: - Hauptbildschirm: + Hauptbildschirm: - Do you want to save changes? - Einstellungen sichern? + Einstellungen sichern? - Please, check the settings before saving. - Bitte Konfiguration vor dem Sichern überprüfen. + Bitte Konfiguration vor dem Sichern überprüfen. - Name - Name + Name - Name: - Name: + Name: - Actual - Aktuell + Aktuell - + + Set position + + + + Error Fehler - + Config can not be saved Konfiguration kann nicht gespeichert werden + + + Advanced settings + + MonitorWidget - Turn on - Einschalten + Einschalten - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Auflösung: - + + Enable this display + + + + + This is my primary display + + + + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + + + + + Info + + + + + Display information + + + Rate: - Bildwiederholfrequenz: + Bildwiederholfrequenz: - Hz - Hz + Hz - Position: - Position: + Position: - x: - x: + x: - y: - y: + y: - Brightness: - Helligkeit: + Helligkeit: - Gamma: - Gamma: + Gamma: - - : - : + : - Backlight: - Hintergrundbeleuchtung: + Hintergrundbeleuchtung: - - Auto - Automatisch + Automatisch + + + + Name: %1 + + + + + + Vendor: %1 + + + + + + Serial: %1 + + + + + + Display size: %1cm x %2cm + + + + + + Serial number: %1 + + + + + + EISA device ID: %1 + + + + + + None + + + + + Left + + + + + Right + + + + + Inverted + + + + + %1 Hz + QObject - - Auto - Automatisch + Automatisch - Monitor Settings - Bildschirmeinstellungen + Bildschirmeinstellungen - Quick Options - Schnellwahl + Schnellwahl - Settings - Einstellungen + Einstellungen - Save settings - Einstellungen sichern + Einstellungen sichern QuickOptions - Monitor Settings - Bildschirmeinstellungen + Bildschirmeinstellungen - Show the same screen on both laptop LCD and external monitor - Gleiches Bild auf Laptop und externem Bildschirm anzeigen + Gleiches Bild auf Laptop und externem Bildschirm anzeigen - Extended view - Erweiterter Bildschirm + Erweiterter Bildschirm - Turn off laptop LCD and use external monitor only - Laptop-Bildschirm ausschalten und nur den externen Monitor verwenden + Laptop-Bildschirm ausschalten und nur den externen Monitor verwenden - Turn off external monitor and use laptop LCD only - Externen Monitor ausschalten und nur den Laptop-Bildschirm verwenden + Externen Monitor ausschalten und nur den Laptop-Bildschirm verwenden SaveSettings - Monitor Settings - Bildschirmeinstellungen + Bildschirmeinstellungen - Save - Speichern + Speichern - Saved settings - Gespeicherte Einstellungen + Gespeicherte Einstellungen - All: - Alle: + Alle: - Hardware compatible: - Mit der Hardware kompatibel: + Mit der Hardware kompatibel: - Rename - Umbenennen + Umbenennen - Delete - Löschen + Löschen - Name - Name + Name - Name: - Name: + Name: @@ -288,12 +412,12 @@ Einstellungen wurden geändert - + Are the current settings OK for you? Sind die Einstellungen korrekt? - + %1 second(s) remaining %1 Sekunde(n) verbleiben diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_el.desktop b/lxqt-config-monitor/translations/lxqt-config-monitor_el.desktop new file mode 100644 index 0000000..b741f35 --- /dev/null +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_el.desktop @@ -0,0 +1,4 @@ +#Translations +Name[el]=Ρυθμίσεις οθόνης +GenericName[el]=Ρυθμίσεις οθόνης +Comment[el]=Διαμόρφωση οθονών diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts new file mode 100644 index 0000000..aa6a13f --- /dev/null +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts @@ -0,0 +1,425 @@ + + + + + MonitorInfo + + + Laptop LCD Monitor + Οθόνη LCD φορητού + + + + External VGA Monitor + Εξωτερική οθόνη VGA + + + + VGA Monitor + Οθόνη VGA + + + + External DVI Monitor + Εξωτερική οθόνη DVI + + + + DVI Monitor + Οθόνη DVI + + + + TV + Τηλεόραση + + + + Default Monitor + Οθόνη εξ ορισμού + + + + MonitorPictureDialog + + + Dialog + Διάλογος + + + + Keep monitors attached + + + + Magnetic attraction + Μαγνητική έλξη + + + + MonitorSettingsDialog + + + Monitor Settings + Ρυθμίσεις οθόνης + + + + Settings + Ρυθμίσεις + + + Unify all monitors + Ενοποίηση όλων των οθονών + + + Monitor Position + Θέση της οθόνης + + + Primary monitor: + Πρωτεύουσα οθόνη: + + + Do you want to save changes? + Επιθυμείτε την αποθήκευση των αλλαγών; + + + Please, check the settings before saving. + Παρακαλώ, ελέγξτε τις ρυθμίσεις πριν την αποθήκευση. + + + Name + Όνομα + + + Name: + Όνομα: + + + Actual + Τρέχον + + + + Set position + + + + + Error + Σφάλμα + + + + Config can not be saved + Δεν είναι δυνατή η αποθήκευση της διαμόρφωσης + + + + Advanced settings + + + + + MonitorWidget + + Turn on + Ενεργοποίηση + + + + Setup + + + + + (x) + + + + + (y) + + + + + Resolution: + Ανάλυση: + + + + Enable this display + + + + + This is my primary display + + + + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + + + + + Info + + + + + Display information + + + + Rate: + Ρυθμός: + + + Hz + Hz + + + Position: + Θέση: + + + x: + x: + + + y: + y: + + + Brightness: + Φωτεινότητα: + + + Gamma: + Γάμμα: + + + : + : + + + Backlight: + Οπίσθιος φωτισμός: + + + Auto + Αυτόματο + + + + Name: %1 + + + + + + Vendor: %1 + + + + + + Serial: %1 + + + + + + Display size: %1cm x %2cm + + + + + + Serial number: %1 + + + + + + EISA device ID: %1 + + + + + + None + + + + + Left + + + + + Right + + + + + Inverted + + + + + %1 Hz + + + + + QObject + + Auto + Αυτόματο + + + Monitor Settings + Ρυθμίσεις οθόνης + + + Quick Options + Γρήγορες επιλογές + + + Settings + Ρυθμίσεις + + + Save settings + Αποθήκευση ρυθμίσεων + + + + QuickOptions + + Monitor Settings + Ρυθμίσεις οθόνης + + + Show the same screen on both laptop LCD and external monitor + Εμφάνιση της ίδιας οθόνης στο LCD του φορητού και στην εξωτερική οθόνη + + + Extended view + Εκτεταμένη προβολή + + + Turn off laptop LCD and use external monitor only + Απενεργοποίηση της οθόνης LCD του φορητού και χρήση μόνον της εξωτερικής οθόνης + + + Turn off external monitor and use laptop LCD only + Απενεργοποίηση της εξωτερικής οθόνης και χρήση μόνον της οθόνης LCD του φορητού + + + + SaveSettings + + Monitor Settings + Ρυθμίσεις οθόνης + + + Save + Αποθήκευση + + + Saved settings + Αποθηκευμένες ρυθμίσεις + + + All: + Όλα: + + + Hardware compatible: + Συμβατά με το υλικό: + + + Rename + Μετονομασία + + + Delete + Διαγραφή + + + Name + Όνομα + + + Name: + Όνομα: + + + + TimeoutDialog + + + Settings are changed + Οι ρυθμίσεις τροποποιήθηκαν + + + + Are the current settings OK for you? + Οι τρέχουσες ρυθμίσεις σας ικανοποιούν; + + + + %1 second(s) remaining + Υπολείπεται %1 δευτερόλεπτο(α) + + + diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_hu.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_hu.ts index 993ae55..f1f3bf6 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_hu.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_hu.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Beépített LCD Monitor - + External VGA Monitor Külső LCD Monitor - + VGA Monitor VGA Monitor - + External DVI Monitor Külső DVI Monitor - + DVI Monitor - + TV - + Default Monitor Alapértelmezett Monitor @@ -48,14 +48,18 @@ + Keep monitors attached + + + Magnetic attraction - Mégneses elhajlás + Mégneses elhajlás MonitorSettingsDialog - + Monitor Settings Monitor beállítás @@ -80,234 +84,278 @@ Külső monor lekapcsolása és csak a belső LCD használata + Settings - beállítások + beállítások - Unify all monitors - Monitorok összevonása + Monitorok összevonása - Monitor Position - Monitor helyzet + Monitor helyzet - Primary monitor: - Elsődleges monitor: + Elsődleges monitor: - Do you want to save changes? - Változtatások mentése? + Változtatások mentése? Please, check your config before to save. Mentés előtt ellenőrizd a beállításokat! - - Please, check the settings before saving. - - - - - Name + + Set position - - Name: - - - - - Actual - - - - + Error Hiba - + Config can not be saved A beállítás mentetlen + + + Advanced settings + + MonitorWidget - Turn on - Bekapcsolás + Bekapcsolás - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Felbontás: - - Rate: - Arány: + + Enable this display + - - Hz - + + This is my primary display + - - Position: - Helyzet: + + This screen extends another display + - - x: - + + This screen clones another display + - - y: - + + Right of... + - - Brightness: - Fényerő: + + Left of... + - - Gamma: - + + Above... + - - - : - + + Below... + - - Backlight: - Háttérfény: + + Positioned manually + - - - Auto - Automata + + Advanced + - - - QObject - - - Auto - Automata + + Refresh rate: + - - Monitor Settings - Monitor beállítás + + Rotation: + - - Quick Options - Gyors lehetőségek + + Info + - - Settings - beállítások + + Display information + - - Save settings - + Rate: + Arány: - - - QuickOptions - - Monitor Settings - Monitor beállítás + Position: + Helyzet: - - Show the same screen on both laptop LCD and external monitor - Azonos kép a beépített LCD és külső monitoron + Brightness: + Fényerő: - - Extended view - Bővített megjelenítés + Backlight: + Háttérfény: - - Turn off laptop LCD and use external monitor only - Beépített LCD kikapcsolása és csak a külső használata + Auto + Automata - - Turn off external monitor and use laptop LCD only - Külső monor lekapcsolása és csak a belső LCD használata + + Name: %1 + + - - - SaveSettings - - Monitor Settings - Monitor beállítás + + Vendor: %1 + + + + + + Serial: %1 + + - - Save + + Display size: %1cm x %2cm + - - Saved settings + + Serial number: %1 + - - All: + + EISA device ID: %1 + - - Hardware compatible: + + None - - Rename + + Left - - Delete + + Right - - Name + + Inverted - - Name: + + %1 Hz + + QObject + + Auto + Automata + + + Monitor Settings + Monitor beállítás + + + Quick Options + Gyors lehetőségek + + + Settings + beállítások + + + + QuickOptions + + Monitor Settings + Monitor beállítás + + + Show the same screen on both laptop LCD and external monitor + Azonos kép a beépített LCD és külső monitoron + + + Extended view + Bővített megjelenítés + + + Turn off laptop LCD and use external monitor only + Beépített LCD kikapcsolása és csak a külső használata + + + Turn off external monitor and use laptop LCD only + Külső monor lekapcsolása és csak a belső LCD használata + + + + SaveSettings + + Monitor Settings + Monitor beállítás + + TimeoutDialog @@ -316,12 +364,12 @@ Beállítások változtatása - + Are the current settings OK for you? Jók a beállítások? - + %1 second(s) remaining %1 másodperc van hátra diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_it.desktop b/lxqt-config-monitor/translations/lxqt-config-monitor_it.desktop new file mode 100644 index 0000000..4e34f16 --- /dev/null +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_it.desktop @@ -0,0 +1,4 @@ +Name[it]=Monitor +GenericName[it]=Impostazioni dei monitor +Comment[it]=Configura la risoluzione e i monitor esterni + diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_it_IT.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_it.ts similarity index 50% rename from lxqt-config-monitor/translations/lxqt-config-monitor_it_IT.ts rename to lxqt-config-monitor/translations/lxqt-config-monitor_it.ts index e66e90b..54b8f6b 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_it_IT.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_it.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Monitor portatile LCD - + External VGA Monitor Monitor esterno VGA - + VGA Monitor Monitor VGA - + External DVI Monitor Monitor esterno DVI - + DVI Monitor Monitor DVI - + TV TV - + Default Monitor Monitor principale @@ -48,14 +48,18 @@ + Keep monitors attached + + + Magnetic attraction - Attrazione magnetica + Attrazione magnetica MonitorSettingsDialog - + Monitor Settings Impostazioni del monitor @@ -80,234 +84,278 @@ Spegni monitor esterno e usa solo monitor LCD + Settings - Impostazioni + Impostazioni - Unify all monitors - Unisci tutte le uscite + Unisci tutte le uscite - Monitor Position - Posizione dello schermo + Posizione dello schermo - Primary monitor: - Monitor principale: + Monitor principale: - Do you want to save changes? - Salvare i cambiamenti? + Salvare i cambiamenti? Please, check your config before to save. Per favore controlla la configurazione prima di salvare. - - Please, check the settings before saving. - - - - - Name + + Set position - - Name: - - - - - Actual - - - - + Error Errore - + Config can not be saved La configurazione non può essere salvata + + + Advanced settings + + MonitorWidget - Turn on - Accendi + Accendi - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Risoluzione: - - Rate: - Frequenza: + + Enable this display + - - Hz - + + This is my primary display + - - Position: - Posizione: + + This screen extends another display + - - x: - + + This screen clones another display + - - y: - + + Right of... + - - Brightness: - Luminosità: + + Left of... + - - Gamma: - + + Above... + - - - : - + + Below... + - - Backlight: - Retroilluminazione: + + Positioned manually + - - - Auto - Auto + + Advanced + - - - QObject - - - Auto - Auto + + Refresh rate: + - - Monitor Settings - Impostazioni del monitor + + Rotation: + - - Quick Options - Opzioni veloci + + Info + - - Settings - Impostazioni + + Display information + - - Save settings - + Rate: + Frequenza: - - - QuickOptions - - Monitor Settings - Impostazioni del monitor + Position: + Posizione: - - Show the same screen on both laptop LCD and external monitor - Unifica uscite + Brightness: + Luminosità: - - Extended view - Vista estesa + Backlight: + Retroilluminazione: - - Turn off laptop LCD and use external monitor only - Spegni monitor portatile LCD e usa solo monitor esterno + Auto + Auto - - Turn off external monitor and use laptop LCD only - Spegni monitor esterno e usa solo monitor LCD + + Name: %1 + + - - - SaveSettings - - Monitor Settings - Impostazioni del monitor + + Vendor: %1 + + + + + + Serial: %1 + + - - Save + + Display size: %1cm x %2cm + - - Saved settings + + Serial number: %1 + - - All: + + EISA device ID: %1 + - - Hardware compatible: + + None - - Rename + + Left - - Delete + + Right - - Name + + Inverted - - Name: + + %1 Hz + + QObject + + Auto + Auto + + + Monitor Settings + Impostazioni del monitor + + + Quick Options + Opzioni veloci + + + Settings + Impostazioni + + + + QuickOptions + + Monitor Settings + Impostazioni del monitor + + + Show the same screen on both laptop LCD and external monitor + Unifica uscite + + + Extended view + Vista estesa + + + Turn off laptop LCD and use external monitor only + Spegni monitor portatile LCD e usa solo monitor esterno + + + Turn off external monitor and use laptop LCD only + Spegni monitor esterno e usa solo monitor LCD + + + + SaveSettings + + Monitor Settings + Impostazioni del monitor + + TimeoutDialog @@ -316,12 +364,12 @@ Impostazione modificate - + Are the current settings OK for you? Mantenere questa configurazione? - + %1 second(s) remaining %1 secondi rimanenti diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_ja.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_ja.ts index aff5890..3954b37 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_ja.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_ja.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor ラップトップ液晶モニター - + External VGA Monitor 外部VGAモニター - + VGA Monitor VGAモニター - + External DVI Monitor 外部DVIモニター - + DVI Monitor DVIモニター - + TV TV - + Default Monitor デフォルトのモニター @@ -48,14 +48,14 @@ - Magnetic attraction + Keep monitors attached MonitorSettingsDialog - + Monitor Settings モニターの設定 @@ -80,232 +80,296 @@ 外部モニターを無効にし、ラップトップ液晶画面のみ使う + Settings - 設定 + 設定 - Unify all monitors - すべてのモニターの表示を共通にする + すべてのモニターの表示を共通にする - Monitor Position - モニターの位置 + モニターの位置 - Primary monitor: - プライマリーモニター: + プライマリーモニター: - Do you want to save changes? - 変更を保存しますか? + 変更を保存しますか? Please, check your config before to save. 保存する前に、設定結果を確認してください - - Please, check the settings before saving. + + Set position - - Name - - - - - Name: - - - - - Actual - - - - + Error エラー - + Config can not be saved 設定を保存することができませんでした + + + Advanced settings + + MonitorWidget - Turn on - 有効にする + 有効にする + + + + Setup + - + + (x) + + + + + (y) + + + + Resolution: 解像度: - + + Enable this display + + + + + This is my primary display + + + + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + + + + + Info + + + + + Display information + + + Rate: - リフレッシュレート: + リフレッシュレート: - Hz - Hz + Hz - Position: - 位置: + 位置: - x: - X座標: + X座標: - y: - Y座標: + Y座標: - Brightness: - 明るさ: + 明るさ: - Gamma: - ガンマ: + ガンマ: - - : - : + : - Backlight: - バックライト: + バックライト: - - Auto - 自動 + 自動 - - - QObject - - - Auto - 自動 + + Name: %1 + + - - Monitor Settings - モニターの設定 + + Vendor: %1 + + - - Quick Options - クイックオプション + + Serial: %1 + + - - Settings - 設定 + + Display size: %1cm x %2cm + + - - Save settings + + Serial number: %1 + - - - QuickOptions - - Monitor Settings - モニターの設定 + + EISA device ID: %1 + + - - Show the same screen on both laptop LCD and external monitor - ラップトップ液晶パネルと外部モニターで同じ画面を表示 + + None + - - Extended view - 拡張領域 + + Left + - - Turn off laptop LCD and use external monitor only - ラップトップ液晶画面を無効にし、外部モニターのみ使う + + Right + - - Turn off external monitor and use laptop LCD only - 外部モニターを無効にし、ラップトップ液晶画面のみ使う + + Inverted + + + + + %1 Hz + - SaveSettings + QObject + + Auto + 自動 + - Monitor Settings - モニターの設定 + モニターの設定 - - Save - + Quick Options + クイックオプション - - Saved settings - + Settings + 設定 + + + QuickOptions - - All: - + Monitor Settings + モニターの設定 - - Hardware compatible: - + Show the same screen on both laptop LCD and external monitor + ラップトップ液晶パネルと外部モニターで同じ画面を表示 - - Rename - + Extended view + 拡張領域 - - Delete - + Turn off laptop LCD and use external monitor only + ラップトップ液晶画面を無効にし、外部モニターのみ使う - - Name - + Turn off external monitor and use laptop LCD only + 外部モニターを無効にし、ラップトップ液晶画面のみ使う + + + SaveSettings - - Name: - + Monitor Settings + モニターの設定 @@ -316,12 +380,12 @@ 設定は変更されました - + Are the current settings OK for you? この設定で問題ないですか? - + %1 second(s) remaining 残り %1 秒 diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_pl_PL.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_pl_PL.ts index 2596767..33a3561 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_pl_PL.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_pl_PL.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Monitor LCD laptopa - + External VGA Monitor Zewnętrzny monitor VGA - + VGA Monitor Monitor VGA - + External DVI Monitor Zewnętrzny monitor DVI - + DVI Monitor Monitor DVI - + TV TV - + Default Monitor Domyślny monitor @@ -48,14 +48,14 @@ - Magnetic attraction + Keep monitors attached MonitorSettingsDialog - + Monitor Settings Ustawienia monitora @@ -80,232 +80,284 @@ Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa + Settings - Ustawienia + Ustawienia - - Unify all monitors + Primary monitor: + Główny monitor: + + + Do you want to save changes? + Czy chcesz zachować zmiany? + + + Please, check your config before to save. + Proszę sprawdzić konfigurację przed zapisaniem. + + + + Set position - - Monitor Position + + Error + Błąd + + + + Config can not be saved + Konfiguracja nie może być zapisana + + + + Advanced settings + + + MonitorWidget - - Primary monitor: - Główny monitor: + Turn on + Włącz - - Do you want to save changes? - Czy chcesz zachować zmiany? + + Setup + - Please, check your config before to save. - Proszę sprawdzić konfigurację przed zapisaniem. + + (x) + - - Please, check the settings before saving. + + (y) - - Name + + Resolution: + Rozdzielczość: + + + + Enable this display - - Name: + + This is my primary display - - Actual + + This screen extends another display - - Error - Błąd + + This screen clones another display + - - Config can not be saved - Konfiguracja nie może być zapisana + + Right of... + - - - MonitorWidget - - Turn on - Włącz + + Left of... + - - Resolution: - Rozdzielczość: + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + + + + + Info + + + + + Display information + - Rate: - Odświeżanie: + Odświeżanie: - Hz - Hz + Hz - Position: - Pozycja: + Pozycja: - x: - x: + x: - y: - y: + y: - Brightness: - Jasność: + Jasność: - Gamma: - Gamma: + Gamma: - - : - : + : - - Backlight: - + Auto + Auto - - - Auto - Auto + + Name: %1 + + - - - QObject - - - Auto - Auto + + Vendor: %1 + + - - Monitor Settings - Ustawienia monitora + + Serial: %1 + + - - Quick Options - Opcje + + Display size: %1cm x %2cm + + - - Settings - Ustawienia + + Serial number: %1 + + - - Save settings + + EISA device ID: %1 + - - - QuickOptions - - Monitor Settings - Ustawienia monitora + + None + - - Show the same screen on both laptop LCD and external monitor - Pokaż ten sam ekran na LCD laptopa oraz zewnętrznym monitorze + + Left + - - Extended view - Rozszerzony widok + + Right + - - Turn off laptop LCD and use external monitor only - Wyłącz LCD laptopa i użyj tylko zewnętrznego monitora + + Inverted + - - Turn off external monitor and use laptop LCD only - Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa + + %1 Hz + - SaveSettings + QObject + + Auto + Auto + - Monitor Settings - Ustawienia monitora + Ustawienia monitora - - Save - + Quick Options + Opcje - - Saved settings - + Settings + Ustawienia + + + QuickOptions - - All: - + Monitor Settings + Ustawienia monitora - - Hardware compatible: - + Show the same screen on both laptop LCD and external monitor + Pokaż ten sam ekran na LCD laptopa oraz zewnętrznym monitorze - - Rename - + Extended view + Rozszerzony widok - - Delete - + Turn off laptop LCD and use external monitor only + Wyłącz LCD laptopa i użyj tylko zewnętrznego monitora - - Name - + Turn off external monitor and use laptop LCD only + Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa + + + SaveSettings - - Name: - + Monitor Settings + Ustawienia monitora @@ -316,12 +368,12 @@ Ustawienia zostały zmienione - + Are the current settings OK for you? Czy aktualne ustawienia są prawidłowe? - + %1 second(s) remaining pozostało sekund: %1 diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_pt.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_pt.ts index 63c3a30..d554fc2 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_pt.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_pt.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Monitor LCD de portátil - + External VGA Monitor Monitor externo VGA - + VGA Monitor Monitor VGA - + External DVI Monitor Monitor externo DVI - + DVI Monitor Monitor DVI - + TV TV - + Default Monitor Monitor pré-definido @@ -48,8 +48,12 @@ + Keep monitors attached + + + Magnetic attraction - Atração magnética + Atração magnética @@ -135,7 +139,7 @@ Monitor configuration tool for LXQt. Ferramenta de configuração de monitores do LXQt. - + Monitor Settings Definições do monitor @@ -160,232 +164,296 @@ Ferramenta de configuração de monitores do LXQt. Desligar o monitor externo e utilizar o ecrã do portátil + Settings - Definições + Definições - Unify all monitors - Unificar todos os monitores + Unificar todos os monitores - Monitor Position - Posição do monitor + Posição do monitor - Primary monitor: - Monitor principal: + Monitor principal: - Do you want to save changes? - Quer guardar as alterações? + Quer guardar as alterações? Please, check your config before to save. Verifique a configuraçao antes de guardar. - - Please, check the settings before saving. - - - - - Name - - - - - Name: - - - - - Actual + + Set position - + Error Erro - + Config can not be saved Não é possível guardar a configuração + + + Advanced settings + + MonitorWidget - Turn on - Ligar + Ligar - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Resolução: - + + Enable this display + + + + + This is my primary display + + + + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + + + + + Info + + + + + Display information + + + Rate: - Taxa: + Taxa: - Hz - Hz + Hz - Position: - Posição: + Posição: - x: - x: + x: - y: - y: + y: - Brightness: - Brilho: + Brilho: - Gamma: - Gama: + Gama: - - : - : + : - Backlight: - Luz de fundo: + Luz de fundo: - - Auto - Automático + Automático - - - QObject - - - Auto - Automático + + Name: %1 + + - - Monitor Settings - Definições do monitor + + Vendor: %1 + + - - Quick Options - Opções rápidas + + Serial: %1 + + - - Settings - Definições + + Display size: %1cm x %2cm + + - - Save settings + + Serial number: %1 + - - - QuickOptions - - Monitor Settings - Definições do monitor + + EISA device ID: %1 + + - - Show the same screen on both laptop LCD and external monitor - Mostrar o mesmo ecrã no portátil e no monitor externo + + None + - - Extended view - Vista detalhada + + Left + - - Turn off laptop LCD and use external monitor only - Desligar ecrã do portátil e utilizar o monitor externo + + Right + - - Turn off external monitor and use laptop LCD only - Desligar o monitor externo e utilizar o ecrã do portátil + + Inverted + + + + + %1 Hz + - SaveSettings + QObject + + Auto + Automático + - Monitor Settings - Definições do monitor + Definições do monitor - - Save - + Quick Options + Opções rápidas - - Saved settings - + Settings + Definições + + + QuickOptions - - All: - + Monitor Settings + Definições do monitor - - Hardware compatible: - + Show the same screen on both laptop LCD and external monitor + Mostrar o mesmo ecrã no portátil e no monitor externo - - Rename - + Extended view + Vista detalhada - - Delete - + Turn off laptop LCD and use external monitor only + Desligar ecrã do portátil e utilizar o monitor externo - - Name - + Turn off external monitor and use laptop LCD only + Desligar o monitor externo e utilizar o ecrã do portátil + + + SaveSettings - - Name: - + Monitor Settings + Definições do monitor @@ -396,12 +464,12 @@ Ferramenta de configuração de monitores do LXQt. Definições alteradas - + Are the current settings OK for you? As definições estão certas para si? - + %1 second(s) remaining %1 segundo(s) em falta diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_ru.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_ru.ts index a090edc..4c12d9a 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_ru.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_ru.ts @@ -27,37 +27,37 @@ MonitorInfo - + Laptop LCD Monitor ЖК-монитор лэптопа - + External VGA Monitor Внешний VGA-монитор - + VGA Monitor VGA-монитор - + External DVI Monitor Внешний DVI-монитор - + DVI Monitor DVI-монитор - + TV ТВ - + Default Monitor Монитор по умолчанию @@ -71,240 +71,344 @@ + Keep monitors attached + + + Magnetic attraction - Магнитное притяжение + Магнитное притяжение MonitorSettingsDialog - + Monitor Settings Настройки монитора - + + Settings + Настройки + + Unify all monitors - Объединить все мониторы + Объединить все мониторы - Monitor Position - Положение монитора + Положение монитора - Primary monitor: - Первичный монитор: + Первичный монитор: Apply Применить - Do you want to save changes? - Вы хотите сохранить изменения? + Вы хотите сохранить изменения? - Please, check the settings before saving. - Проверьте, пожалуйста, настройки перед сохранением. + Проверьте, пожалуйста, настройки перед сохранением. - Name - Название + Название - Name: - Название: + Название: - Actual - Текущие + Текущие + + + + Set position + - + Error Ошибка - + Config can not be saved Не удалось сохранить конфигурацию + + + Advanced settings + + MonitorWidget - Turn on - Включить + Включить - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Разрешение: - - Rate: - Частота: + + Enable this display + - - Hz - Гц + + This is my primary display + - - Position: - Положение: + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + - - x: - + + Info + + + + + Display information + + + + Rate: + Частота: - - y: - + Hz + Гц + + + Position: + Положение: - Backlight: - Подсветка: + Подсветка: - Brightness: - Яркость: + Яркость: - Gamma: - Гамма: + Гамма: - - - : - + Auto + Авто - - - Auto - Авто + + Name: %1 + + + + + + Vendor: %1 + + + + + + Serial: %1 + + + + + + Display size: %1cm x %2cm + + + + + + Serial number: %1 + + + + + + EISA device ID: %1 + + + + + + None + + + + + Left + + + + + Right + + + + + Inverted + + + + + %1 Hz + QObject - - Auto - Авто + Авто - Monitor Settings - Настройки монитора + Настройки монитора - Quick Options - Быстрые настройки + Быстрые настройки - Settings - Настройки + Настройки - Save settings - Сохранить настройки + Сохранить настройки QuickOptions - Monitor Settings - Настройки монитора + Настройки монитора - Show the same screen on both laptop LCD and external monitor - Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа + Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа - Extended view - Расширенный вид + Расширенный вид - Turn off laptop LCD and use external monitor only - Выключить ЖК-монитор лэптопа и использовать только внешний монитор + Выключить ЖК-монитор лэптопа и использовать только внешний монитор - Turn off external monitor and use laptop LCD only - Выключить внешний монитор и использовать только ЖК-монитор лэптопа + Выключить внешний монитор и использовать только ЖК-монитор лэптопа SaveSettings - Monitor Settings - Настройки монитора + Настройки монитора - Save - Сохранить + Сохранить - Saved settings - Сохранённые настройки + Сохранённые настройки - All: - Все: + Все: - Hardware compatible: - Аппаратно-совместимые: - - - - Rename - - - - - Delete - + Аппаратно-совместимые: - Name - Название + Название - Name: - Название: + Название: @@ -315,12 +419,12 @@ Настройки изменились - + Are the current settings OK for you? Вам подходят текущие настройки? - + %1 second(s) remaining Осталось %1 секунд(ы) diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_ru_RU.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_ru_RU.ts index 5c08593..10cec65 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_ru_RU.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_ru_RU.ts @@ -27,37 +27,37 @@ MonitorInfo - + Laptop LCD Monitor ЖК-монитор лэптопа - + External VGA Monitor Внешний VGA-монитор - + VGA Monitor VGA-монитор - + External DVI Monitor Внешний DVI-монитор - + DVI Monitor DVI-монитор - + TV ТВ - + Default Monitor Монитор по умолчанию @@ -71,240 +71,344 @@ + Keep monitors attached + + + Magnetic attraction - Магнитное притяжение + Магнитное притяжение MonitorSettingsDialog - + Monitor Settings Настройки монитора - + + Settings + Настройки + + Unify all monitors - Объединить все мониторы + Объединить все мониторы - Monitor Position - Положение монитора + Положение монитора - Primary monitor: - Первичный монитор: + Первичный монитор: Apply Применить - Do you want to save changes? - Вы хотите сохранить изменения? + Вы хотите сохранить изменения? - Please, check the settings before saving. - Проверьте, пожалуйста, настройки перед сохранением. + Проверьте, пожалуйста, настройки перед сохранением. - Name - Название + Название - Name: - Название: + Название: - Actual - Текущие + Текущие + + + + Set position + - + Error Ошибка - + Config can not be saved Не удалось сохранить конфигурацию + + + Advanced settings + + MonitorWidget - Turn on - Включить + Включить - + + Setup + + + + + (x) + + + + + (y) + + + + Resolution: Разрешение: - - Rate: - Частота: + + Enable this display + - - Hz - Гц + + This is my primary display + - - Position: - Положение: + + This screen extends another display + + + + + This screen clones another display + + + + + Right of... + + + + + Left of... + + + + + Above... + + + + + Below... + + + + + Positioned manually + + + + + Advanced + + + + + Refresh rate: + + + + + Rotation: + - - x: - + + Info + + + + + Display information + + + + Rate: + Частота: - - y: - + Hz + Гц + + + Position: + Положение: - Backlight: - Подсветка: + Подсветка: - Brightness: - Яркость: + Яркость: - Gamma: - Гамма: + Гамма: - - - : - + Auto + Авто - - - Auto - Авто + + Name: %1 + + + + + + Vendor: %1 + + + + + + Serial: %1 + + + + + + Display size: %1cm x %2cm + + + + + + Serial number: %1 + + + + + + EISA device ID: %1 + + + + + + None + + + + + Left + + + + + Right + + + + + Inverted + + + + + %1 Hz + QObject - - Auto - Авто + Авто - Monitor Settings - Настройки монитора + Настройки монитора - Quick Options - Быстрые настройки + Быстрые настройки - Settings - Настройки + Настройки - Save settings - Сохранить настройки + Сохранить настройки QuickOptions - Monitor Settings - Настройки монитора + Настройки монитора - Show the same screen on both laptop LCD and external monitor - Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа + Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа - Extended view - Расширенный вид + Расширенный вид - Turn off laptop LCD and use external monitor only - Выключить ЖК-монитор лэптопа и использовать только внешний монитор + Выключить ЖК-монитор лэптопа и использовать только внешний монитор - Turn off external monitor and use laptop LCD only - Выключить внешний монитор и использовать только ЖК-монитор лэптопа + Выключить внешний монитор и использовать только ЖК-монитор лэптопа SaveSettings - Monitor Settings - Настройки монитора + Настройки монитора - Save - Сохранить + Сохранить - Saved settings - Сохранённые настройки + Сохранённые настройки - All: - Все: + Все: - Hardware compatible: - Аппаратно-совместимые: - - - - Rename - - - - - Delete - + Аппаратно-совместимые: - Name - Название + Название - Name: - Название: + Название: @@ -315,12 +419,12 @@ Настройки изменились - + Are the current settings OK for you? Вам подходят текущие настройки? - + %1 second(s) remaining Осталось %1 секунд(ы) diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_zh_TW.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_zh_TW.ts index 103845a..e59aae0 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_zh_TW.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_zh_TW.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor 筆記型電腦液晶螢幕 - + External VGA Monitor 外接VGA螢幕 - + VGA Monitor VGA 螢幕 - + External DVI Monitor 外接 DVI 螢幕 - + DVI Monitor DVI 螢幕 - + TV 電視 - + Default Monitor 預設螢幕 @@ -48,7 +48,7 @@ - Magnetic attraction + Keep monitors attached @@ -113,229 +113,199 @@ Monitor configuration tool for LXQt. LXQt-config-monitor 螢幕設定工具 - + Monitor Settings - - Unify all monitors - - - - - Monitor Position - - - - - Primary monitor: - - - - - Do you want to save changes? - - - - - Please, check the settings before saving. - - - - - Name + + Settings - - Name: + + Set position - - Actual + + Error - - Error + + Config can not be saved - - Config can not be saved + + Advanced settings MonitorWidget - - Turn on + + Setup - - Resolution: + + (x) - - Rate: + + (y) - - Hz + + Resolution: - - Position: + + Enable this display - - x: + + This is my primary display - - y: + + This screen extends another display - - Brightness: + + This screen clones another display - - Gamma: + + Right of... - - - : + + Left of... - - Backlight: + + Above... - - - Auto - 自動 + + Below... + - - - QObject - - - Auto - 自動 + + Positioned manually + - - Monitor Settings + + Advanced - - Quick Options + + Refresh rate: - - Settings + + Rotation: - - Save settings + + Info - - - QuickOptions - - Monitor Settings + + Display information - - Show the same screen on both laptop LCD and external monitor - + Auto + 自動 - - Extended view + + Name: %1 + - - Turn off laptop LCD and use external monitor only + + Vendor: %1 + - - Turn off external monitor and use laptop LCD only + + Serial: %1 + - - - SaveSettings - - Monitor Settings + + Display size: %1cm x %2cm + - - Save + + Serial number: %1 + - - Saved settings + + EISA device ID: %1 + - - All: + + None - - Hardware compatible: + + Left - - Rename + + Right - - Delete + + Inverted - - Name + + %1 Hz + + + QObject - - Name: - + Auto + 自動 @@ -346,12 +316,12 @@ Monitor configuration tool for LXQt. - + Are the current settings OK for you? - + %1 second(s) remaining diff --git a/lxqt-config-monitor/xrandr.cpp b/lxqt-config-monitor/xrandr.cpp deleted file mode 100644 index c7558cc..0000000 --- a/lxqt-config-monitor/xrandr.cpp +++ /dev/null @@ -1,325 +0,0 @@ -/* - Copyright (C) 2014 P.L. Lucas - Copyright (C) 2014 Hong Jen Yee (PCMan) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#include "xrandr.h" -#include -#include -#include -#include -#include -#include - -static QByteArray indentString(QByteArray line) { - QByteArray s; - int length = line.size(); - char ch; - for(int indent=0; indent < length; indent++ ) { - ch = line[indent]; - if( ch == ' ' || ch == '\t' ) - s.append(ch); - else - break; - } - return s; -} - -static int indentLevel(QByteArray line) { - int indent = 0; - while(indent < line.size() && ( line[indent] == ' ' || line[indent] == '\t' ) ) - ++indent; - return indent; -} - -static int countLeadingWhiteSpaces(QByteArray line) { - int indent = 0; - while(indent < line.size() && ( line[indent] == ' ') ) - ++indent; - return indent; -} - -// new parsing code using xrandr --verbose -QList XRandRBackend::getMonitorsInfo() { - QList monitors; - // execute xrandr command and read its output - QProcess process; - // set locale to "C" guarantee English output of xrandr - process.processEnvironment().insert("LC_ALL", "c"); - process.start("xrandr --verbose"); - //process.start("cat pruebas.txt"); - process.waitForFinished(-1); - if(process.exitCode() != 0) - return monitors; - QList lines = process.readAllStandardOutput().split('\n'); - // start parsing the output - QRegExp regMonitorLine("([\\w-]+) +connected +(primary)? *(\\d+x\\d+\\+(\\d+)\\+(\\d+))?.*"); - QRegExp regModeLine("\\s+(\\d+x\\d+).*"); - QRegExp regRateLine("\\s+([vh]):.* clock\\s+([\\d.]+).?Hz.*"); - QRegExp regKeyValue("\\s*(\\w[\\w ]*)\\s*:\\s*(\\S.*)?"); - QRegExp regWidthLine("\\s+h:\\s+width\\s+([\\d.]+).*"); - QRegExp regHeightLine("\\s+v:\\s+height\\s+([\\d.]+).*"); - - bool hasError = false; - MonitorInfo* monitor = NULL; - QList::iterator it = lines.begin(); - bool readingModes = false; - // currently, we only support one X screen, that is screen 0 - while(it != lines.end() && !hasError) { - QByteArray& line = *it; - if(!monitor) { - if(regMonitorLine.exactMatch(line)) { - // format: VGA-0 connected 1280x1024+1024+0 (0x55) normal... - monitor = new MonitorInfo(); - monitor->name = regMonitorLine.cap(1); - if(regMonitorLine.cap(2) == "primary") { // is primary monitor - monitor->primaryOk = true; - } - if(!regMonitorLine.cap(3).isEmpty()) // mode+xpos+ypos - monitor->enabledOk = true; - monitor->xPos = regMonitorLine.cap(4).toInt(); - monitor->yPos = regMonitorLine.cap(5).toInt(); - if( monitor->xPos!=0 || monitor->yPos!=0 ) { - monitor->position = MonitorSettings::Manual; - } - } - } - else { // reading properties of this monitor - if( regModeLine.exactMatch(line) || countLeadingWhiteSpaces(line)==2 ) { // this is a mode line - // sample: 1280x1024 (0x55) 108.000MHz +HSync +VSync *current +preferred - readingModes = true; - // Mode name - // QString mode = regModeLine.cap(1); - QString mode = line.mid(0,line.lastIndexOf('(')).trimmed(); - QString rate; - int width = -1; - int height = -1; - bool isCurrent = line.contains("current"); - bool isPreferred = line.contains("preferred"); - ++it; - while(it != lines.end()) { - line = *it; - if(regWidthLine.exactMatch(line)) { - width = regWidthLine.cap(1).toInt(); - } - if(regHeightLine.exactMatch(line)) { - height = regHeightLine.cap(1).toInt(); - } - if(regRateLine.exactMatch(line)) { - // sample: - // h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz - // v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz - if(regRateLine.cap(1) == QLatin1String("v")) - rate = regRateLine.cap(2); - ++it; - } - else { - --it; - break; // rate lines ended for this mode - } - } - if(!mode.isEmpty() && !rate.isEmpty()) { - if(!monitor->modes.contains(mode)) { - monitor->modes.append(mode); - monitor->monitorModes[mode] = new MonitorMode(mode, this); - } - monitor->monitorModes[mode]->modeLines.append(rate); - monitor->monitorModes[mode]->width = width; - monitor->monitorModes[mode]->height = height; - if(isPreferred) { - monitor->preferredMode = mode; - monitor->preferredRate = rate; - } - if(isCurrent) { - monitor->currentMode = mode; - monitor->currentRate = rate; - } - } - } - else { // this is not a mode line, read other properties - if(readingModes) { - // mode lines ended, so the whole monitor info is read - qDebug() << "Reading modes end"; - monitors.append(monitor); - monitor = NULL; - readingModes = false; - continue; - } - - if(regKeyValue.exactMatch(line)) { // format: : - QString key = regKeyValue.cap(1); - QString value = regKeyValue.cap(2); - QByteArray lineStringStart = indentString(line); - int propertyIndentLevel = indentLevel(line); - ++it; - while( it != lines.end() ) { - QByteArray& line = *it; - int actualIndentLevel = indentLevel(line); - if( actualIndentLevel>propertyIndentLevel && line.startsWith(lineStringStart) ) { - value += "\n" + line.trimmed(); - ++it; - } else - break; - } - qDebug() << key << "=" << value; - if(key == "Gamma") { - monitor->gamma = value; - } - else if(key == "Brightness") { - monitor->brightness = value; - } - else if(key == "EDID") { - monitor->edid = value ; - // Get vendor - QString hex = value.replace("\n","").replace(" ","").toLower(); - int vendorPosStart = hex.indexOf("fc00"); - if(vendorPosStart>0) { - int vendorPosEnd = hex.indexOf("00", vendorPosStart+4); - QString vendorHex = hex.mid(vendorPosStart+4, vendorPosEnd-vendorPosStart-4); - QByteArray vendor; - //vendor = QByteArray::fromHex(vendorHex.toLocal8Bit()).trimmed(); - //qDebug() << "VendorHex:" << vendorHex << "Vendor" << vendor ; - // QByteArray::fromHex sometimes fails. This a trick - vendor=""; - for(int i=1; ivendor = vendor; - } - } - else if(key == "Backlight") { - QRegExp rx("(\\d+)"); - QStringList list; - int pos = 0; - while ((pos = rx.indexIn(value, pos)) != -1) { - list << rx.cap(1); - pos += rx.matchedLength(); - } - if(list.length()==3) { - monitor->backlight=list[0]; - monitor->backlightMin=list[1]; - monitor->backlightMax=list[2]; - } - } - continue; - } // End format: : - else { // this line is not key:value - } - } - } - if( it != lines.end() ) ++it; - } - - if(monitor) // this should not happen unless a parsing error happens - delete monitor; - - return monitors; -} - - - -bool XRandRBackend::setMonitorsSettings(const QList monitors) { - QString cmd = getCommand(monitors); - qDebug() << cmd; - // return true; - QProcess process; - process.start(cmd); - process.waitForFinished(); - return process.exitCode() == 0; -} - - - - -QString XRandRBackend::getCommand(const QList monitors) { - - QByteArray cmd = "xrandr"; - - int fb_width = 0, fb_height = 0; - - QList monitorInfos = getMonitorsInfo(); - - foreach(MonitorSettings * monitor, monitors) { - foreach(MonitorInfo * info, monitorInfos) { - if(monitor->name == info->name) { - int width = info->monitorModes[monitor->currentMode]->width; - int height = info->monitorModes[monitor->currentMode]->height; - int xPos = 0; - int yPos = 0; - if(monitor->position == MonitorSettings::Manual) { - xPos = monitor->xPos; - yPos = monitor->yPos; - } - width+=xPos; - height+=yPos; - qDebug() << "[XRandRBackend::getCommand]: " << width << "x" << height << "+" << monitor->xPos << "x" << monitor->yPos; - if(width>fb_width) - fb_width = width; - if(height>fb_height) - fb_height = height; - } - } - } - - cmd.append(QString(" --fb %1x%2").arg(fb_width).arg(fb_height)); - - foreach(MonitorSettings * monitor, monitors) { - cmd += " --output "; - cmd.append(monitor->name); - cmd.append(' '); - - // if the monitor is turned on - if(monitor->enabledOk) { - QString sel_res = monitor->currentMode; - QString sel_rate = monitor->currentRate; - - if(sel_res == QObject::tr("Auto")) // auto resolution - cmd.append("--auto"); - else { - cmd.append("--mode \""); - cmd.append(sel_res); - cmd.append('"'); - if(sel_rate != QObject::tr("Auto")) { // not auto refresh rate - cmd.append(" --rate "); - cmd.append(sel_rate); - } - } - if(monitor->position == MonitorSettings::Manual) { // Manual position - cmd.append(QString(" --pos %1x%2").arg(monitor->xPos).arg(monitor->yPos)); - } else // Unify output - cmd.append(QString(" --pos 0x0")); - if(monitor->primaryOk) - cmd.append(" --primary"); - cmd.append(" --brightness "); - cmd.append(monitor->brightness); - cmd.append(" --gamma "); - cmd.append(monitor->gamma); - if( !monitor->backlight.isEmpty() ) { - cmd.append(" --set Backlight "); - cmd.append(monitor->backlight); - } - } - else // turn off - cmd.append("--off"); - } - - - qDebug() << "cmd:" << cmd; - return cmd; -} - diff --git a/lxqt-config.kdev4 b/lxqt-config.kdev4 new file mode 100644 index 0000000..30a251d --- /dev/null +++ b/lxqt-config.kdev4 @@ -0,0 +1,3 @@ +[Project] +Manager=KDevCMakeManager +Name=lxqt-config diff --git a/man/lxqt-config.1 b/man/lxqt-config.1 index 1457602..69a9de2 100644 --- a/man/lxqt-config.1 +++ b/man/lxqt-config.1 @@ -39,20 +39,20 @@ All of this also can be find in Settings or Preferences menu, please consult the .SH "REPORTING BUGS" Report bugs to https://github.com/lxde/lxqt/issues .SH "SEE ALSO" -\fBLXQt\fR it has been tailored for users who value simplicity, speed, and +\fBLXQt\fR has been tailored for users who value simplicity, speed, and an intuitive interface. LXQt is also intended for less powerful machines. See: .\" any module must refers to session app, for more info on start it .P - * Mouse settings: \fBlxqt-config-mouse.1\fR + * Mouse settings: \fBlxqt-config-mouse(1)\fR .P - * Desktop settings: \fBlxqt-config-desktop.1\fR + * Desktop settings: \fBlxqt-config-desktop(1)\fR .P - * Appeareance settings: \fBlxqt-config-appearance.1\fR + * Appeareance settings: \fBlxqt-config-appearance(1)\fR .P - * Session settings: \fBlxqt-config-session.1\fR + * Session settings: \fBlxqt-config-session(1)\fR .P - * Notification settings: \fBlxqt-config-notificationd.1\fR + * Notification settings: \fBlxqt-config-notificationd(1)\fR .P .SH AUTHOR This manual page was created by \fBPICCORO Lenz McKAY\fR \fI\fR diff --git a/src/lxqt-config.desktop.in b/src/lxqt-config.desktop.in index 095dfe6..e36dd86 100644 --- a/src/lxqt-config.desktop.in +++ b/src/lxqt-config.desktop.in @@ -6,6 +6,6 @@ Comment=Configure your system Exec=lxqt-config Icon=preferences-system Categories=Settings;DesktopSettings;Qt;LXQt; -OnlyShowIn=LXDE;LXQt; +OnlyShowIn=LXQt; #TRANSLATIONS_DIR=translations diff --git a/src/main.cpp b/src/main.cpp index 215d373..0996b85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,12 +31,12 @@ int main(int argc, char **argv) { - LxQt::SingleApplication app(argc, argv); + LXQt::SingleApplication app(argc, argv); // ensure that we use lxqt-config.menu file. qputenv("XDG_MENU_PREFIX", "lxqt-"); - LxQtConfig::MainWindow w; + LXQtConfig::MainWindow w; app.setActivationWindow(&w); w.show(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 288e9ee..4cc66bf 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -43,7 +43,7 @@ #include "qcategorydrawer.h" #include "qcategorizedsortfilterproxymodel.h" -namespace LxQtConfig { +namespace LXQtConfig { struct ConfigPaneData: public QSharedData { @@ -193,7 +193,7 @@ private: }; -LxQtConfig::MainWindow::MainWindow() : QMainWindow() +LXQtConfig::MainWindow::MainWindow() : QMainWindow() { setupUi(this); @@ -216,7 +216,7 @@ LxQtConfig::MainWindow::MainWindow() : QMainWindow() QTimer::singleShot(1, this, SLOT(load())); } -bool LxQtConfig::MainWindow::event(QEvent* event) +bool LXQtConfig::MainWindow::event(QEvent* event) { // LXQt's Qt5 plugin sends a ThemeChange event if (event->type() == QEvent::ThemeChange) @@ -243,7 +243,7 @@ bool LxQtConfig::MainWindow::event(QEvent* event) return QMainWindow::event(event); } -void LxQtConfig::MainWindow::load() +void LXQtConfig::MainWindow::load() { QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); @@ -257,7 +257,7 @@ void LxQtConfig::MainWindow::load() QApplication::restoreOverrideCursor(); } -void LxQtConfig::MainWindow::activateItem(const QModelIndex &index) +void LXQtConfig::MainWindow::activateItem(const QModelIndex &index) { if (!index.isValid()) return; diff --git a/src/mainwindow.h b/src/mainwindow.h index eb79265..e8952ee 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -35,7 +35,7 @@ class QCategorizedSortFilterProxyModel; -namespace LxQtConfig { +namespace LXQtConfig { class ConfigPaneModel; diff --git a/src/translations/lxqt-config_el.desktop b/src/translations/lxqt-config_el.desktop new file mode 100644 index 0000000..03f7713 --- /dev/null +++ b/src/translations/lxqt-config_el.desktop @@ -0,0 +1,5 @@ +# Translations +Name[el]=Κέντρο διαμόρφωσης LXQt +GenericName[el]=Ρυθμίσεις συστήματος +Comment[el]=Διαμόρφωση του συστήματος + diff --git a/src/translations/lxqt-config_el_GR.ts b/src/translations/lxqt-config_el.ts similarity index 89% rename from src/translations/lxqt-config_el_GR.ts rename to src/translations/lxqt-config_el.ts index a6ebb62..295bb89 100644 --- a/src/translations/lxqt-config_el_GR.ts +++ b/src/translations/lxqt-config_el.ts @@ -1,6 +1,6 @@ - + MainWindow diff --git a/src/translations/lxqt-config_el_GR.desktop b/src/translations/lxqt-config_el_GR.desktop deleted file mode 100644 index d44cfb6..0000000 --- a/src/translations/lxqt-config_el_GR.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[el_GR]=Διαμόρφωση αρθρωμάτων LXQt -GenericName[el_GR]=Διαμόρφωση LXQt -Name[el_GR]=Κέντρο διαμόρφωσης LXQt diff --git a/src/translations/lxqt-config_it_IT.ts b/src/translations/lxqt-config_it.ts similarity index 100% rename from src/translations/lxqt-config_it_IT.ts rename to src/translations/lxqt-config_it.ts diff --git a/src/translations/lxqt-config_it_IT.desktop b/src/translations/lxqt-config_it_IT.desktop deleted file mode 100644 index 054e9c5..0000000 --- a/src/translations/lxqt-config_it_IT.desktop +++ /dev/null @@ -1,4 +0,0 @@ -# Translations -Comment[it_IT]=Configura i moduli di LXQt -GenericName[it_IT]=Configurazione di LXQt -Name[it_IT]=Centro di configurazione di LXQt