Skip to content
Snippets Groups Projects
confighandler.h 574 B
Newer Older
akiraohgaki's avatar
akiraohgaki committed
#pragma once

#include <QObject>
#include <QJsonObject>

#include "qtlib_config.h"

class ConfigHandler : public QObject
{
    Q_OBJECT

public:
    explicit ConfigHandler(QObject *parent = nullptr);
akiraohgaki's avatar
akiraohgaki committed

public slots:
    QJsonObject getAppConfigApplication() const;
    QJsonObject getAppConfigInstallTypes() const;
akiraohgaki's avatar
akiraohgaki committed

private:
    void importAppConfigApplication();
    void importAppConfigInstallTypes();
    QString convertPathString(const QString &path) const;
akiraohgaki's avatar
akiraohgaki committed

    qtlib::Config appConfig_;
    QJsonObject appConfigApplication_;
    QJsonObject appConfigInstallTypes_;
};