From 78fa2f5368ce789f8f1fe63d3de5f43bbb4a9308 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 7 Mar 2018 15:10:49 -0500 Subject: Split the Lumina 2 backend: Based on a qmake flag, have it use QtWidgets or QML for the front-end renderer. This will allow us to import/use all the Lumina 1.x interface elements (in Widget form) for now, but switch over to QML interface later without losing all the improvements to the underling events/communication systems. --- .../src-desktop/src-widgets/RootDesktop.h | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h') diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h new file mode 100644 index 00000000..16ce0e47 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/RootDesktop.h @@ -0,0 +1,44 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2018, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_DESKTOP_WIDGETS_ROOT_DESKTOP_H +#define _LUMINA_DESKTOP_WIDGETS_ROOT_DESKTOP_H + +#include +#include "ContextMenu.h" + +class RootDesktop : public QWidget{ + Q_OBJECT +public: + RootDesktop(QWindow *root); + ~RootDesktop(); + + void start(); + +private: + QImage bgimage; + QStringList lastscreens; + QTimer *bgTimer; + DesktopContextMenu *cmenu; + +private slots: + //RootDesktopObject connections + void on_screensChanged(); + void on_panelsChanged(); + void on_windowsChanged(); + void on_trayWindowsChanged(); + void on_screen_bg_changed(); + + //Internal use + void bgTimerUpdate(); + void updateBG(RootDesktop* obj); //designed to be run in a background thread + +protected: + virtual void paintEvent(QPaintEvent *ev); + +}; + +#endif -- cgit