diff options
author | Jamie Mansfield <jmansfield@cadixdev.org> | 2021-02-11 00:19:49 +0000 |
---|---|---|
committer | Jamie Mansfield <jmansfield@cadixdev.org> | 2021-02-11 00:57:07 +0000 |
commit | 152d476f20d06dff6aecca057c3d01776f3ac975 (patch) | |
tree | 7ca127b820d1799fa502976385c8bcd41da64b53 /application/pages/modplatform/atlauncher/AtlPage.cpp | |
parent | 40bdb0ffd6dd1c028f12b5a5b145325a200e056e (diff) | |
download | PrismLauncher-152d476f20d06dff6aecca057c3d01776f3ac975.tar.gz PrismLauncher-152d476f20d06dff6aecca057c3d01776f3ac975.tar.bz2 PrismLauncher-152d476f20d06dff6aecca057c3d01776f3ac975.zip |
NOISSUE Add search to ATLauncher
Diffstat (limited to 'application/pages/modplatform/atlauncher/AtlPage.cpp')
-rw-r--r-- | application/pages/modplatform/atlauncher/AtlPage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/application/pages/modplatform/atlauncher/AtlPage.cpp b/application/pages/modplatform/atlauncher/AtlPage.cpp index 4518248d..f90d734c 100644 --- a/application/pages/modplatform/atlauncher/AtlPage.cpp +++ b/application/pages/modplatform/atlauncher/AtlPage.cpp @@ -25,6 +25,8 @@ AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent) } ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); + connect(ui->searchEdit, &QLineEdit::textChanged, this, &AtlPage::triggerSearch); + connect(ui->resetButton, &QPushButton::clicked, this, &AtlPage::resetSearch); connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &AtlPage::onSortingSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &AtlPage::onSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &AtlPage::onVersionSelectionChanged); @@ -59,6 +61,16 @@ void AtlPage::suggestCurrent() }); } +void AtlPage::triggerSearch() +{ + filterModel->setSearchTerm(ui->searchEdit->text()); +} + +void AtlPage::resetSearch() +{ + ui->searchEdit->setText(""); +} + void AtlPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); |