sync modpack search field
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
fa92e6bd29
commit
946e791d39
16 changed files with 150 additions and 13 deletions
|
@ -369,4 +369,13 @@ void Page::triggerSearch()
|
|||
currentModel->setSearchTerm(ui->searchEdit->text());
|
||||
}
|
||||
|
||||
void Page::setSearchTerm(QString term)
|
||||
{
|
||||
ui->searchEdit->setText(term);
|
||||
}
|
||||
|
||||
QString Page::getSerachTerm() const
|
||||
{
|
||||
return ui->searchEdit->text();
|
||||
}
|
||||
} // namespace LegacyFTB
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "QObjectPtr.h"
|
||||
#include "modplatform/legacy_ftb/PackFetchTask.h"
|
||||
#include "modplatform/legacy_ftb/PackHelpers.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
#include "ui/pages/modplatform/ModpackProviderBasePage.h"
|
||||
|
||||
class NewInstanceDialog;
|
||||
|
||||
|
@ -57,7 +57,7 @@ class ListModel;
|
|||
class FilterModel;
|
||||
class PrivatePackManager;
|
||||
|
||||
class Page : public QWidget, public BasePage {
|
||||
class Page : public QWidget, public ModpackProviderBasePage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -71,6 +71,11 @@ class Page : public QWidget, public BasePage {
|
|||
void openedImpl() override;
|
||||
void retranslate() override;
|
||||
|
||||
/** Programatically set the term in the search bar. */
|
||||
virtual void setSearchTerm(QString) override;
|
||||
/** Get the current term in the search bar. */
|
||||
[[nodiscard]] virtual QString getSerachTerm() const override;
|
||||
|
||||
private:
|
||||
void suggestCurrent();
|
||||
void onPackSelectionChanged(Modpack* pack = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue