aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-12-27 22:24:48 +0000
committerWeblate <noreply@weblate.org>2017-12-27 22:24:48 +0000
commit107851adab5f573e331150847b48f499edbcfbb9 (patch)
tree28aac1799650b0c51530130817e63e4c6381127a /src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h
parentTranslated using Weblate (Danish) (diff)
parentShifted from a custom QWidget to a subclass of QGraphicalView and connected i... (diff)
downloadlumina-107851adab5f573e331150847b48f499edbcfbb9.tar.gz
lumina-107851adab5f573e331150847b48f499edbcfbb9.tar.bz2
lumina-107851adab5f573e331150847b48f499edbcfbb9.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h
new file mode 100644
index 00000000..a788fa07
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.h
@@ -0,0 +1,49 @@
+//===========================================
+// 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 Panel info to the QML classes
+//===========================================
+#ifndef _LUMINA_DESKTOP_PANEL_OBJECT_H
+#define _LUMINA_DESKTOP_PANEL_OBJECT_H
+#include <QObject>
+#include <QString>
+#include <QScreen>
+
+class PanelObject : public QObject {
+ Q_OBJECT
+ Q_PROPERTY( QString name READ name )
+ Q_PROPERTY( QString background READ background NOTIFY backgroundChanged)
+ Q_PROPERTY( int x READ x NOTIFY geomChanged)
+ Q_PROPERTY( int y READ y NOTIFY geomChanged)
+ Q_PROPERTY( int width READ width NOTIFY geomChanged)
+ Q_PROPERTY( int height READ height NOTIFY geomChanged)
+
+private:
+ QString panel_id, bg;
+ QRect geom;
+
+public:
+ PanelObject(QString id = "", QObject *parent = 0);
+
+ static void RegisterType();
+
+ Q_INVOKABLE QString name();
+ Q_INVOKABLE QString background();
+ Q_INVOKABLE int x();
+ Q_INVOKABLE int y();
+ Q_INVOKABLE int width();
+ Q_INVOKABLE int height();
+
+public slots:
+ void setBackground(QString fileOrColor);
+ void setGeometry(QRect newgeom);
+
+signals:
+ void backgroundChanged();
+ void geomChanged();
+};
+
+#endif
bgstack15