aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ModPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/modplatform/ModPage.h')
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index cf00e16e..09c38d8b 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -8,6 +8,7 @@
#include "ui/pages/BasePage.h"
#include "ui/pages/modplatform/ModModel.h"
#include "ui/widgets/ModFilterWidget.h"
+#include "ui/widgets/ProgressWidget.h"
class ModDownloadDialog;
@@ -45,6 +46,11 @@ class ModPage : public QWidget, public BasePage {
auto getFilter() const -> const std::shared_ptr<ModFilterWidget::Filter> { return m_filter; }
auto getDialog() const -> const ModDownloadDialog* { return dialog; }
+ /** Get the current term in the search bar. */
+ auto getSearchTerm() const -> QString;
+ /** Programatically set the term in the search bar. */
+ void setSearchTerm(QString);
+
auto getCurrent() -> ModPlatform::IndexedPack& { return current; }
void updateModVersions(int prev_count = -1);
@@ -70,10 +76,15 @@ class ModPage : public QWidget, public BasePage {
ModFilterWidget filter_widget;
std::shared_ptr<ModFilterWidget::Filter> m_filter;
+ ProgressWidget m_fetch_progress;
+
ModPlatform::ListModel* listModel = nullptr;
ModPlatform::IndexedPack current;
std::unique_ptr<ModAPI> api;
int selectedVersion = -1;
+
+ // Used to do instant searching with a delay to cache quick changes
+ QTimer m_search_timer;
};