-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
44 lines (40 loc) · 1.08 KB
/
settings.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
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QtGlobal>
#include <QSettings>
#include <QString>
class Settings
{
private:
QSettings sfile_;
int backpause_min_;
bool autopause_enabled_;
bool autostart_timing_;
bool start_minimized_;
bool start_pinned_to_top_;
bool warning_nopause_;
bool warning_activity_;
int warning_nopause_min_;
int pause_for_warning_nopause_min_;
int warning_activity_min_;
bool log_to_file_;
void readSettingsFile();
void writeSettingsFile();
public:
Settings(const QString filename);
bool isAutopauseEnabled() const;
bool isAutostartTimingEnabled() const;
bool isMinimizedStartEnabled() const;
bool isPinnedStartEnabled() const;
bool showNoPauseWarning() const;
bool showTooMuchActivityWarning() const;
bool logToFile() const;
QString getBackpauseMin() const;
qint64 getBackpauseMsec() const;
qint64 getPauseTimeForWarnTimeNoPauseMsec() const;
qint64 getWarnTimeNoPauseMsec() const;
qint64 getWarnTimeActivityMsec() const;
void setAutopauseState(const bool autopause_enabled);
void setPinToTopState(const bool pin2top_enabled);
};
#endif // SETTINGS_H