lolautoaccept/include/config.h

39 lines
590 B
C++

#pragma once
#include <QJsonObject>
class Config {
public:
struct StageConfig {
StageConfig();
StageConfig(const QJsonObject&);
operator QJsonObject() const;
std::vector<std::string> champs;
bool enabled;
};
struct RootConfig {
RootConfig();
RootConfig(const QJsonObject&);
operator QJsonObject() const;
StageConfig prepick;
StageConfig ban;
StageConfig pick;
bool enabledAutoAccept;
};
Config();
~Config();
bool load();
void save();
RootConfig& getConfig();
private:
std::string configFolderPath;
std::string configFilePath;
RootConfig root;
};