diff options
author | Arno <arno@disconnect.de> | 2017-02-19 10:36:55 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-02-19 10:36:55 +0100 |
commit | 803959759a66d01d44d9e07b38f4220a93e57a2c (patch) | |
tree | 61f6faa0365c48a0d56a1692229e58291082062e /globals.h | |
parent | 71ff4a5edade412a2d1b191eaf3f7dcd61da3e13 (diff) | |
download | BeetPlayer-803959759a66d01d44d9e07b38f4220a93e57a2c.tar.gz BeetPlayer-803959759a66d01d44d9e07b38f4220a93e57a2c.tar.bz2 BeetPlayer-803959759a66d01d44d9e07b38f4220a93e57a2c.zip |
Added Menus and Globals
Diffstat (limited to 'globals.h')
-rw-r--r-- | globals.h | 25 |
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 |