PrismLauncher/launcher/ui/pages/modplatform/modrinth/ModrinthModModel.h

26 lines
705 B
C
Raw Normal View History

2022-01-14 08:43:42 +00:00
#pragma once
#include "ModrinthModPage.h"
2022-01-14 08:43:42 +00:00
namespace Modrinth {
class ListModel : public ModPlatform::ListModel {
2022-01-14 08:43:42 +00:00
Q_OBJECT
public:
ListModel(ModrinthModPage* parent) : ModPlatform::ListModel(parent){};
~ListModel() override = default;
private:
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
void loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) override;
auto documentToArray(QJsonDocument& obj) const -> QJsonArray override;
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
static const char* sorts[5];
inline auto getSorts() const -> const char** override { return sorts; };
2022-01-14 08:43:42 +00:00
};
} // namespace Modrinth