sync modpack search field
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -135,4 +135,13 @@ void ImportFTBPage::triggerSearch()
|
||||
currentModel->setSearchTerm(ui->searchEdit->text());
|
||||
}
|
||||
|
||||
void ImportFTBPage::setSearchTerm(QString term)
|
||||
{
|
||||
ui->searchEdit->setText(term);
|
||||
}
|
||||
|
||||
QString ImportFTBPage::getSerachTerm() const
|
||||
{
|
||||
return ui->searchEdit->text();
|
||||
}
|
||||
} // namespace FTBImportAPP
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <Application.h>
|
||||
#include "modplatform/import_ftb/PackHelpers.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
#include "ui/pages/modplatform/ModpackProviderBasePage.h"
|
||||
#include "ui/pages/modplatform/import_ftb/ListModel.h"
|
||||
|
||||
class NewInstanceDialog;
|
||||
@@ -35,7 +35,7 @@ namespace Ui {
|
||||
class ImportFTBPage;
|
||||
}
|
||||
|
||||
class ImportFTBPage : public QWidget, public BasePage {
|
||||
class ImportFTBPage : public QWidget, public ModpackProviderBasePage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@@ -49,6 +49,11 @@ class ImportFTBPage : 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);
|
||||
|
||||
Reference in New Issue
Block a user