summaryrefslogtreecommitdiffstats
path: root/src/client/addons/addons.h
diff options
context:
space:
mode:
authorSimon Rettberg2018-09-06 11:32:54 +0200
committerSimon Rettberg2018-09-06 11:32:54 +0200
commitcb93788148785758be72fcb2afe2039e7a882c53 (patch)
treec2095f4ac5995d53e62bd9e247345a1b60c3bf5a /src/client/addons/addons.h
parent[client] Fix memory leak (diff)
downloadpvs2-cb93788148785758be72fcb2afe2039e7a882c53.tar.gz
pvs2-cb93788148785758be72fcb2afe2039e7a882c53.tar.xz
pvs2-cb93788148785758be72fcb2afe2039e7a882c53.zip
[client] New addon system for buttons and menu
Instead of integrating workspace switching and screen locking directly into PVS2, introduce an addon system to insert new functionality into the toolbar, as buttons or menu entries.
Diffstat (limited to 'src/client/addons/addons.h')
-rw-r--r--src/client/addons/addons.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/addons/addons.h b/src/client/addons/addons.h
new file mode 100644
index 0000000..185c399
--- /dev/null
+++ b/src/client/addons/addons.h
@@ -0,0 +1,25 @@
+#ifndef _ADDONS_H_
+#define _ADDONS_H_
+
+#include <QString>
+#include <QList>
+
+class Toolbar;
+class QPushButton;
+class QAction;
+
+class Addon;
+
+class AddonManager
+{
+public:
+ static void loadFromPath(const QString &path, QList<QPushButton*> &buttons, QList<QAction*> &menuEntries);
+ static void initControls();
+ static void connectEvent(bool isLocal, const QString &address);
+ static void disconnectEvent();
+
+private:
+ static QList<Addon*> _addons;
+};
+
+#endif