aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/RootWindow.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-01-24 16:30:19 -0500
committerKen Moore <ken@ixsystems.com>2017-01-24 16:30:19 -0500
commit51f6b8800f4f18a2f445ff51689da027f4058fc4 (patch)
tree44c7740f6d0b06d96985d79ba1a42819633ad579 /src-qt5/core/libLumina/RootWindow.h
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-51f6b8800f4f18a2f445ff51689da027f4058fc4.tar.gz
lumina-51f6b8800f4f18a2f445ff51689da027f4058fc4.tar.bz2
lumina-51f6b8800f4f18a2f445ff51689da027f4058fc4.zip
Add the beginnings of a new RootWindow class for providing the multi-monitor virtual root functionality with all wallpaper painting routines embedded within.
Diffstat (limited to 'src-qt5/core/libLumina/RootWindow.h')
-rw-r--r--src-qt5/core/libLumina/RootWindow.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/RootWindow.h b/src-qt5/core/libLumina/RootWindow.h
new file mode 100644
index 00000000..4893b0c7
--- /dev/null
+++ b/src-qt5/core/libLumina/RootWindow.h
@@ -0,0 +1,53 @@
+//===========================================
+// Lumina Desktop source code
+// Copyright (c) 2017, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This class creates and manages a virtual "root" window
+// for all monitors at all times.
+//===========================================
+#ifndef _LUMINA_ROOT_WINDOW_H
+#define _LUMINA_ROOT_WINDOW_H
+
+
+
+class RootWindow : public QWidget{
+ Q_OBJECT
+public:
+ enum ScaleType{ SingleColor, Stretch, Full, Fit, Center, Tile, BottomLeft, BottomRight, BottomCenter, \
+ TopLeft, TopRight, TopCenter, CenterLeft, CenterRight};
+
+ RootWindow();
+ ~RootWindow();
+
+private:
+ struct screeninfo{
+ QString id;
+ QRect area;
+ QString file;
+ ScaleType scale;
+ QPixmap wallpaper;
+ };
+
+ QList<screeninfo> WALLPAPERS;
+ void updateScreenPixmap(ScreenInfo *info); //used for recalculating the wallpaper pixmap based on file/area/scale as needed
+
+public slots:
+ void ResizeRoot();
+ void ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file);
+ //Note: for "SingleColor" scaling the "file" variable should be "rgb(R,G,B)" or "#hexcode"
+
+private slots:
+
+protected:
+ void paintEvent(QPaintEvent *ev);
+
+signals:
+ void RootResized();
+ void NewScreens(QStringList); // [screen_id_1, screen_id_2, etc..]
+ void RemovedScreens(QStringList); // [screen_id_1, screen_id_2, etc..]
+
+};
+
+#endif
bgstack15