From 803959759a66d01d44d9e07b38f4220a93e57a2c Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 19 Feb 2017 10:36:55 +0100 Subject: Added Menus and Globals --- globals.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 globals.h (limited to 'globals.h') diff --git a/globals.h b/globals.h new file mode 100644 index 0000000..f659088 --- /dev/null +++ b/globals.h @@ -0,0 +1,25 @@ +#ifndef GLOBALS_H +#define GLOBALS_H + +#include +#include + +class QAction; + +class Globals : public QObject { + Q_OBJECT + public: + enum ActionType { QuitAction = 0, ConfigAction = 1 }; + static Globals *instance(); + void addAction(QAction *a); + QAction *action(int actionType); + + private: + Globals(); + Globals(const Globals &other); + Globals &operator=(const Globals &other); + static Globals *mInstance; + QHash mActions; +}; + +#endif // GLOBALS_H -- cgit v1.2.3-70-g09d2