pollymc/launcher/ui/pages/modplatform/modrinth/ModrinthModel.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
752 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 "ModrinthPage.h"
#include "modplatform/modrinth/ModrinthPackIndex.h"
namespace Modrinth {
typedef std::function<void(QString)> LogoCallback;
class ListModel : public ModPlatform::ListModel {
Q_OBJECT
public:
ListModel(ModrinthPage* parent);
virtual ~ListModel();
public slots:
void searchRequestFinished(QJsonDocument& doc) override;
private:
const char** getSorts() const override;
};
} // namespace Modrinth