-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshortcut.h
81 lines (65 loc) · 1.61 KB
/
shortcut.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef SHORTCUT_H
#define SHORTCUT_H
#include <QMainWindow>
#define TEST true
class QLineEdit;
class QTableWidget;
class QPushButton;
class QWidget;
class QIcon;
class QHBoxLayout;
class QAction;
class ShortcutList;
class QLocalServer;
class QLocalSocket;
class QSystemSemaphore;
class QTableWidgetItem;
class Interaction;
/*
This is the main class that uses other classes to manage shortcuts.
It also displayes the user interface.
*/
class Shortcut : public QMainWindow
{
Q_OBJECT
// static variables
static const QString Connection;
public:
explicit Shortcut(int argc, char* argv[]);
~Shortcut();
void createWindow();
private slots:
void slotFind();
void slotEditShortcutButton();
void slotEditShortcutTable(QTableWidgetItem *item);
void slotDeleteShortcut();
void slotExit();
void slotCreateMenu();
void slotShortcutListChanged();
void keyPressEvent(QKeyEvent *event);
void slotSearchBoxTextChanged();
private:
void createWidgets();
void stealthInteraction(QString path);
QHBoxLayout* setUpBottomPanel();
void setUpCentralList();
void loadListContent();
void addShortcut();
bool setUpServer();
void setUpSocket();
void signalServer();
bool containsLetterAndNumbersOnly(QString name);
QWidget *window;
QLineEdit *searchBox;
QTableWidget *shortcutTable;
QPushButton *editBut;
QPushButton *delBut;
QPushButton *exitBut;
// Menu Items
QAction *aboutAction;
ShortcutList *shortcutList;
QLocalSocket *socket;
QLocalServer *server;
Interaction *interaction;
};
#endif // SHORTCUT_H