-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfighelper.h
65 lines (49 loc) · 1.53 KB
/
confighelper.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
#ifndef CONFIGHELPER_H
#define CONFIGHELPER_H
#include <QObject>
#include "utils.h"
#include <QStringList>
#include <QSettings>
#include <QTime>
#include <QStandardItemModel>
class ConfigHelper : public QObject {
Q_OBJECT
public:
explicit ConfigHelper(QObject *parent = nullptr);
void readSettings();
void saveSettings();
bool isFirstTimeUsing() const;
bool isStartAtBoot() const;
RunningStrategy getRunningStrategy() const;
int getCpuTriggerPercent() const;
QTime &getTimeTriggerPoint();
int getScanInterval() const;
void setSettings(bool st, int cpuPct, int intv, bool autoCal, int edgePct);
void setSettings(bool st, const QTime &timeTriPt, int intv, bool autoCal, int edgePct);
bool hasLastInterrupted() const;
InterruptionType getInterruptionType() const;
void setInterruptionType(InterruptionType it);
void close();
QStandardItemModel *pathModel;
void setFileIndexFinished(bool value);
bool isFileIndexFinished() const;
bool isAutoCalRelation() const;
int getDisplayEdgePercent() const;
signals:
public slots:
private:
bool firstTimeUsing;
bool startAtBoot;
bool onlyOneInstace;//TODO:check if only one instance
RunningStrategy runningStrategy;
int cpuTriggerPercent;
QTime timeTriggerPoint;
int scanIntervalHours;
bool fileIndexFinished;
int displayEdgePercent;
QSettings *settings;
static const QString pathProfix;
InterruptionType interruptionType;
bool autoCalculateRelation;
};
#endif // CONFIGHELPER_H