ui: Changed full text search character to ? and added shortcut CTRL+SHIFT+F
This commit is contained in:
@@ -12,6 +12,7 @@ QtSearchView::QtSearchView(ViewLayout* viewLayout)
|
||||
, m_refreshViewFunctor(std::bind(&QtSearchView::doRefreshView, this))
|
||||
, m_setMatchesFunctor(std::bind(&QtSearchView::doSetMatches, this, std::placeholders::_1))
|
||||
, m_setFocusFunctor(std::bind(&QtSearchView::doSetFocus, this))
|
||||
, m_findFulltextFunctor(std::bind(&QtSearchView::doFindFulltext, this))
|
||||
, m_setAutocompletionListFunctor(std::bind(&QtSearchView::doSetAutocompletionList, this, std::placeholders::_1))
|
||||
{
|
||||
m_widget = new QtSearchBar();
|
||||
@@ -46,6 +47,11 @@ void QtSearchView::setFocus()
|
||||
m_setFocusFunctor();
|
||||
}
|
||||
|
||||
void QtSearchView::findFulltext()
|
||||
{
|
||||
m_findFulltextFunctor();
|
||||
}
|
||||
|
||||
void QtSearchView::setAutocompletionList(const std::vector<SearchMatch>& autocompletionList)
|
||||
{
|
||||
m_setAutocompletionListFunctor(autocompletionList);
|
||||
@@ -69,6 +75,12 @@ void QtSearchView::doSetFocus()
|
||||
m_widget->setFocus();
|
||||
}
|
||||
|
||||
void QtSearchView::doFindFulltext()
|
||||
{
|
||||
getViewLayout()->showView(this);
|
||||
m_widget->findFulltext();
|
||||
}
|
||||
|
||||
void QtSearchView::doSetAutocompletionList(const std::vector<SearchMatch>& autocompletionList)
|
||||
{
|
||||
m_widget->setAutocompletionList(autocompletionList);
|
||||
|
||||
@@ -21,12 +21,14 @@ public:
|
||||
// SearchView implementation
|
||||
virtual void setMatches(const std::vector<SearchMatch>& matches);
|
||||
virtual void setFocus();
|
||||
virtual void findFulltext();
|
||||
virtual void setAutocompletionList(const std::vector<SearchMatch>& autocompletionList);
|
||||
|
||||
private:
|
||||
void doRefreshView();
|
||||
void doSetMatches(const std::vector<SearchMatch>& matches);
|
||||
void doSetFocus();
|
||||
void doFindFulltext();
|
||||
void doSetAutocompletionList(const std::vector<SearchMatch>& autocompletionList);
|
||||
|
||||
void setStyleSheet();
|
||||
@@ -34,6 +36,7 @@ private:
|
||||
QtThreadedFunctor<> m_refreshViewFunctor;
|
||||
QtThreadedFunctor<const std::vector<SearchMatch>&> m_setMatchesFunctor;
|
||||
QtThreadedFunctor<> m_setFocusFunctor;
|
||||
QtThreadedFunctor<> m_findFulltextFunctor;
|
||||
QtThreadedFunctor<const std::vector<SearchMatch>&> m_setAutocompletionListFunctor;
|
||||
|
||||
QtSearchBar* m_widget;
|
||||
|
||||
Reference in New Issue
Block a user