forked from RobertKrajewski/Sync-my-L2P
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.h
83 lines (62 loc) · 1.84 KB
/
options.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
82
83
#ifndef OPTIONS_H
#define OPTIONS_H
#include <QWidget>
#include <QFileDialog>
#include <QSettings>
#include <QDir>
#include <QFile>
#include "login.h"
class Browser;
namespace Ui {
class Options;
}
class Options : public QWidget
{
Q_OBJECT
public:
explicit Options(QWidget *parent = 0);
~Options();
void loadSettings();
void saveSettings();
// Getter
bool isUserDataSaveCheckBoxChecked();
bool isLearningMaterialsCheckBoxChecked();
bool isSharedLearningmaterialsCheckBoxChecked();
bool isAssignmentsCheckBoxChecked();
bool isMediaLibrarysCheckBoxChecked();
bool isAutoLoginOnStartCheckBoxChecked();
bool isAutoSyncOnStartCheckBoxChecked();
bool isMinimizeInTrayCheckBoxChecked();
bool isAutoCloseAfterSyncCheckBoxChecked();
bool isAutoBackgroundSyncCheckBoxChecked();
bool isOverrideFilesCheckBoxChecked();
QString getAccessToken() const;
int getLoginCounter();
QString downloadFolderLineEditText();
QString userNameLineEditText();
QString userPasswordLineEditText();
void init(Browser *browser);
signals:
void enableSignal(bool);
void switchTab(int);
void downloadFolderLineEditTextChanged(const QString text);
void successfulLogin();
public slots:
void on_loginPushButton_clicked();
private:
Ui::Options *ui;
Browser *browser;
// Zählvariable für jeden Loginversuch
int loginCounter;
Login login;
QString accessToken;
private slots:
void on_userDataSaveCheckBox_stateChanged(int);
void on_downloadFolderPushButton_clicked();
void on_autoLoginOnStartCheckBox_stateChanged(int arg1);
void on_downloadFolderlineEdit_textChanged(const QString);
void on_loginErasePushButton_clicked();
void loginResultSlot(int result);
void accessTokenChanged(QString newAccessToken);
};
#endif // OPTIONS_H