-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinteraction.h
58 lines (46 loc) · 1.23 KB
/
interaction.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
#ifndef INTERACTION_H
#define INTERACTION_H
#include <QDialog>
class QIcon;
class QLineEdit;
class QMessageBox;
class QLabel;
/*
Main interaction with the user,
TODO This class should be changed as it's messy,
*/
class Interaction:QObject
{
Q_OBJECT
public:
explicit Interaction(QWidget *parent, QIcon icon);
~Interaction();
void closeEvent(QCloseEvent *event);
QString askForShortcut(QWidget *parent,QString pathToFile, bool edit = false);
int msgShortcutExists();
void msgShortcutAdded(QString shortcut);
void msgShortcutError(QString shortcut);
void msgShortcutInUse();
bool msgDoYouWantToDelete(QString path, QString oldShortcut);
void shortcutUsedByOtherSoftware(QString path);
void noShortcutSelected();
void shortcutIncorrect();
void msgChecker(QString message);
void msgChecker( int message, QString msg = "");
signals:
private slots:
void cancelSlot();
void addSlot();
private:
void errorShortcutEntered();
void setDialog();
QMessageBox *msgBox;
QString *returnMessage;
bool addButtonClicked;
QLineEdit *shortcutEdit;
QDialog *dialog;
// dialog's widgets:
QLabel *topLabel;
QPushButton *addBut;
};
#endif // INTERACTION_H