blob: f659088d55ed3b7064bc7b26391ff8d10ea93a2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
|