Refactor config API

This commit is contained in:
LordGrey
2024-08-01 23:07:18 +02:00
parent 4a5b0b6bf2
commit c86af5ce79
42 changed files with 1605 additions and 889 deletions

View File

@@ -0,0 +1,22 @@
#ifndef CONFIGIMPORTEXPORT_H
#define CONFIGIMPORTEXPORT_H
#include <db/DBManager.h>
#include <QFile>
#include <QJsonDocument>
class ConfigImportExport : public DBManager
{
public:
ConfigImportExport(QObject* parent = nullptr);
// TODO: Check naming seConfiguration
QPair<bool, QStringList> importJson(const QString& configFile);
bool exportJson(const QString& path = "") const;
QPair<bool, QStringList> setConfiguration(const QJsonObject& config);
QJsonObject getConfiguration(const QList<quint8>& instances = {}, bool addGlobalConfig = true, const QStringList& instanceFilteredTypes = {}, const QStringList& globalFilterTypes = {} ) const;
};
#endif // CONFIGIMPORTEXPORT_H