Newer
Older
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
#pragma once
#include <QObject>
#include <QJsonObject>
#include "qtlib_config.h"
class ConfigHandler : public QObject
{
Q_OBJECT
public:
explicit ConfigHandler(QObject *parent = 0);
public slots:
QJsonObject getAppConfigApplication();
QJsonObject getAppConfigInstallTypes();
QJsonObject getAppConfigFeaturedProviders();
QJsonObject getUsrConfigApplication();
bool setUsrConfigApplication(const QJsonObject &object);
QJsonObject getUsrConfigProviders();
bool setUsrConfigProviders(const QJsonObject &object);
QJsonObject getUsrConfigCategories();
bool setUsrConfigCategories(const QJsonObject &object);
QJsonObject getUsrConfigInstalledItems();
bool setUsrConfigInstalledItems(const QJsonObject &object);
bool setUsrConfigProvidersProvider(const QString &providerKey, const QJsonObject &object);
bool removeUsrConfigProvidersProvider(const QString &providerKey);
bool setUsrConfigCategoriesProvider(const QString &providerKey, const QJsonObject &object);
bool removeUsrConfigCategoriesProvider(const QString &providerKey);
bool setUsrConfigCategoriesInstallType(const QString &providerKey, const QString &categoryKey, const QString &installType);
bool setUsrConfigInstalledItemsItem(const QString &itemKey, const QJsonObject &object);
bool removeUsrConfigInstalledItemsItem(const QString &itemKey);
private:
QString convertPathString(const QString &path);
qtlib::Config appConfig_;
qtlib::Config usrConfig_;
QJsonObject appConfigApplication_;
QJsonObject appConfigInstallTypes_;
};