projects
/
pierogi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding Macros!
[pierogi]
/
macros
/
pirmacro.h
diff --git
a/macros/pirmacro.h
b/macros/pirmacro.h
index
fe0b583
..
a803eeb
100644
(file)
--- a/
macros/pirmacro.h
+++ b/
macros/pirmacro.h
@@
-6,7
+6,10
@@
#include <QString>
class PIRMacroCommandItem;
#include <QString>
class PIRMacroCommandItem;
+class PIRMacroPack;
class QListWidget;
class QListWidget;
+class QSettings;
+class MainWindow;
#include <list>
typedef std::list<PIRMacroCommandItem *> CommandSequence;
#include <list>
typedef std::list<PIRMacroCommandItem *> CommandSequence;
@@
-17,22
+20,55
@@
class PIRMacro: public QObject, public QTreeWidgetItem
public:
PIRMacro(
public:
PIRMacro(
- QTreeWidgetItem *parent,
- QString n,
- char k);
+ PIRMacroPack *parent,
+ QString name,
+ char key,
+ unsigned int buttonID,
+ MainWindow *mw);
+
+ ~PIRMacro();
QString getName();
QString getName();
- char getKeyMapping();
+ void setName(
+ QString name);
+
+ char getKey();
+
+ void setKey(
+ char key);
+
+ unsigned int getButtonID();
+
+ void setButtonID(
+ unsigned int id);
void appendCommand(
PIRMacroCommandItem *c);
void appendCommand(
PIRMacroCommandItem *c);
+ bool deleteCommand(
+ int index);
+
+ bool moveUp(
+ int index);
+
+ bool moveDown(
+ int index);
+
void populateList(
QListWidget *lw);
bool executeMacro();
void populateList(
QListWidget *lw);
bool executeMacro();
+ void storeSettings(
+ QSettings &settings);
+
+ QString getCommandType(
+ int index);
+
+ QString getCommandName(
+ int index);
+
signals:
void macroCompleted();
signals:
void macroCompleted();
@@
-40,12
+76,15
@@
private slots:
void startNextCommand();
private:
void startNextCommand();
private:
- QString name;
- char keyMapping;
+ char key;
+ unsigned int buttonID;
CommandSequence commands;
CommandSequence::iterator currentCommand;
CommandSequence commands;
CommandSequence::iterator currentCommand;
+ unsigned int preMacroKeysetID;
static bool macroRunning; // only one macro can run at a time!
static bool macroRunning; // only one macro can run at a time!
+
+ MainWindow *mainWindow;
};
#endif // PIRMACRO_H
};
#endif // PIRMACRO_H