forked from 4lex4/scantailor-advanced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefaultParamsProfileManager.h
43 lines (27 loc) · 987 Bytes
/
DefaultParamsProfileManager.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
#ifndef SCANTAILOR_DEFAULTPARAMSPROFILEMANAGER_H
#define SCANTAILOR_DEFAULTPARAMSPROFILEMANAGER_H
#include <foundation/NonCopyable.h>
#include <QtCore/QString>
#include <list>
#include <memory>
class DefaultParams;
class DefaultParamsProfileManager {
DECLARE_NON_COPYABLE(DefaultParamsProfileManager)
public:
DefaultParamsProfileManager();
explicit DefaultParamsProfileManager(const QString& path);
enum LoadStatus {
SUCCESS,
IO_ERROR,
INCOMPATIBLE_VERSION_ERROR
};
std::list<QString> getProfileList() const;
std::unique_ptr<DefaultParams> readProfile(const QString& name, LoadStatus* status = nullptr) const;
bool writeProfile(const DefaultParams& params, const QString& name) const;
bool deleteProfile(const QString& name) const;
std::unique_ptr<DefaultParams> createDefaultProfile() const;
std::unique_ptr<DefaultParams> createSourceProfile() const;
private:
QString m_path;
};
#endif // SCANTAILOR_DEFAULTPARAMSPROFILEMANAGER_H