summaryrefslogtreecommitdiffstats
path: root/globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'globals.h')
-rw-r--r--globals.h25
1 files changed, 25 insertions, 0 deletions
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 <QObject>
+#include <QHash>
+
+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<int, QAction*> mActions;
+};
+
+#endif // GLOBALS_H