Adding Macros!
[pierogi] / macros / pirmacropack.h
1 #ifndef PIRMACROPACK_H
2 #define PIRMACROPACK_H
3
4 #include <QTreeWidgetItem>
5 #include <QString>
6 #include <map>
7
8 class QTreeWidget;
9 class PIRMacro;
10
11 typedef std::map<unsigned int, PIRMacro *> ButtonCollection;
12 typedef std::map<char, PIRMacro *> KeyboardCollection;
13
14 class PIRMacroPack: public QTreeWidgetItem
15 {
16 public:
17   PIRMacroPack(
18     QString n);
19
20   bool hasButton(
21     unsigned int buttonID);
22
23   void registerButton(
24     unsigned int buttonID,
25     PIRMacro *macro);
26
27   void eraseButton(
28     unsigned int buttonID,
29     PIRMacro *macro);
30
31   QString buttonText(
32     unsigned int buttonID);
33
34   void executeButton(
35     unsigned int buttonID);
36
37   bool hasKey(
38     char key);
39
40   void registerKey(
41     char key,
42     PIRMacro *macro);
43
44   void eraseKey(
45     char key,
46     PIRMacro *macro);
47
48   void executeKey(
49     char key);
50
51   void storeSettings();
52
53 private:
54   ButtonCollection buttons;
55   KeyboardCollection keymaps;
56 };
57
58 #endif // PIRMACROPACK_H