ui: Changed full text search character to ? and added shortcut CTRL+SHIFT+F

This commit is contained in:
Eberhard Graether
2016-06-13 21:07:14 +02:00
parent b07d03692d
commit 208f2b1158
12 changed files with 69 additions and 20 deletions
+12
View File
@@ -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);
+3
View File
@@ -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;