aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
committerWeblate <noreply@weblate.org>2017-12-15 22:52:34 +0000
commit9155556b94b0fe25ef3d5398a7f70dcdc1841d69 (patch)
treeae5af06e4741c8767344be6d90a7307bcddb5b5d /src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
parentTranslated using Weblate (Russian) (diff)
parentAnother minor networking fix. (diff)
downloadlumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.gz
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.tar.bz2
lumina-9155556b94b0fe25ef3d5398a7f70dcdc1841d69.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
new file mode 100644
index 00000000..ba586701
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h
@@ -0,0 +1,55 @@
+//===========================================
+// Lumina-desktop source code
+// Copyright (c) 2017, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the base C++ object that is used to pass information to the QML "RootDesktop" object
+//===========================================
+#ifndef _LUMINA_DESKTOP_QML_BACKEND_ROOT_DESKTOP_OBJECT_H
+#define _LUMINA_DESKTOP_QML_BACKEND_ROOT_DESKTOP_OBJECT_H
+#include <QObject>
+#include <QList>
+
+#include "ScreenObject.h"
+
+class RootDesktopObject : public QObject{
+ Q_OBJECT
+ //Define all the QML Properties here (interface between QML and the C++ methods below)
+ Q_PROPERTY( QStringList screens READ screens NOTIFY screensChanged)
+
+public:
+ //main contructor/destructor
+ RootDesktopObject(QObject *parent = 0);
+ ~RootDesktopObject();
+
+ static void RegisterType();
+
+ //primary interface to fetch the current instance of the class (so only one is running at any given time)
+ static RootDesktopObject* instance();
+
+ //QML Read Functions
+ QStringList screens();
+ Q_INVOKABLE ScreenObject* screen(QString id);
+
+ //QML Access Functions
+ Q_INVOKABLE void logout();
+ Q_INVOKABLE void lockscreen();
+ Q_INVOKABLE void mousePositionChanged();
+private:
+ QList<ScreenObject*> s_objects;
+
+public slots:
+ void updateScreens(); //rescan/update screen objects
+ void ChangeWallpaper(QString screen, QString);
+
+private slots:
+
+signals:
+ void screensChanged();
+ void startLogout();
+ void mouseMoved();
+ void lockScreen();
+
+};
+#endif
bgstack15