Skip to content
Snippets Groups Projects
Commit c27230b6 authored by albrecpe's avatar albrecpe
Browse files

Change search button to filter and search

parent 7639b169
No related branches found
No related tags found
1 merge request!442Fix: skill gui live search
Pipeline #18374 passed
......@@ -12,6 +12,13 @@ namespace armarx::skills::gui
emit searchRequest(search);
}
void
SkillGroupBox::filterAndFetch()
{
memory->updateFromMemory();
handleSearch();
}
void
SkillGroupBox::connectGui(std::string observerName)
{
......@@ -55,7 +62,12 @@ namespace armarx::skills::gui
// text
this->searchBar->setPlaceholderText(QString::fromStdString("Search ..."));
this->acceptSearchButton->setText(QString::fromStdString("Search"));
this->acceptSearchButton->setText(QString::fromStdString("Update and Search"));
// some further information to explain the search bar
this->searchBar->setToolTip(
QString::fromStdString("Accepting the search (with Enter) searches all currently known "
"skills. This is not the same as 'Update & Search'!"));
connectSignals();
}
......@@ -64,7 +76,7 @@ namespace armarx::skills::gui
SkillGroupBox::connectSignals()
{
connect(
this->acceptSearchButton, &QPushButton::clicked, this, &SkillGroupBox::handleSearch);
this->acceptSearchButton, &QPushButton::clicked, this, &SkillGroupBox::filterAndFetch);
connect(this->searchBar, &QLineEdit::editingFinished, this, &SkillGroupBox::handleSearch);
connect(this,
&SkillGroupBox::searchRequest,
......
......@@ -50,6 +50,11 @@ namespace armarx::skills::gui
*/
void handleSearch();
/**
* @brief Applies the update, and requests an update from memory.
*/
void filterAndFetch();
private:
void setupUi();
void connectSignals();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment