forked from mastermune/InputRedirectionClient-Qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsshortcut.h
51 lines (45 loc) · 1.29 KB
/
tsshortcut.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef TSSHORTCUT_H
#define TSSHORTCUT_H
#include "global.h"
#include <QListView>
#include <QList>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QComboBox>
#include <QColorDialog>
class TsShortcut : public QWidget
{
public:
TsShortcut(QWidget *parent = nullptr);
void setCurrentPos(QPoint pos);
void updateTitleText();
void showEvent(QShowEvent * event);
void loadNewShortcuts(void);
private:
QString wTitle;
QVBoxLayout *layout;
QFormLayout *formLayout;
QListWidget *lstWidget;
QLabel *lblDirections;
QPushButton *btnColorDialog, *btnCreateShort,
*btnDelShort, *btnHelp, *btnPressNow;
QLineEdit* txtShortName;
QPoint curPos;
QComboBox* cboxBtns;
QColor curColor;
QComboBox* populateItems();
void instantiateWidgets();
void addWidgetsToLayout();
void connectEvents();
void connectColorButtonEvent();
void connectCreateButtonEvent();
void connectDeleteButtonEvent();
void connectPressButtonEvent();
void connectHelpButtonEvent();
void connectNameChangeEvent();
void connectButtonChangeEvent();
void connectSelectedChangeEvent();
void saveShortcut(uint i);
QListWidgetItem * createShortcutListItem(ShortCut newShortCut);
};
#endif // TSSHORTCUT_H