aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ModPage.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-04-16 18:03:03 +0200
committerGitHub <noreply@github.com>2022-04-16 18:03:03 +0200
commita42d2afceee9f6ea0d209cfb03b178defff1ce60 (patch)
treef0c0dedd898dea025796abc0bce8b303b84e18b4 /launcher/ui/pages/modplatform/ModPage.h
parentdb7cb125518e85f555b8816442b2ce2db4648cd8 (diff)
parent8e9eca6a970bf098c1045658368dc66b39e438ed (diff)
downloadPrismLauncher-a42d2afceee9f6ea0d209cfb03b178defff1ce60.tar.gz
PrismLauncher-a42d2afceee9f6ea0d209cfb03b178defff1ce60.tar.bz2
PrismLauncher-a42d2afceee9f6ea0d209cfb03b178defff1ce60.zip
Merge pull request #392 from flowln/mod_filter
Diffstat (limited to 'launcher/ui/pages/modplatform/ModPage.h')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index 0cd13f37..85aaede9 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -7,6 +7,7 @@
#include "modplatform/ModIndex.h"
#include "ui/pages/BasePage.h"
#include "ui/pages/modplatform/ModModel.h"
+#include "ui/widgets/ModFilterWidget.h"
class ModDownloadDialog;
@@ -39,9 +40,10 @@ class ModPage : public QWidget, public BasePage {
virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const -> bool = 0;
auto apiProvider() const -> const ModAPI* { return api.get(); };
+ auto getFilter() const -> const std::shared_ptr<ModFilterWidget::Filter> { return m_filter; }
auto getCurrent() -> ModPlatform::IndexedPack& { return current; }
- void updateModVersions();
+ void updateModVersions(int prev_count = -1);
void openedImpl() override;
auto eventFilter(QObject* watched, QEvent* event) -> bool override;
@@ -52,6 +54,7 @@ class ModPage : public QWidget, public BasePage {
void updateSelectionButton();
protected slots:
+ virtual void filterMods();
void triggerSearch();
void onSelectionChanged(QModelIndex first, QModelIndex second);
void onVersionSelectionChanged(QString data);
@@ -60,6 +63,10 @@ class ModPage : public QWidget, public BasePage {
protected:
Ui::ModPage* ui = nullptr;
ModDownloadDialog* dialog = nullptr;
+
+ ModFilterWidget filter_widget;
+ std::shared_ptr<ModFilterWidget::Filter> m_filter;
+
ModPlatform::ListModel* listModel = nullptr;
ModPlatform::IndexedPack current;