Subversion Repositories Code-Repo

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
354 Kevin 1
#ifndef MACROWIDGET_H
2
#define MACROWIDGET_H
3
 
4
#include "GlobalDefines.h"
5
 
6
#define MACRO_DEFAULT_COUNT 4
7
 
8
class MacroWidget : public QWidget
9
{
10
        Q_OBJECT
11
    public:
12
        MacroWidget(QWidget *parent = 0);
13
        ~MacroWidget();
14
 
15
        QSize sizeHint() const;
16
 
17
    public slots:
362 Kevin 18
        // *public* slots
19
        void EnableTransmit(void);
20
        void DisableTransmit(void);
21
        // *private* slots
22
        void InitTransmit(QWidget* t);
23
        void KeybindPrompt(int id);
24
        void AddEntry(void);
25
        void RemoveEntry(void);
26
        void Clear(void);
27
        void WriteToFile(void);
28
        void ReadFromFile(void);
354 Kevin 29
 
30
    signals:
362 Kevin 31
        void TransmitText(QByteArray data);
354 Kevin 32
 
33
    protected:
34
        bool eventFilter(QObject *, QEvent *);
35
 
36
    private:
362 Kevin 37
        int count;
354 Kevin 38
        bool connected;
39
        QString lastKnownFilePath;
40
 
41
        QPushButton *btnExport;
42
        QPushButton *btnImport;
43
        QPushButton *btnAddMacro;
44
        QPushButton *btnRemoveMacro;
45
        QPushButton *btnClear;
46
 
362 Kevin 47
        QList<QLineEdit*> nameList;
48
        QList<QTextEdit*> valueList;
49
        QList<QPushButton*> btnSendList;
50
        QList<QPushButton*> btnKeyList;
354 Kevin 51
 
52
        QList<QKeySequence> registeredKeySequences;
53
        QList<int> registeredKeyMacroIDs;
54
 
55
        QGridLayout *mainLayout;
56
        QHBoxLayout *ioLayout;
57
        QSignalMapper *sigmapTransmit;
58
        QSignalMapper *sigmapKeybind;
59
 
60
        QPair<QPushButton*,int> currKeyBindInfo;
61
};
62
 
63
#endif // MACROWIDGET