Summary:
Move from the searchbox to the search results listbox/view using the
down arrow key in addition to the existing methods using the tab key,
return key, or the mouse.
Test Plan:
use ctrl+f to search in a directory tree, press down arrow key
to go to the results
Reviewers: ngraham, #dolphin
Reviewed By: ngraham, #dolphin
Subscribers: meven, elvisangelaccio, ngraham, iasensio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26362
connect(m_searchBox, &DolphinSearchBox::activated, this, &DolphinViewContainer::activate);
connect(m_searchBox, &DolphinSearchBox::closeRequest, this, &DolphinViewContainer::closeSearchBox);
connect(m_searchBox, &DolphinSearchBox::searchRequest, this, &DolphinViewContainer::startSearching);
connect(m_searchBox, &DolphinSearchBox::activated, this, &DolphinViewContainer::activate);
connect(m_searchBox, &DolphinSearchBox::closeRequest, this, &DolphinViewContainer::closeSearchBox);
connect(m_searchBox, &DolphinSearchBox::searchRequest, this, &DolphinViewContainer::startSearching);
- connect(m_searchBox, &DolphinSearchBox::returnPressed, this, &DolphinViewContainer::requestFocus);
+ connect(m_searchBox, &DolphinSearchBox::focusViewRequest, this, &DolphinViewContainer::requestFocus);
m_searchBox->setWhatsThis(xi18nc("@info:whatsthis findbar",
"<para>This helps you find files and folders. Enter a <emphasis>"
"search term</emphasis> and specify search settings with the "
m_searchBox->setWhatsThis(xi18nc("@info:whatsthis findbar",
"<para>This helps you find files and folders. Enter a <emphasis>"
"search term</emphasis> and specify search settings with the "
m_searchInput->clear();
}
}
m_searchInput->clear();
}
}
+ else if (event->key() == Qt::Key_Down) {
+ emit focusViewRequest();
+ }
}
bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event)
}
bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event)
void DolphinSearchBox::slotReturnPressed()
{
emitSearchRequest();
void DolphinSearchBox::slotReturnPressed()
{
emitSearchRequest();
+ emit focusViewRequest();
}
void DolphinSearchBox::slotFacetChanged()
}
void DolphinSearchBox::slotFacetChanged()
*/
void searchTextChanged(const QString& text);
*/
void searchTextChanged(const QString& text);
- void returnPressed();
-
/**
* Emitted as soon as the search box should get closed.
*/
/**
* Emitted as soon as the search box should get closed.
*/
* @see DolphinSearchBox::setActive()
*/
void activated();
* @see DolphinSearchBox::setActive()
*/
void activated();
+ void focusViewRequest();
private slots:
void emitSearchRequest();
private slots:
void emitSearchRequest();