Implemented parsing of loop station presets

This commit is contained in:
2022-12-27 22:47:46 +01:00
parent b2f688c178
commit 56d56947c9
16 changed files with 981 additions and 371 deletions

View File

@@ -4,31 +4,18 @@
#include <QJsonArray>
#include <QJsonObject>
#include "drumpadpresets.h"
namespace json_converters {
namespace json_converters
{
QString jsonTypeToString(QJsonValue::Type type);
QJsonObject loadJson(const QByteArray &buffer);
QString parseString(const QJsonValue &jsonValue);
std::vector<QString> parseStringVector(const QJsonValue &jsonValue);
int parseInt(const QJsonValue &jsonValue);
bool parseBool(const QJsonValue &jsonValue);
bool parseBoolStr(const QJsonValue &jsonValue);
std::vector<int> parseIntVector(const QJsonValue &jsonValue);
std::vector<int> parseIntVectorIgnoreNulls(const QJsonValue &jsonValue);
template<std::size_t LENGTH>
std::array<QString, LENGTH> parseStringArray(const QJsonValue &jsonValue);
drumpad_presets::PresetsConfig parseDrumPadPresetsConfig(const QJsonObject &jsonObj);
std::vector<drumpad_presets::Category> parseCategoryVector(const QJsonValue &jsonValue);
std::map<QString, drumpad_presets::Preset> parsePresetMap(const QJsonValue &jsonValue);
drumpad_presets::Category parseCategory(const QJsonValue &jsonValue);
drumpad_presets::Filter parseFilter(const QJsonValue &jsonValue);
drumpad_presets::Preset parsePreset(const QJsonValue &jsonValue);
std::array<drumpad_presets::File, 24> parseFileArray(const QJsonValue &jsonValue);
drumpad_presets::File parseFile(const QJsonValue &jsonValue);
std::vector<drumpad_presets::Sequence> parseSequenceVector(const QJsonValue &jsonValue);
drumpad_presets::Sequence parseSequence(const QJsonValue &jsonValue);
std::map<QString, std::vector<drumpad_presets::Sequence>> parseSequenceVectorMap(const QJsonValue &jsonValue);
drumpad_presets::SequencePad parseSequencePad(const QJsonValue &jsonValue);
std::vector<drumpad_presets::SequencePad> parseSequencePadVector(const QJsonValue &jsonValue);
std::map<QString, std::vector<drumpad_presets::SequencePad>> parseSequencePadVectorMap(const QJsonValue &jsonValue);
}
} // namespace json_converters