-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwaka_options.h
54 lines (41 loc) · 1.07 KB
/
waka_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
#ifndef WAKATIME_OPTIONS_H
#define WAKATIME_OPTIONS_H
#include <coreplugin/dialogs/ioptionspage.h>
#include <QPointer>
#include <QWidget>
namespace Wakatime {
namespace Internal {
class WakaOptions : public QObject
{
Q_OBJECT
public:
WakaOptions(QObject *parent = nullptr);
virtual ~WakaOptions() override = default;
void read();
void save();
bool isDebug() const;
bool isEnabled() const;
bool inStatusBar() const;
bool hasKey() const;
QString apiKey() const;
QString excludePattern() const;
void setDebug(bool val);
void setEnabled(bool val);
void setStatusBar(bool val);
void setApiKey(const QString &val);
void setExcludePatern(const QString &val);
signals:
void apiKeyChanged();
void ignorePaternChanged();
void inStatusBarChanged();
private:
bool _isDebug = true;
bool _isEnabled = true;
bool _statusBarEnabled = false;
QString _apiKey;
QString _excludePattern;
QString _wakatimeCFG;
};
} // namespace Internal
} // namespace QtCreatorWakatime
#endif // WAKATIME_OPTIONS_H