36571c5e22
This refactors the sorting methods to join every bit of it into a single list, easing maintanance. It also removes the weird index contraint on the list of methods by adding an index field to the DS that holds the method. Lastly, it puts the available methods on their respective API, so other resources on the same API can re-use them later on. Signed-off-by: flow <flowlnlnln@gmail.com>
27 lines
864 B
C++
27 lines
864 B
C++
#pragma once
|
|
|
|
#include "ui/pages/modplatform/ModModel.h"
|
|
#include "ui/pages/modplatform/flame/FlameResourcePages.h"
|
|
|
|
namespace ResourceDownload {
|
|
|
|
class FlameModModel : public ModModel {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
FlameModModel(const BaseInstance&);
|
|
~FlameModModel() override = default;
|
|
|
|
private:
|
|
[[nodiscard]] QString debugName() const override { return Flame::debugName() + " (Model)"; }
|
|
[[nodiscard]] QString metaEntryBase() const override { return Flame::metaEntryBase(); }
|
|
|
|
void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
|
void loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj) override;
|
|
void loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) override;
|
|
|
|
auto documentToArray(QJsonDocument& obj) const -> QJsonArray override;
|
|
};
|
|
|
|
} // namespace ResourceDownload
|