#ifndef CONFIGMANAGER_P_H
#define CONFIGMANAGER_P_H
#include "uosai_global.h"

#include <QObject>
#include <QFileSystemWatcher>
#include <QTimer>
#include <QVariantHash>
#include <QReadWriteLock>
#include <QSettings>

namespace  uos_ai {

class ConfigManagerPrivate : public QObject
{
    Q_OBJECT
public:
    explicit ConfigManagerPrivate(QObject *parent = nullptr);

    QVariant value(const QString &group, const QString &key) const;

    void setDefaultConfig();

    QSettings *set = nullptr;
    QString configPath;
    QFileSystemWatcher *configWatcher { nullptr };
    QTimer delayLoadTimer;
    mutable QReadWriteLock mutex;
};
}

#endif   // CONFIGMANAGER_P_H
