Adding Macros!
[pierogi] / macros / pirmacromanager.h
diff --git a/macros/pirmacromanager.h b/macros/pirmacromanager.h
new file mode 100644 (file)
index 0000000..20c585c
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef PIRMACROMANAGER_H
+#define PIRMACROMANAGER_H
+
+class PIRMacroPack;
+class PIRReverseMultitap;
+class MainWindow;
+class QString;
+
+class PIRMacroManager
+{
+public:
+  PIRMacroManager(
+    MainWindow *mw);
+
+  ~PIRMacroManager();
+
+  PIRMacroPack *getUserPack();
+  PIRMacroPack *getMultitapPack();
+
+  void setKeyboardController(
+    PIRMacroPack *pack);
+
+  void setButtonsController(
+    PIRMacroPack *pack);
+
+  void handleKeypress(
+    char key);
+
+  bool hasMacroButton(
+    unsigned int buttonID);
+
+  QString getMacroButtonText(
+    unsigned int buttonID);
+
+  void executeMacroButton(
+    unsigned int buttonID);
+
+  void storeSettings();
+
+  void setKbdFocus(
+    int index);
+
+  void setBtnFocus(
+    int index);
+
+private:
+  void retrieveSettings();
+
+  PIRMacroPack *userPack;
+  PIRReverseMultitap *multitapPack;
+
+  PIRMacroPack *keyboardController;
+  PIRMacroPack *buttonsController;
+
+  MainWindow *mainWindow;
+};
+
+#endif // PIRMACROMANAGER_H