Advanced Settings Panel
[pierogi] / macros / pirmacromanager.h
1 #ifndef PIRMACROMANAGER_H
2 #define PIRMACROMANAGER_H
3
4 class PIRMacroPack;
5 class PIRReverseMultitap;
6 class MainWindow;
7 class QString;
8
9 class PIRMacroManager
10 {
11 public:
12   PIRMacroManager(
13     MainWindow *mw);
14
15   ~PIRMacroManager();
16
17   PIRMacroPack *getUserPack();
18   PIRMacroPack *getMultitapPack();
19
20   void setKeyboardController(
21     PIRMacroPack *pack);
22
23   void setButtonsController(
24     PIRMacroPack *pack);
25
26   void handleKeypress(
27     char key);
28
29   bool hasMacroButton(
30     unsigned int buttonID);
31
32   QString getMacroButtonText(
33     unsigned int buttonID);
34
35   void executeMacroButton(
36     unsigned int buttonID);
37
38   void storeSettings();
39
40   void setKbdFocus(
41     int index);
42
43   void setBtnFocus(
44     int index);
45
46 private:
47   void retrieveSettings();
48
49   void executeStandardKey(
50     char key);
51
52   PIRMacroPack *userPack;
53   PIRReverseMultitap *multitapPack;
54
55   PIRMacroPack *keyboardController;
56   PIRMacroPack *buttonsController;
57
58   MainWindow *mainWindow;
59 };
60
61 #endif // PIRMACROMANAGER_H