Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
345 Kevin 1
#ifndef MACROCONTROLLER
2
#define MACROCONTROLLER
3
 
4
#include "GlobalDefines.h"
5
 
349 Kevin 6
#define MACRO_DEFAULT_COUNT 4
345 Kevin 7
 
8
class MacroController : public QWidget
9
{
10
        Q_OBJECT
11
 
12
    public:
13
        MacroController(QWidget *parent = 0);
14
        ~MacroController();
15
 
348 Kevin 16
        QSize sizeHint() const;
17
 
345 Kevin 18
    public slots:
19
        void Macro_EnableTransmit(void);
20
        void Macro_DisableTransmit(void);
21
        void Macro_InitTransmit(QWidget* t);
349 Kevin 22
        void Macro_KeybindPrompt(int id);
345 Kevin 23
        void Macro_AddEntry(void);
24
        void Macro_RemoveEntry(void);
351 Kevin 25
        void Macro_Clear(void);
345 Kevin 26
        void Macro_WriteToFile(void);
27
        void Macro_ReadFromFile(void);
28
 
29
    signals:
30
        void Macro_TransmitText(QString string);
31
 
349 Kevin 32
    protected:
33
        bool eventFilter(QObject *, QEvent *);
34
 
345 Kevin 35
    private:
36
        int macroCount;
37
        bool connected;
346 Kevin 38
        QString lastKnownFilePath;
345 Kevin 39
 
40
        QPushButton *btnExport;
41
        QPushButton *btnImport;
348 Kevin 42
        QPushButton *btnAddMacro;
43
        QPushButton *btnRemoveMacro;
350 Kevin 44
        QPushButton *btnClear;
345 Kevin 45
 
46
        QList<QLineEdit*> macroNameList;
47
        QList<QTextEdit*> macroValueList;
349 Kevin 48
        QList<QPushButton*> macroBtnSendList;
49
        QList<QPushButton*> macroBtnKeyList;
345 Kevin 50
 
350 Kevin 51
        QList<QKeySequence> registeredKeySequences;
52
        QList<int> registeredKeyMacroIDs;
53
 
345 Kevin 54
        QGridLayout *mainLayout;
55
        QHBoxLayout *ioLayout;
349 Kevin 56
        QSignalMapper *sigmapTransmit;
57
        QSignalMapper *sigmapKeybind;
58
 
59
        QPair<QPushButton*,int> currKeyBindInfo;
345 Kevin 60
};
61
 
62
#endif // MACROCONTROLLER