PrismLauncher/launcher/ui/pages/modplatform/modrinth/ModrinthPage.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

25 lines
824 B
C++

#pragma once
#include "ui/pages/modplatform/ModPage.h"
class ModrinthPage : public ModPage {
Q_OBJECT
public:
explicit ModrinthPage(ModDownloadDialog* dialog, BaseInstance* instance);
virtual ~ModrinthPage() = default;
inline QString displayName() const override { return tr("Modrinth"); }
inline QIcon icon() const override { return APPLICATION->getThemedIcon("modrinth"); }
inline QString id() const override { return "modrinth"; }
inline QString helpPage() const override { return "Modrinth-platform"; }
inline QString debugName() const override { return tr("Modrinth"); }
inline QString metaEntryBase() const override { return "ModrinthPacks"; };
bool shouldDisplay() const override;
private:
void onModVersionSucceed(ModPage*, QByteArray*, QString) override;
};