pollymc/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
flow 0dd1c26cf3
refactor: extract common code in mod pages and model
This creates a hierarchy in which ModPage and ModModel are the parents
of every mod provider, providing the basic functionality common to all
of them.

It also imposes a unique .ui file (they were already equal before, just
duplicated basically) on all mod providers.
2022-03-02 21:52:44 -03:00

38 lines
722 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 performPaginatedSearch() override;
void searchRequestFinished() override;
};
} // namespace Modrinth