diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-08 18:38:48 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-08 18:38:48 -0400 |
commit | aac453f95f39f0fa66dbdc178da48499f9f2d103 (patch) | |
tree | 1b8942d817b8c4a0cd4240037a02f3e827b7231c /src-qt5/core-utils/lumina-xconfig/ScreenSettings.h | |
parent | Update lumina-xconfig (and lumina-session) so that it saves/reloads the previ... (diff) | |
download | lumina-aac453f95f39f0fa66dbdc178da48499f9f2d103.tar.gz lumina-aac453f95f39f0fa66dbdc178da48499f9f2d103.tar.bz2 lumina-aac453f95f39f0fa66dbdc178da48499f9f2d103.zip |
Oops, forgot to add in a couple new files for lumina-xconfig.
Diffstat (limited to 'src-qt5/core-utils/lumina-xconfig/ScreenSettings.h')
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/ScreenSettings.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h new file mode 100644 index 00000000..770c4f95 --- /dev/null +++ b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h @@ -0,0 +1,49 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_SCREEN_SETTINGS_BACKEND_H +#define _LUMINA_SCREEN_SETTINGS_BACKEND_H + +#include <QString> +#include <QList> +#include <QRect> + +class ScreenInfo{ + public: + QString ID; + QRect geom; //screen geometry + bool isprimary; + bool isactive; + bool isavailable; + int order; //left to right + QStringList resList; + + //Initial Defaults + ScreenInfo(){ + order = -1; //initial value is invalid + isprimary = false; + isactive = false; + isavailable = false; + } + ~ScreenInfo(){} +}; + +class RRSettings{ +public: + //Reset current screen config to match previously-saved settings + static void ApplyPrevious(); //generally performed on startup of the desktop + + //Read the current screen config from xrandr + static QList<ScreenInfo> CurrentScreens(); //reads xrandr information + + //Save the screen config for later + static bool SaveScreens(QList<ScreenInfo> screens); + + //Apply screen configuration + static void Apply(QList<ScreenInfo> screens); +}; + +#endif |