2d68308d49
Moves all things related to creating the URLs of the mod platforms that go to network tasks to a single place, so that: 1. Maintaining and fixing eventual issues is more straightforward. 2. Makes it possible to factor out more common code between the different modplatform pages
40 lines
735 B
C++
40 lines
735 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();
|
|
|
|
private slots:
|
|
void searchRequestFinished() override;
|
|
|
|
private:
|
|
const char** getSorts() const override;
|
|
};
|
|
|
|
} // namespace Modrinth
|