-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSmartDirSettings.h
68 lines (43 loc) · 1.31 KB
/
SmartDirSettings.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
//
// Created by septemberhx on 2020/6/4.
//
#ifndef DDE_SMART_DIR_SMARTDIRSETTINGS_H
#define DDE_SMART_DIR_SMARTDIRSETTINGS_H
#include <QStringList>
#include <QObject>
#include <QMap>
class SmartDirSettings : public QObject {
Q_OBJECT
public:
static SmartDirSettings *instance();
const QStringList &watchedDirPaths() const;
int getItemSize() const;
void setItemSize(int itemSize);
void setDefaultItemSize();
void setWatchedDirPaths(const QStringList &watchedDirPaths);
int getCountPerPage() const;
void setCountPerPage(int countPerPage);
int getDirCountPerRow() const;
void setDirCountPerRow(int dirCountPerRow);
bool isEnableDirList() const;
void setEnableDirList(bool enableDirList);
void setDefaultCountPerPage();
void setDefaultDirCountPerRow();
void setDefaultEnableDirList();
const QMap<QString, bool> &getEnableDirFlagMap() const;
void setEnableDirFlagMap(const QMap<QString, bool> &enableDirFlagMap);
signals:
void settingsChanged();
private:
SmartDirSettings();
void saveSettings();
void readSettings();
private:
QStringList _watchedDirPaths;
QMap<QString, bool> enableDirFlagMap;
int itemSize;
int countPerPage;
int dirCountPerRow;
bool enableDirList;
};
#endif //DDE_SMART_DIR_SMARTDIRSETTINGS_H