You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
589 B
25 lines
589 B
#ifndef SCOPETRANSLATIONPARSER
|
|
#define SCOPETRANSLATIONPARSER
|
|
|
|
#include <optional>
|
|
#include <QMap>
|
|
#include <QString>
|
|
#include <QJsonObject>
|
|
#include <QPair>
|
|
|
|
class ScopeTranslationParser
|
|
{
|
|
public:
|
|
ScopeTranslationParser(QString configFilePath);
|
|
QMap<int, QString> parse() const;
|
|
|
|
private:
|
|
QByteArray readConfigFile() const;
|
|
QJsonObject createJsonObject(const QByteArray& jsonFileContent) const;
|
|
std::optional<QPair<int, QString> > getScopeTranslationFromJsonObj(
|
|
const QJsonObject& obj) const;
|
|
|
|
QString _configFilePath;
|
|
};
|
|
|
|
#endif //SCOPETRANSLATIONPARSER
|
|
|