From d944a7d80cb8f0050154f4a4d3755effc8272aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangZhuo=20Chen=20=28=E9=99=B3=E6=98=8C=E5=80=AC=29?= Date: Tue, 10 Nov 2015 12:13:54 +0800 Subject: [PATCH] Imported Upstream version 0.10.0 --- .gitignore | 1 + AUTHORS | 2 +- COPYING => LICENSE | 41 +- .../translations/lxqt-config-cursor_el.ts | 4 +- .../translations/lxqt-config-appearance.ts | 12 +- .../translations/lxqt-config-appearance_ar.ts | 21 +- .../translations/lxqt-config-appearance_cs.ts | 21 +- .../lxqt-config-appearance_cs_CZ.ts | 21 +- .../translations/lxqt-config-appearance_da.ts | 21 +- .../lxqt-config-appearance_da_DK.ts | 21 +- .../translations/lxqt-config-appearance_de.ts | 12 +- .../translations/lxqt-config-appearance_el.ts | 19 +- .../translations/lxqt-config-appearance_eo.ts | 21 +- .../translations/lxqt-config-appearance_es.ts | 21 +- .../lxqt-config-appearance_es_VE.ts | 21 +- .../translations/lxqt-config-appearance_eu.ts | 21 +- .../translations/lxqt-config-appearance_fi.ts | 21 +- .../lxqt-config-appearance_fr_FR.ts | 21 +- .../translations/lxqt-config-appearance_hu.ts | 19 +- .../lxqt-config-appearance_hu_HU.ts | 12 +- .../translations/lxqt-config-appearance_ia.ts | 12 +- .../lxqt-config-appearance_id_ID.ts | 12 +- .../translations/lxqt-config-appearance_it.ts | 12 +- .../translations/lxqt-config-appearance_ja.ts | 12 +- .../translations/lxqt-config-appearance_ko.ts | 12 +- .../translations/lxqt-config-appearance_lt.ts | 21 +- .../translations/lxqt-config-appearance_nl.ts | 21 +- .../translations/lxqt-config-appearance_pl.ts | 12 +- .../lxqt-config-appearance_pl_PL.ts | 19 +- .../translations/lxqt-config-appearance_pt.ts | 21 +- .../lxqt-config-appearance_pt_BR.ts | 21 +- .../lxqt-config-appearance_ro_RO.ts | 21 +- .../translations/lxqt-config-appearance_ru.ts | 12 +- .../lxqt-config-appearance_ru_RU.ts | 12 +- .../lxqt-config-appearance_sk_SK.ts | 12 +- .../translations/lxqt-config-appearance_sl.ts | 21 +- .../lxqt-config-appearance_sr@latin.ts | 12 +- .../lxqt-config-appearance_sr_BA.ts | 12 +- .../lxqt-config-appearance_sr_RS.ts | 12 +- .../lxqt-config-appearance_th_TH.ts | 21 +- .../translations/lxqt-config-appearance_tr.ts | 21 +- .../translations/lxqt-config-appearance_uk.ts | 21 +- .../lxqt-config-appearance_zh_CN.ts | 21 +- .../lxqt-config-appearance_zh_TW.ts | 21 +- .../translations/lxqt-config-input.ts | 5 + .../translations/lxqt-config-input_af.ts | 5 + .../translations/lxqt-config-input_ar.ts | 5 + .../translations/lxqt-config-input_bg.ts | 5 + .../translations/lxqt-config-input_bn.ts | 5 + .../translations/lxqt-config-input_bn_IN.ts | 5 + .../translations/lxqt-config-input_ca.ts | 5 + .../translations/lxqt-config-input_cs.ts | 5 + .../translations/lxqt-config-input_da.ts | 5 + .../translations/lxqt-config-input_de.ts | 5 + .../translations/lxqt-config-input_el.ts | 5 + .../translations/lxqt-config-input_es.ts | 5 + .../translations/lxqt-config-input_eu.ts | 5 + .../translations/lxqt-config-input_fi.ts | 5 + .../translations/lxqt-config-input_fr.ts | 5 + .../translations/lxqt-config-input_gl.ts | 5 + .../translations/lxqt-config-input_hr.ts | 5 + .../translations/lxqt-config-input_hu.ts | 5 + .../translations/lxqt-config-input_id.ts | 5 + .../translations/lxqt-config-input_is.ts | 5 + .../translations/lxqt-config-input_it.ts | 5 + .../translations/lxqt-config-input_ja.ts | 5 + .../translations/lxqt-config-input_nl.ts | 5 + .../translations/lxqt-config-input_pa.ts | 5 + .../translations/lxqt-config-input_pl.ts | 5 + .../translations/lxqt-config-input_pt.ts | 5 + .../translations/lxqt-config-input_ru.ts | 5 + .../translations/lxqt-config-input_ru_RU.ts | 5 + .../translations/lxqt-config-input_sv.ts | 5 + .../translations/lxqt-config-input_uk.ts | 5 + .../translations/lxqt-config-input_zh_CN.ts | 5 + .../translations/lxqt-config-input_zh_HK.ts | 5 + .../translations/lxqt-config-input_zh_TW.ts | 5 + lxqt-config-locale/main.cpp | 4 +- .../translations/lxqt-config-locale.ts | 12 +- lxqt-config-monitor/CMakeLists.txt | 61 +- lxqt-config-monitor/README.md | 2 +- lxqt-config-monitor/icons/extended.svg | 557 ------------------ .../icons/monitor1offmonitor2on.svg | 543 ----------------- .../icons/monitor1onmonitor2ff.svg | 543 ----------------- lxqt-config-monitor/icons/unified.svg | 557 ------------------ lxqt-config-monitor/info-for-developers.txt | 34 -- lxqt-config-monitor/loadsettings.cpp | 89 +++ .../{xrandr.h => loadsettings.h} | 32 +- lxqt-config-monitor/main.cpp | 82 ++- lxqt-config-monitor/mainwindow.ui | 123 ---- lxqt-config-monitor/monitor.cpp | 78 +-- lxqt-config-monitor/monitor.h | 87 ++- lxqt-config-monitor/monitorpicture.cpp | 514 +++++++++------- lxqt-config-monitor/monitorpicture.h | 70 ++- lxqt-config-monitor/monitorpicture.ui | 47 +- lxqt-config-monitor/monitorsettingsdialog.cpp | 417 +++++-------- lxqt-config-monitor/monitorsettingsdialog.h | 74 +-- lxqt-config-monitor/monitorsettingsdialog.ui | 136 +++++ lxqt-config-monitor/monitorwidget.cpp | 449 ++++++++++---- lxqt-config-monitor/monitorwidget.h | 50 +- lxqt-config-monitor/monitorwidget.ui | 430 ++++++++------ lxqt-config-monitor/quickoptions.cpp | 39 -- lxqt-config-monitor/quickoptions.ui | 107 ---- .../{ => resources}/configure.in | 0 .../lxqt-config-monitor.desktop.in | 0 .../{ => resources}/magnetic_attraction.html | 0 lxqt-config-monitor/savesettings.h | 55 -- lxqt-config-monitor/savesettings.ui | 93 --- .../{main.h => settingsdialog.cpp} | 15 +- .../{quickoptions.h => settingsdialog.h} | 23 +- lxqt-config-monitor/timeoutdialog.cpp | 57 +- lxqt-config-monitor/timeoutdialog.h | 21 +- lxqt-config-monitor/timeoutdialog.ui | 39 +- .../translations/lxqt-config-monitor.ts | 211 +++---- .../translations/lxqt-config-monitor_de.ts | 310 +++++++--- .../translations/lxqt-config-monitor_el.ts | 310 +++++++--- .../translations/lxqt-config-monitor_hu.ts | 314 +++++----- .../translations/lxqt-config-monitor_it.ts | 314 +++++----- .../translations/lxqt-config-monitor_ja.ts | 318 ++++++---- .../translations/lxqt-config-monitor_pl_PL.ts | 320 +++++----- .../translations/lxqt-config-monitor_pt.ts | 322 ++++++---- .../translations/lxqt-config-monitor_ru.ts | 316 ++++++---- .../translations/lxqt-config-monitor_ru_RU.ts | 316 ++++++---- .../translations/lxqt-config-monitor_zh_TW.ts | 218 +++---- lxqt-config-monitor/xrandr.cpp | 325 ---------- lxqt-config.kdev4 | 3 + 126 files changed, 4041 insertions(+), 5908 deletions(-) create mode 100644 .gitignore rename COPYING => LICENSE (96%) delete mode 100644 lxqt-config-monitor/icons/extended.svg delete mode 100644 lxqt-config-monitor/icons/monitor1offmonitor2on.svg delete mode 100644 lxqt-config-monitor/icons/monitor1onmonitor2ff.svg delete mode 100644 lxqt-config-monitor/icons/unified.svg delete mode 100644 lxqt-config-monitor/info-for-developers.txt create mode 100644 lxqt-config-monitor/loadsettings.cpp rename lxqt-config-monitor/{xrandr.h => loadsettings.h} (62%) delete mode 100644 lxqt-config-monitor/mainwindow.ui create mode 100644 lxqt-config-monitor/monitorsettingsdialog.ui delete mode 100644 lxqt-config-monitor/quickoptions.cpp delete mode 100644 lxqt-config-monitor/quickoptions.ui rename lxqt-config-monitor/{ => resources}/configure.in (100%) rename lxqt-config-monitor/{ => resources}/lxqt-config-monitor.desktop.in (100%) rename lxqt-config-monitor/{ => resources}/magnetic_attraction.html (100%) delete mode 100644 lxqt-config-monitor/savesettings.h delete mode 100644 lxqt-config-monitor/savesettings.ui rename lxqt-config-monitor/{main.h => settingsdialog.cpp} (58%) rename lxqt-config-monitor/{quickoptions.h => settingsdialog.h} (69%) delete mode 100644 lxqt-config-monitor/xrandr.cpp create mode 100644 lxqt-config.kdev4 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 9faf52e..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, GPL 3, LGPL-2, LGPL-2.1 and WTFPL 2. 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/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts b/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts index c2f2d12..31fb306 100644 --- a/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts +++ b/liblxqt-config-cursor/translations/lxqt-config-cursor_el.ts @@ -20,7 +20,7 @@ &Set Theme - Ε&πιλογή θέματος + Ε&πιλογή θέματος @@ -29,7 +29,7 @@ &Close - &Κλείσιμο + &Κλείσιμο diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance.ts b/lxqt-config-appearance/translations/lxqt-config-appearance.ts index 0af7072..015ec70 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance.ts @@ -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 b616ae7..d425ad4 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ar.ts @@ -138,50 +138,43 @@ نماذج اﻷيقونات - - 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.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts index 6e3df31..865bbab 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_cs.ts @@ -138,50 +138,43 @@ Téma ikon - - 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 7450526..6132069 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_cs_CZ.ts @@ -138,50 +138,43 @@ Téma ikon - - 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 489c02e..3b8bd23 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_da.ts @@ -138,50 +138,43 @@ Ikontema - - 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 24a770b..c347fe3 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_da_DK.ts @@ -138,50 +138,43 @@ Ikontema - - 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 5d33af3..724356a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_de.ts @@ -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.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_el.ts index 334f3a7..d3f092f 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_el.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_el.ts @@ -138,13 +138,6 @@ Θέμα εικονιδίων - - LXQtThemeConfig - - LXQt Theme - Θέμα του LXQt - - LXQtThemeConfig @@ -156,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_eo.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts index f6f9de9..7098e54 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_eo.ts @@ -138,50 +138,43 @@ Etoso de piktogramoj - - 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 7496fee..bbae1b3 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_es.ts @@ -138,50 +138,43 @@ Tema de iconos - - 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 647bb7f..88d31fc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_es_VE.ts @@ -138,50 +138,43 @@ Tema de iconos - - 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 f8a6136..4eb61c8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_eu.ts @@ -138,50 +138,43 @@ Ikonoen gaia - - 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 ca63948..98a2440 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_fi.ts @@ -138,50 +138,43 @@ Kuvaketeema - - 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 96f658d..9f5b669 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_fr_FR.ts @@ -138,50 +138,43 @@ Thème d'icones - - 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 be98832..21d6d06 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_hu.ts @@ -138,13 +138,6 @@ Ikontéma - - LXQtThemeConfig - - LXQt Theme - LXQt téma - - LXQtThemeConfig @@ -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 3d1ff16..36349ad 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_hu_HU.ts @@ -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 520795a..776fd96 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ia.ts @@ -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 f2c6509..4594b4c 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_id_ID.ts @@ -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.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts index 6b08f2f..efd963a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_it.ts @@ -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_ja.ts b/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts index 474191a..616d9dc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ja.ts @@ -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 c833eba..e3ffdf8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ko.ts @@ -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 ccabf43..e654729 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_lt.ts @@ -138,50 +138,43 @@ Piktogramų tema - - 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 f353422..d8a2db5 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_nl.ts @@ -138,50 +138,43 @@ Pictogram Thema - - 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 48cc0be..1ca19a5 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pl.ts @@ -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 65599fe..aced0c8 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.ts @@ -138,13 +138,6 @@ Motyw ikon - - LXQtThemeConfig - - LXQt Theme - Motyw LXQt - - LXQtThemeConfig @@ -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 393a602..cf36627 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pt.ts @@ -138,50 +138,43 @@ Tema de ícones - - 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 e6d4cb7..620b534 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pt_BR.ts @@ -138,50 +138,43 @@ Tema de ícones - - 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 9b0216e..150879e 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ro_RO.ts @@ -138,50 +138,43 @@ Temă pictograme - - 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 a08b0ea..a573297 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ru.ts @@ -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 a08b0ea..a573297 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_ru_RU.ts @@ -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 113794e..d06da10 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sk_SK.ts @@ -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 e19c098..f2a0f80 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sl.ts @@ -138,50 +138,43 @@ Tema ikon - - 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 7721446..0bc7384 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr@latin.ts @@ -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 e04db1e..09800d1 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_BA.ts @@ -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 d96dfba..f43e97a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_sr_RS.ts @@ -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 ad5dd0b..d0a5a7f 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_th_TH.ts @@ -138,50 +138,43 @@ ชุดตกแต่งไอคอน - - 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 eac993b..d5a9418 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_tr.ts @@ -138,50 +138,43 @@ Simge Teması - - 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 7222f6c..fc4880a 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_uk.ts @@ -138,50 +138,43 @@ Тема значків - - 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 1a70b57..68272fc 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_CN.ts @@ -138,50 +138,43 @@ 图标主题 - - 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 600c687..a685000 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_zh_TW.ts @@ -138,50 +138,43 @@ 圖示主題 - - 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-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.ts b/lxqt-config-input/translations/lxqt-config-input_el.ts index 4731e02..06b0d1c 100644 --- a/lxqt-config-input/translations/lxqt-config-input_el.ts +++ b/lxqt-config-input/translations/lxqt-config-input_el.ts @@ -66,6 +66,11 @@ 0 0 + + + Turn on NumLock after login + + KeyboardLayoutConfig 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.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/main.cpp b/lxqt-config-locale/main.cpp index 80fc396..e4373be 100644 --- a/lxqt-config-locale/main.cpp +++ b/lxqt-config-locale/main.cpp @@ -33,8 +33,8 @@ int main (int argc, char **argv) { LXQt::SingleApplication app(argc, argv); - LXQt::Settings settings("LXQt-config-locale"); - LXQt::Settings session_settings("LXQt-session"); + 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); diff --git a/lxqt-config-locale/translations/lxqt-config-locale.ts b/lxqt-config-locale/translations/lxqt-config-locale.ts index f9eabc3..af5e4f7 100644 --- a/lxqt-config-locale/translations/lxqt-config-locale.ts +++ b/lxqt-config-locale/translations/lxqt-config-locale.ts @@ -64,32 +64,32 @@ - + No change - + Format Settings Changed - + Save the settings ? (they will take effect the next time you log in) - + Imperial UK - + Imperial US - + Metric 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 08ab287..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: It is an abstract class. It has 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 86197ac..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 a8a893d..814ff9a 100644 --- a/lxqt-config-monitor/monitorpicture.cpp +++ b/lxqt-config-monitor/monitorpicture.cpp @@ -1,11 +1,20 @@ /* -* 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. -*/ + * 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" @@ -16,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 38b3586..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 69ad831..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 100% rename from lxqt-config-monitor/magnetic_attraction.html rename to lxqt-config-monitor/resources/magnetic_attraction.html diff --git a/lxqt-config-monitor/savesettings.h b/lxqt-config-monitor/savesettings.h deleted file mode 100644 index 0a25f36..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.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts index 80236db..aa6a13f 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_el.ts @@ -4,37 +4,37 @@ MonitorInfo - + Laptop LCD Monitor Οθόνη LCD φορητού - + External VGA Monitor Εξωτερική οθόνη VGA - + VGA Monitor Οθόνη VGA - + External DVI Monitor Εξωτερική οθόνη DVI - + DVI Monitor Οθόνη DVI - + TV Τηλεόραση - + Default Monitor Οθόνη εξ ορισμού @@ -48,236 +48,360 @@ + 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 + Hz - Position: - Θέση: + Θέση: - x: - x: + x: - y: - 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 του φορητού και στην εξωτερική οθόνη + Εμφάνιση της ίδιας οθόνης στο LCD του φορητού και στην εξωτερική οθόνη - Extended view - Εκτεταμένη προβολή + Εκτεταμένη προβολή - Turn off laptop LCD and use external monitor only - Απενεργοποίηση της οθόνης LCD του φορητού και χρήση μόνον της εξωτερικής οθόνης + Απενεργοποίηση της οθόνης LCD του φορητού και χρήση μόνον της εξωτερικής οθόνης - Turn off external monitor and use laptop LCD only - Απενεργοποίηση της εξωτερικής οθόνης και χρήση μόνον της οθόνης LCD του φορητού + Απενεργοποίηση της εξωτερικής οθόνης και χρήση μόνον της οθόνης LCD του φορητού SaveSettings - Monitor Settings - Ρυθμίσεις οθόνης + Ρυθμίσεις οθόνης - Save - Αποθήκευση + Αποθήκευση - Saved settings - Αποθηκευμένες ρυθμίσεις + Αποθηκευμένες ρυθμίσεις - All: - Όλα: + Όλα: - Hardware compatible: - Συμβατά με το υλικό: + Συμβατά με το υλικό: - Rename - Μετονομασία + Μετονομασία - Delete - Διαγραφή + Διαγραφή - Name - Όνομα + Όνομα - Name: - Όνομα: + Όνομα: @@ -288,12 +412,12 @@ Οι ρυθμίσεις τροποποιήθηκαν - + 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.ts b/lxqt-config-monitor/translations/lxqt-config-monitor_it.ts index e66e90b..54b8f6b 100644 --- a/lxqt-config-monitor/translations/lxqt-config-monitor_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