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 @@
- Ε&πιλογή θέματος
+ Ε&πιλογή θέματος
@@ -29,7 +29,7 @@
- &Κλείσιμο
+ &Κλείσιμο
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
-
+
-
+
-
+
-
+
-
+
-
+
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
-
-
- واجهة ريزر المخصَّصة
-
-
LXQtThemeConfig
- واجهة ريزر المخصَّصة
+ واجهة ريزر المخصَّصة
QObject
-
+
تهيئة مظهر ريزر
-
+
-
+
نماذج اﻷيقونات
-
+
واجهة ريزر المخصَّصة
-
+
-
+
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
-
-
- Motiv LXQt
-
-
LXQtThemeConfig
- Motiv LXQt
+ Motiv LXQt
QObject
-
+
Nastavení vzhledu
-
+
-
+
Téma ikon
-
+
Motiv LXQt
-
+
-
+
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
-
-
- Motiv LXQt
-
-
LXQtThemeConfig
- Motiv LXQt
+ Motiv LXQt
QObject
-
+
Nastavení vzhledu
-
+
-
+
Téma ikon
-
+
Motiv LXQt
-
+
-
+
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 Tema
-
-
LXQtThemeConfig
- LXQt Tema
+ LXQt Tema
QObject
-
+
LXQt Indstillinger for Udseende
-
+
-
+
Ikontema
-
+
LXQt Tema
-
+
-
+
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 Tema
-
-
LXQtThemeConfig
- LXQt Tema
+ LXQt Tema
QObject
-
+
LXQt Indstillinger for Udseende
-
+
-
+
Ikontema
-
+
LXQt Tema
-
+
-
+
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 Erscheinungsbild-Konfiguration
-
+
Stil der Bedienelemente
-
+
Symboldesign
-
+
LXQt-Design
-
+
Schriftart
-
+
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
-
-
LXQtThemeConfig
@@ -156,32 +149,32 @@
QObject
-
+
Διαμόρφωση της εμφάνισης του LXQt
-
+
Στιλ συστατικού
-
+
Θέμα εικονιδίων
-
+
Θέμα LXQt
-
+
Γραμματοσειρά
-
+
Δρομέας
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
-
-
- Etoso de LXQt
-
-
LXQtThemeConfig
- Etoso de LXQt
+ Etoso de LXQt
QObject
-
+
Agordoj de apero de LXQto
-
+
-
+
Etoso de piktogramoj
-
+
Etoso de LXQt
-
+
-
+
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
-
-
- Tema de LXQt
-
-
LXQtThemeConfig
- Tema de LXQt
+ Tema de LXQt
QObject
-
+
Configuración de apariencia de LXQt
-
+
-
+
Tema de iconos
-
+
Tema de LXQt
-
+
-
+
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
-
-
- Tema LXQt
-
-
LXQtThemeConfig
- Tema LXQt
+ Tema LXQt
QObject
-
+
Configuración de apariencia de LXQt
-
+
-
+
Tema de iconos
-
+
Tema LXQt
-
+
-
+
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 gaia
-
-
LXQtThemeConfig
- LXQt gaia
+ LXQt gaia
QObject
-
+
LXQt itxuraren konfigurazioa
-
+
-
+
Ikonoen gaia
-
+
LXQt gaia
-
+
-
+
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-teema
-
-
LXQtThemeConfig
- LXQt-teema
+ LXQt-teema
QObject
-
+
LXQtin ulkoasun hallinta
-
+
-
+
Kuvaketeema
-
+
LXQt-teema
-
+
-
+
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
-
-
- Thème de LXQt
-
-
LXQtThemeConfig
- Thème de LXQt
+ Thème de LXQt
QObject
-
+
Configuration de l'apparence de LXQt
-
+
-
+
Thème d'icones
-
+
Thème de LXQt
-
+
-
+
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 téma
-
-
LXQtThemeConfig
@@ -156,32 +149,32 @@
QObject
-
+
LXQt megjelenésbeállító
-
+
Bigyótéma
-
+
Ikontéma
-
+
LXQt téma
-
+
Betű
-
+
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 megjelenésbeállító
-
+
Bigyótéma
-
+
Ikontémák
-
+
LXQT téma
-
+
Betű
-
+
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
-
+
-
+
-
+
-
+
-
+
-
+
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
-
+
Konfigurasi Penampilan LXQt
-
+
-
+
Tema Ikon
-
+
-
+
-
+
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
-
+
Centro di Configurazione LXQt
-
+
Stile degli elementi
-
+
Tema delle icone
-
+
Tema di LXQt
-
+
Caratteri
-
+
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外観の設定
-
+
ウィジェットのスタイル
-
+
アイコンテーマ
-
+
LXQtテーマ
-
+
フォント
-
+
カーソル
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
-
+
-
+
-
+
-
+
-
+
-
+
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 apipavidalinimas
-
-
LXQtThemeConfig
- LXQt apipavidalinimas
+ LXQt apipavidalinimas
QObject
-
+
LXQt išvaizdos nustatymai
-
+
-
+
Piktogramų tema
-
+
LXQt apipavidalinimas
-
+
-
+
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 Thema
-
-
LXQtThemeConfig
- LXQt Thema
+ LXQt Thema
QObject
-
+
LXQt Uiterlijk Configuratie
-
+
-
+
Pictogram Thema
-
+
LXQt Thema
-
+
-
+
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
-
+
Menu
-
+
-
+
-
+
-
+
-
+
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
-
-
- Motyw LXQt
-
-
LXQtThemeConfig
@@ -156,32 +149,32 @@
QObject
-
+
Konfiguracja wyglądu LXQt
-
+
Widżety
-
+
Motyw ikon
-
+
Motyw LXQt
-
+
Czcionka
-
+
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
-
-
- Tema LXQt
-
-
LXQtThemeConfig
- Tema LXQt
+ Tema LXQt
QObject
-
+
Configuração da aparência do LXQt
-
+
-
+
Tema de ícones
-
+
Tema LXQt
-
+
-
+
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
-
-
- Tema do LXQt
-
-
LXQtThemeConfig
- Tema do LXQt
+ Tema do LXQt
QObject
-
+
Configuração da aparência do LXQt
-
+
-
+
Tema de ícones
-
+
Tema do LXQt
-
+
-
+
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
-
-
- Temă LXQt
-
-
LXQtThemeConfig
- Temă LXQt
+ Temă LXQt
QObject
-
+
Părăsește
-
+
-
+
Temă pictograme
-
+
Temă LXQt
-
+
-
+
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
-
+
Тема иконок
-
+
LXQt темы
-
+
Стиль виджетов
-
+
Шрифт
-
+
Курсор
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
-
+
Тема иконок
-
+
LXQt темы
-
+
Стиль виджетов
-
+
Шрифт
-
+
Курсор
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
-
+
Nastavenie vzhľadu prostredia LXQt
-
+
-
+
Téma ikon
-
+
-
+
-
+
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
-
-
- Tema za LXQt
-
-
LXQtThemeConfig
- Tema za LXQt
+ Tema za LXQt
QObject
-
+
Nastavitev videza za LXQt
-
+
-
+
Tema ikon
-
+
Tema za LXQt
-
+
-
+
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
-
+
Automatsko suspendovanje
-
+
-
+
-
+
-
+
-
+
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
-
+
Подешавање изгледа Рејзора
-
+
-
+
Тема икона
-
+
-
+
-
+
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
-
+
Подешавање изгледа Рејзора
-
+
-
+
Тема икона
-
+
-
+
-
+
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
-
-
LXQtThemeConfig
- ชุดตกแต่ง LXQt
+ ชุดตกแต่ง LXQt
QObject
-
+
ปรับแต่งรูปโฉม LXQt
-
+
-
+
ชุดตกแต่งไอคอน
-
+
ชุดตกแต่ง LXQt
-
+
-
+
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 Teması
-
-
LXQtThemeConfig
- LXQt Teması
+ LXQt Teması
QObject
-
+
LXQt Görünüm Ayarları
-
+
-
+
Simge Teması
-
+
LXQt Teması
-
+
-
+
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
-
-
LXQtThemeConfig
- Тема LXQt
+ Тема LXQt
QObject
-
+
Налаштування вигляду LXQt
-
+
-
+
Тема значків
-
+
Тема LXQt
-
+
-
+
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 主题
-
-
LXQtThemeConfig
- LXQt 主题
+ LXQt 主题
QObject
-
+
LXQt 外观配置
-
+
-
+
图标主题
-
+
LXQt 主题
-
+
-
+
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主題
-
-
LXQtThemeConfig
- LXQt主題
+ LXQt主題
QObject
-
+
LXQt自訂外觀
-
+
-
+
圖示主題
-
+
LXQt主題
-
+
-
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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 @@
+
+
+
+
+
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
+
+
+
+
+
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 @@
-
+
-
+
-
+
-
+
-
+
-
+
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 @@
-
-
-
-
-
-
-
-
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 @@
-
-
-
-
-
-
-
-
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 @@
-
-
-
-
-
-
-
-
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 @@
-
-
-
-
-
-
-
-
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
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -48,235 +48,194 @@
-
+
MonitorSettingsDialog
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
MonitorWidget
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
-
+
+
-
-
-
+
+
-
-
- QObject
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
- QuickOptions
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
- SaveSettings
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -288,12 +247,12 @@
-
+
-
+
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-Bildschirm
-
+
Externer VGA-Bildschirm
-
+
VGA-Bildschirm
-
+
Externer DVI-Bildschirm
-
+
DVI-Bildschirm
-
+
Fernseher
-
+
Standardbildschirm
@@ -48,236 +48,360 @@
+
+
+
+
- Magnetische Anziehungskraft
+ Magnetische Anziehungskraft
MonitorSettingsDialog
-
+
Bildschirmeinstellungen
-
+
+
+ Einstellungen
+
+
- Alle Bildschirme gleich behandeln
+ Alle Bildschirme gleich behandeln
-
- Bildschirmposition
+ Bildschirmposition
-
- Hauptbildschirm:
+ Hauptbildschirm:
-
- Einstellungen sichern?
+ Einstellungen sichern?
-
- Bitte Konfiguration vor dem Sichern überprüfen.
+ Bitte Konfiguration vor dem Sichern überprüfen.
-
- Name
+ Name
-
- Name:
+ Name:
-
- Aktuell
+ Aktuell
-
+
+
+
+
+
+
Fehler
-
+
Konfiguration kann nicht gespeichert werden
+
+
+
+
+
MonitorWidget
-
- Einschalten
+ Einschalten
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Auflösung:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Bildwiederholfrequenz:
+ Bildwiederholfrequenz:
-
- Hz
+ Hz
-
- Position:
+ Position:
-
- x:
+ x:
-
- y:
+ y:
-
- Helligkeit:
+ Helligkeit:
-
- Gamma:
+ Gamma:
-
-
- :
+ :
-
- Hintergrundbeleuchtung:
+ Hintergrundbeleuchtung:
-
-
- Automatisch
+ Automatisch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
QObject
-
-
- Automatisch
+ Automatisch
-
- Bildschirmeinstellungen
+ Bildschirmeinstellungen
-
- Schnellwahl
+ Schnellwahl
-
- Einstellungen
+ Einstellungen
-
- Einstellungen sichern
+ Einstellungen sichern
QuickOptions
-
- Bildschirmeinstellungen
+ Bildschirmeinstellungen
-
- Gleiches Bild auf Laptop und externem Bildschirm anzeigen
+ Gleiches Bild auf Laptop und externem Bildschirm anzeigen
-
- Erweiterter Bildschirm
+ Erweiterter Bildschirm
-
- Laptop-Bildschirm ausschalten und nur den externen Monitor verwenden
+ Laptop-Bildschirm ausschalten und nur den externen Monitor verwenden
-
- Externen Monitor ausschalten und nur den Laptop-Bildschirm verwenden
+ Externen Monitor ausschalten und nur den Laptop-Bildschirm verwenden
SaveSettings
-
- Bildschirmeinstellungen
+ Bildschirmeinstellungen
-
- Speichern
+ Speichern
-
- Gespeicherte Einstellungen
+ Gespeicherte Einstellungen
-
- Alle:
+ Alle:
-
- Mit der Hardware kompatibel:
+ Mit der Hardware kompatibel:
-
- Umbenennen
+ Umbenennen
-
- Löschen
+ Löschen
-
- Name
+ Name
-
- Name:
+ Name:
@@ -288,12 +412,12 @@
Einstellungen wurden geändert
-
+
Sind die Einstellungen korrekt?
-
+
%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
-
+
Οθόνη LCD φορητού
-
+
Εξωτερική οθόνη VGA
-
+
Οθόνη VGA
-
+
Εξωτερική οθόνη DVI
-
+
Οθόνη DVI
-
+
Τηλεόραση
-
+
Οθόνη εξ ορισμού
@@ -48,236 +48,360 @@
+
+
+
+
- Μαγνητική έλξη
+ Μαγνητική έλξη
MonitorSettingsDialog
-
+
Ρυθμίσεις οθόνης
-
+
+
+ Ρυθμίσεις
+
+
- Ενοποίηση όλων των οθονών
+ Ενοποίηση όλων των οθονών
-
- Θέση της οθόνης
+ Θέση της οθόνης
-
- Πρωτεύουσα οθόνη:
+ Πρωτεύουσα οθόνη:
-
- Επιθυμείτε την αποθήκευση των αλλαγών;
+ Επιθυμείτε την αποθήκευση των αλλαγών;
-
- Παρακαλώ, ελέγξτε τις ρυθμίσεις πριν την αποθήκευση.
+ Παρακαλώ, ελέγξτε τις ρυθμίσεις πριν την αποθήκευση.
-
- Όνομα
+ Όνομα
-
- Όνομα:
+ Όνομα:
-
- Τρέχον
+ Τρέχον
-
+
+
+
+
+
+
Σφάλμα
-
+
Δεν είναι δυνατή η αποθήκευση της διαμόρφωσης
+
+
+
+
+
MonitorWidget
-
- Ενεργοποίηση
+ Ενεργοποίηση
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Ανάλυση:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Ρυθμός:
+ Ρυθμός:
-
- Hz
+ Hz
-
- Θέση:
+ Θέση:
-
- x:
+ x:
-
- y:
+ y:
-
- Φωτεινότητα:
+ Φωτεινότητα:
-
- Γάμμα:
+ Γάμμα:
-
-
- :
+ :
-
- Οπίσθιος φωτισμός:
+ Οπίσθιος φωτισμός:
-
-
- Αυτόματο
+ Αυτόματο
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
QObject
-
-
- Αυτόματο
+ Αυτόματο
-
- Ρυθμίσεις οθόνης
+ Ρυθμίσεις οθόνης
-
- Γρήγορες επιλογές
+ Γρήγορες επιλογές
-
- Ρυθμίσεις
+ Ρυθμίσεις
-
- Αποθήκευση ρυθμίσεων
+ Αποθήκευση ρυθμίσεων
QuickOptions
-
- Ρυθμίσεις οθόνης
+ Ρυθμίσεις οθόνης
-
- Εμφάνιση της ίδιας οθόνης στο LCD του φορητού και στην εξωτερική οθόνη
+ Εμφάνιση της ίδιας οθόνης στο LCD του φορητού και στην εξωτερική οθόνη
-
- Εκτεταμένη προβολή
+ Εκτεταμένη προβολή
-
- Απενεργοποίηση της οθόνης LCD του φορητού και χρήση μόνον της εξωτερικής οθόνης
+ Απενεργοποίηση της οθόνης LCD του φορητού και χρήση μόνον της εξωτερικής οθόνης
-
- Απενεργοποίηση της εξωτερικής οθόνης και χρήση μόνον της οθόνης LCD του φορητού
+ Απενεργοποίηση της εξωτερικής οθόνης και χρήση μόνον της οθόνης LCD του φορητού
SaveSettings
-
- Ρυθμίσεις οθόνης
+ Ρυθμίσεις οθόνης
-
- Αποθήκευση
+ Αποθήκευση
-
- Αποθηκευμένες ρυθμίσεις
+ Αποθηκευμένες ρυθμίσεις
-
- Όλα:
+ Όλα:
-
- Συμβατά με το υλικό:
+ Συμβατά με το υλικό:
-
- Μετονομασία
+ Μετονομασία
-
- Διαγραφή
+ Διαγραφή
-
- Όνομα
+ Όνομα
-
- Όνομα:
+ Όνομα:
@@ -288,12 +412,12 @@
Οι ρυθμίσεις τροποποιήθηκαν
-
+
Οι τρέχουσες ρυθμίσεις σας ικανοποιούν;
-
+
Υπολείπεται %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
-
+
Beépített LCD Monitor
-
+
Külső LCD Monitor
-
+
VGA Monitor
-
+
Külső DVI Monitor
-
+
-
+
-
+
Alapértelmezett Monitor
@@ -48,14 +48,18 @@
+
+
+
+
- Mégneses elhajlás
+ Mégneses elhajlás
MonitorSettingsDialog
-
+
Monitor beállítás
@@ -80,234 +84,278 @@
Külső monor lekapcsolása és csak a belső LCD használata
+
- beállítások
+ beállítások
-
- Monitorok összevonása
+ Monitorok összevonása
-
- Monitor helyzet
+ Monitor helyzet
-
- Elsődleges monitor:
+ Elsődleges monitor:
-
- Változtatások mentése?
+ Változtatások mentése?
Mentés előtt ellenőrizd a beállításokat!
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
Hiba
-
+
A beállítás mentetlen
+
+
+
+
+
MonitorWidget
-
- Bekapcsolás
+ Bekapcsolás
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Felbontás:
-
-
- Arány:
+
+
+
-
-
-
+
+
+
-
-
- Helyzet:
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
- Fényerő:
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
- Háttérfény:
+
+
+
-
-
-
- Automata
+
+
+
-
-
- QObject
-
-
-
- Automata
+
+
+
-
-
- Monitor beállítás
+
+
+
-
-
- Gyors lehetőségek
+
+
+
-
-
- beállítások
+
+
+
-
-
-
+
+ Arány:
-
-
- QuickOptions
-
-
- Monitor beállítás
+
+ Helyzet:
-
-
- Azonos kép a beépített LCD és külső monitoron
+
+ Fényerő:
-
-
- Bővített megjelenítés
+
+ Háttérfény:
-
-
- Beépített LCD kikapcsolása és csak a külső használata
+
+ Automata
-
-
- Külső monor lekapcsolása és csak a belső LCD használata
+
+
+
-
-
- SaveSettings
-
-
- Monitor beállítás
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+ QObject
+
+
+ Automata
+
+
+
+ Monitor beállítás
+
+
+
+ Gyors lehetőségek
+
+
+
+ beállítások
+
+
+
+ QuickOptions
+
+
+ Monitor beállítás
+
+
+
+ Azonos kép a beépített LCD és külső monitoron
+
+
+
+ Bővített megjelenítés
+
+
+
+ Beépített LCD kikapcsolása és csak a külső használata
+
+
+
+ Külső monor lekapcsolása és csak a belső LCD használata
+
+
+
+ SaveSettings
+
+
+ Monitor beállítás
+
+
TimeoutDialog
@@ -316,12 +364,12 @@
Beállítások változtatása
-
+
Jók a beállítások?
-
+
%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
-
+
Monitor portatile LCD
-
+
Monitor esterno VGA
-
+
Monitor VGA
-
+
Monitor esterno DVI
-
+
Monitor DVI
-
+
TV
-
+
Monitor principale
@@ -48,14 +48,18 @@
+
+
+
+
- Attrazione magnetica
+ Attrazione magnetica
MonitorSettingsDialog
-
+
Impostazioni del monitor
@@ -80,234 +84,278 @@
Spegni monitor esterno e usa solo monitor LCD
+
- Impostazioni
+ Impostazioni
-
- Unisci tutte le uscite
+ Unisci tutte le uscite
-
- Posizione dello schermo
+ Posizione dello schermo
-
- Monitor principale:
+ Monitor principale:
-
- Salvare i cambiamenti?
+ Salvare i cambiamenti?
Per favore controlla la configurazione prima di salvare.
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
Errore
-
+
La configurazione non può essere salvata
+
+
+
+
+
MonitorWidget
-
- Accendi
+ Accendi
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Risoluzione:
-
-
- Frequenza:
+
+
+
-
-
-
+
+
+
-
-
- Posizione:
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
- Luminosità:
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
- Retroilluminazione:
+
+
+
-
-
-
- Auto
+
+
+
-
-
- QObject
-
-
-
- Auto
+
+
+
-
-
- Impostazioni del monitor
+
+
+
-
-
- Opzioni veloci
+
+
+
-
-
- Impostazioni
+
+
+
-
-
-
+
+ Frequenza:
-
-
- QuickOptions
-
-
- Impostazioni del monitor
+
+ Posizione:
-
-
- Unifica uscite
+
+ Luminosità:
-
-
- Vista estesa
+
+ Retroilluminazione:
-
-
- Spegni monitor portatile LCD e usa solo monitor esterno
+
+ Auto
-
-
- Spegni monitor esterno e usa solo monitor LCD
+
+
+
-
-
- SaveSettings
-
-
- Impostazioni del monitor
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+ QObject
+
+
+ Auto
+
+
+
+ Impostazioni del monitor
+
+
+
+ Opzioni veloci
+
+
+
+ Impostazioni
+
+
+
+ QuickOptions
+
+
+ Impostazioni del monitor
+
+
+
+ Unifica uscite
+
+
+
+ Vista estesa
+
+
+
+ Spegni monitor portatile LCD e usa solo monitor esterno
+
+
+
+ Spegni monitor esterno e usa solo monitor LCD
+
+
+
+ SaveSettings
+
+
+ Impostazioni del monitor
+
+
TimeoutDialog
@@ -316,12 +364,12 @@
Impostazione modificate
-
+
Mantenere questa configurazione?
-
+
%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
-
+
ラップトップ液晶モニター
-
+
外部VGAモニター
-
+
VGAモニター
-
+
外部DVIモニター
-
+
DVIモニター
-
+
TV
-
+
デフォルトのモニター
@@ -48,14 +48,14 @@
-
+
MonitorSettingsDialog
-
+
モニターの設定
@@ -80,232 +80,296 @@
外部モニターを無効にし、ラップトップ液晶画面のみ使う
+
- 設定
+ 設定
-
- すべてのモニターの表示を共通にする
+ すべてのモニターの表示を共通にする
-
- モニターの位置
+ モニターの位置
-
- プライマリーモニター:
+ プライマリーモニター:
-
- 変更を保存しますか?
+ 変更を保存しますか?
保存する前に、設定結果を確認してください
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
エラー
-
+
設定を保存することができませんでした
+
+
+
+
+
MonitorWidget
-
- 有効にする
+ 有効にする
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
解像度:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- リフレッシュレート:
+ リフレッシュレート:
-
- Hz
+ Hz
-
- 位置:
+ 位置:
-
- X座標:
+ X座標:
-
- Y座標:
+ Y座標:
-
- 明るさ:
+ 明るさ:
-
- ガンマ:
+ ガンマ:
-
-
- :
+ :
-
- バックライト:
+ バックライト:
-
-
- 自動
+ 自動
-
-
- QObject
-
-
-
- 自動
+
+
+
-
-
- モニターの設定
+
+
+
-
-
- クイックオプション
+
+
+
-
-
- 設定
+
+
+
-
-
+
+
-
-
- QuickOptions
-
-
- モニターの設定
+
+
+
-
-
- ラップトップ液晶パネルと外部モニターで同じ画面を表示
+
+
+
-
-
- 拡張領域
+
+
+
-
-
- ラップトップ液晶画面を無効にし、外部モニターのみ使う
+
+
+
-
-
- 外部モニターを無効にし、ラップトップ液晶画面のみ使う
+
+
+
+
+
+
+
+
- SaveSettings
+ QObject
+
+
+ 自動
+
-
- モニターの設定
+ モニターの設定
-
-
-
+
+ クイックオプション
-
-
-
+
+ 設定
+
+
+ QuickOptions
-
-
-
+
+ モニターの設定
-
-
-
+
+ ラップトップ液晶パネルと外部モニターで同じ画面を表示
-
-
-
+
+ 拡張領域
-
-
-
+
+ ラップトップ液晶画面を無効にし、外部モニターのみ使う
-
-
-
+
+ 外部モニターを無効にし、ラップトップ液晶画面のみ使う
+
+
+ SaveSettings
-
-
-
+
+ モニターの設定
@@ -316,12 +380,12 @@
設定は変更されました
-
+
この設定で問題ないですか?
-
+
残り %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
-
+
Monitor LCD laptopa
-
+
Zewnętrzny monitor VGA
-
+
Monitor VGA
-
+
Zewnętrzny monitor DVI
-
+
Monitor DVI
-
+
TV
-
+
Domyślny monitor
@@ -48,14 +48,14 @@
-
+
MonitorSettingsDialog
-
+
Ustawienia monitora
@@ -80,232 +80,284 @@
Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa
+
- Ustawienia
+ Ustawienia
-
-
+
+ Główny monitor:
+
+
+
+ Czy chcesz zachować zmiany?
+
+
+
+ Proszę sprawdzić konfigurację przed zapisaniem.
+
+
+
+
-
-
+
+
+ Błąd
+
+
+
+
+ Konfiguracja nie może być zapisana
+
+
+
+
+
+
+ MonitorWidget
-
-
- Główny monitor:
+
+ Włącz
-
-
- Czy chcesz zachować zmiany?
+
+
+
-
- Proszę sprawdzić konfigurację przed zapisaniem.
+
+
+
-
-
+
+
-
-
+
+
+ Rozdzielczość:
+
+
+
+
-
-
+
+
-
-
+
+
-
-
- Błąd
+
+
+
-
-
- Konfiguracja nie może być zapisana
+
+
+
-
-
- MonitorWidget
-
-
- Włącz
+
+
+
-
-
- Rozdzielczość:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Odświeżanie:
+ Odświeżanie:
-
- Hz
+ Hz
-
- Pozycja:
+ Pozycja:
-
- x:
+ x:
-
- y:
+ y:
-
- Jasność:
+ Jasność:
-
- Gamma:
+ Gamma:
-
-
- :
+ :
-
-
-
+
+ Auto
-
-
-
- Auto
+
+
+
-
-
- QObject
-
-
-
- Auto
+
+
+
-
-
- Ustawienia monitora
+
+
+
-
-
- Opcje
+
+
+
-
-
- Ustawienia
+
+
+
-
-
+
+
-
-
- QuickOptions
-
-
- Ustawienia monitora
+
+
+
-
-
- Pokaż ten sam ekran na LCD laptopa oraz zewnętrznym monitorze
+
+
+
-
-
- Rozszerzony widok
+
+
+
-
-
- Wyłącz LCD laptopa i użyj tylko zewnętrznego monitora
+
+
+
-
-
- Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa
+
+
+
- SaveSettings
+ QObject
+
+
+ Auto
+
-
- Ustawienia monitora
+ Ustawienia monitora
-
-
-
+
+ Opcje
-
-
-
+
+ Ustawienia
+
+
+ QuickOptions
-
-
-
+
+ Ustawienia monitora
-
-
-
+
+ Pokaż ten sam ekran na LCD laptopa oraz zewnętrznym monitorze
-
-
-
+
+ Rozszerzony widok
-
-
-
+
+ Wyłącz LCD laptopa i użyj tylko zewnętrznego monitora
-
-
-
+
+ Wyłącz zewnętrzny monitor i użyj tylko LCD laptopa
+
+
+ SaveSettings
-
-
-
+
+ Ustawienia monitora
@@ -316,12 +368,12 @@
Ustawienia zostały zmienione
-
+
Czy aktualne ustawienia są prawidłowe?
-
+
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
-
+
Monitor LCD de portátil
-
+
Monitor externo VGA
-
+
Monitor VGA
-
+
Monitor externo DVI
-
+
Monitor DVI
-
+
TV
-
+
Monitor pré-definido
@@ -48,8 +48,12 @@
+
+
+
+
- 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.
-
+
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
+
- Definições
+ Definições
-
- Unificar todos os monitores
+ Unificar todos os monitores
-
- Posição do monitor
+ Posição do monitor
-
- Monitor principal:
+ Monitor principal:
-
- Quer guardar as alterações?
+ Quer guardar as alterações?
Verifique a configuraçao antes de guardar.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
Erro
-
+
Não é possível guardar a configuração
+
+
+
+
+
MonitorWidget
-
- Ligar
+ Ligar
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Resolução:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Taxa:
+ Taxa:
-
- Hz
+ Hz
-
- Posição:
+ Posição:
-
- x:
+ x:
-
- y:
+ y:
-
- Brilho:
+ Brilho:
-
- Gama:
+ Gama:
-
-
- :
+ :
-
- Luz de fundo:
+ Luz de fundo:
-
-
- Automático
+ Automático
-
-
- QObject
-
-
-
- Automático
+
+
+
-
-
- Definições do monitor
+
+
+
-
-
- Opções rápidas
+
+
+
-
-
- Definições
+
+
+
-
-
+
+
-
-
- QuickOptions
-
-
- Definições do monitor
+
+
+
-
-
- Mostrar o mesmo ecrã no portátil e no monitor externo
+
+
+
-
-
- Vista detalhada
+
+
+
-
-
- Desligar ecrã do portátil e utilizar o monitor externo
+
+
+
-
-
- Desligar o monitor externo e utilizar o ecrã do portátil
+
+
+
+
+
+
+
+
- SaveSettings
+ QObject
+
+
+ Automático
+
-
- Definições do monitor
+ Definições do monitor
-
-
-
+
+ Opções rápidas
-
-
-
+
+ Definições
+
+
+ QuickOptions
-
-
-
+
+ Definições do monitor
-
-
-
+
+ Mostrar o mesmo ecrã no portátil e no monitor externo
-
-
-
+
+ Vista detalhada
-
-
-
+
+ Desligar ecrã do portátil e utilizar o monitor externo
-
-
-
+
+ Desligar o monitor externo e utilizar o ecrã do portátil
+
+
+ SaveSettings
-
-
-
+
+ Definições do monitor
@@ -396,12 +464,12 @@ Ferramenta de configuração de monitores do LXQt.
Definições alteradas
-
+
As definições estão certas para si?
-
+
%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
-
+
ЖК-монитор лэптопа
-
+
Внешний VGA-монитор
-
+
VGA-монитор
-
+
Внешний DVI-монитор
-
+
DVI-монитор
-
+
ТВ
-
+
Монитор по умолчанию
@@ -71,240 +71,344 @@
+
+
+
+
- Магнитное притяжение
+ Магнитное притяжение
MonitorSettingsDialog
-
+
Настройки монитора
-
+
+
+ Настройки
+
+
- Объединить все мониторы
+ Объединить все мониторы
-
- Положение монитора
+ Положение монитора
-
- Первичный монитор:
+ Первичный монитор:
Применить
-
- Вы хотите сохранить изменения?
+ Вы хотите сохранить изменения?
-
- Проверьте, пожалуйста, настройки перед сохранением.
+ Проверьте, пожалуйста, настройки перед сохранением.
-
- Название
+ Название
-
- Название:
+ Название:
-
- Текущие
+ Текущие
+
+
+
+
+
-
+
Ошибка
-
+
Не удалось сохранить конфигурацию
+
+
+
+
+
MonitorWidget
-
- Включить
+ Включить
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Разрешение:
-
-
- Частота:
+
+
+
-
-
- Гц
+
+
+
-
-
- Положение:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ Частота:
-
-
-
+
+ Гц
+
+
+
+ Положение:
-
- Подсветка:
+ Подсветка:
-
- Яркость:
+ Яркость:
-
- Гамма:
+ Гамма:
-
-
-
-
+
+ Авто
-
-
-
- Авто
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
QObject
-
-
- Авто
+ Авто
-
- Настройки монитора
+ Настройки монитора
-
- Быстрые настройки
+ Быстрые настройки
-
- Настройки
+ Настройки
-
- Сохранить настройки
+ Сохранить настройки
QuickOptions
-
- Настройки монитора
+ Настройки монитора
-
- Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа
+ Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа
-
- Расширенный вид
+ Расширенный вид
-
- Выключить ЖК-монитор лэптопа и использовать только внешний монитор
+ Выключить ЖК-монитор лэптопа и использовать только внешний монитор
-
- Выключить внешний монитор и использовать только ЖК-монитор лэптопа
+ Выключить внешний монитор и использовать только ЖК-монитор лэптопа
SaveSettings
-
- Настройки монитора
+ Настройки монитора
-
- Сохранить
+ Сохранить
-
- Сохранённые настройки
+ Сохранённые настройки
-
- Все:
+ Все:
-
- Аппаратно-совместимые:
-
-
-
-
-
-
-
-
-
-
+ Аппаратно-совместимые:
-
- Название
+ Название
-
- Название:
+ Название:
@@ -315,12 +419,12 @@
Настройки изменились
-
+
Вам подходят текущие настройки?
-
+
Осталось %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
-
+
ЖК-монитор лэптопа
-
+
Внешний VGA-монитор
-
+
VGA-монитор
-
+
Внешний DVI-монитор
-
+
DVI-монитор
-
+
ТВ
-
+
Монитор по умолчанию
@@ -71,240 +71,344 @@
+
+
+
+
- Магнитное притяжение
+ Магнитное притяжение
MonitorSettingsDialog
-
+
Настройки монитора
-
+
+
+ Настройки
+
+
- Объединить все мониторы
+ Объединить все мониторы
-
- Положение монитора
+ Положение монитора
-
- Первичный монитор:
+ Первичный монитор:
Применить
-
- Вы хотите сохранить изменения?
+ Вы хотите сохранить изменения?
-
- Проверьте, пожалуйста, настройки перед сохранением.
+ Проверьте, пожалуйста, настройки перед сохранением.
-
- Название
+ Название
-
- Название:
+ Название:
-
- Текущие
+ Текущие
+
+
+
+
+
-
+
Ошибка
-
+
Не удалось сохранить конфигурацию
+
+
+
+
+
MonitorWidget
-
- Включить
+ Включить
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Разрешение:
-
-
- Частота:
+
+
+
-
-
- Гц
+
+
+
-
-
- Положение:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ Частота:
-
-
-
+
+ Гц
+
+
+
+ Положение:
-
- Подсветка:
+ Подсветка:
-
- Яркость:
+ Яркость:
-
- Гамма:
+ Гамма:
-
-
-
-
+
+ Авто
-
-
-
- Авто
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
QObject
-
-
- Авто
+ Авто
-
- Настройки монитора
+ Настройки монитора
-
- Быстрые настройки
+ Быстрые настройки
-
- Настройки
+ Настройки
-
- Сохранить настройки
+ Сохранить настройки
QuickOptions
-
- Настройки монитора
+ Настройки монитора
-
- Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа
+ Отображать одинаковый экран на внешнем мониторе и ЖК-мониторе лэптопа
-
- Расширенный вид
+ Расширенный вид
-
- Выключить ЖК-монитор лэптопа и использовать только внешний монитор
+ Выключить ЖК-монитор лэптопа и использовать только внешний монитор
-
- Выключить внешний монитор и использовать только ЖК-монитор лэптопа
+ Выключить внешний монитор и использовать только ЖК-монитор лэптопа
SaveSettings
-
- Настройки монитора
+ Настройки монитора
-
- Сохранить
+ Сохранить
-
- Сохранённые настройки
+ Сохранённые настройки
-
- Все:
+ Все:
-
- Аппаратно-совместимые:
-
-
-
-
-
-
-
-
-
-
+ Аппаратно-совместимые:
-
- Название
+ Название
-
- Название:
+ Название:
@@ -315,12 +419,12 @@
Настройки изменились
-
+
Вам подходят текущие настройки?
-
+
Осталось %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
-
+
筆記型電腦液晶螢幕
-
+
外接VGA螢幕
-
+
VGA 螢幕
-
+
外接 DVI 螢幕
-
+
DVI 螢幕
-
+
電視
-
+
預設螢幕
@@ -48,7 +48,7 @@
-
+
@@ -113,229 +113,199 @@ Monitor configuration tool for LXQt.
LXQt-config-monitor 螢幕設定工具
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
MonitorWidget
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
-
+
+
-
-
-
- 自動
+
+
+
-
-
- QObject
-
-
-
- 自動
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
- QuickOptions
-
-
+
+
-
-
-
+
+ 自動
-
-
+
+
-
-
+
+
-
-
+
+
-
-
- SaveSettings
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+ QObject
-
-
-
+
+ 自動
@@ -346,12 +316,12 @@ Monitor configuration tool for LXQt.
-
+
-
+
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