pollymc/launcher/ui/pages/modplatform/flame/FlameModModel.h
flow f714adf6d2
refactor: move NetJob away from ModModel to ModAPI
This is done so that 1. ModAPI behaves more like an actual API instead
of just a helper, and 2. Allows for more easily creating other mod
providers that may or may not use network tasks (foreshadowing lol)
2022-03-07 16:22:57 -03:00

40 lines
746 B
C++

#pragma once
#include <RWStorage.h>
#include <QIcon>
#include <QList>
#include <QMetaType>
#include <QSortFilterProxyModel>
#include <QString>
#include <QStringList>
#include <QStyledItemDelegate>
#include <QThreadPool>
#include <net/NetJob.h>
#include <functional>
#include "BaseInstance.h"
#include "FlameModPage.h"
#include "modplatform/flame/FlameModIndex.h"
namespace FlameMod {
typedef std::function<void(QString)> LogoCallback;
class ListModel : public ModPlatform::ListModel {
Q_OBJECT
public:
ListModel(FlameModPage* parent);
virtual ~ListModel();
private slots:
void searchRequestFinished(QJsonDocument& doc) override;
private:
const char** getSorts() const override;
};
} // namespace Modrinth