ui: integrated autocompletion and filtering into SearchView
- QtSearchView was split into QtSearchView and QtSearchBox. - QtSearchBox contains all Qt elements and can use them purely - QtSearchView forwards calls from the SearchController to QtSearchBox - Searching is initiated with MessageSearch to the SearchController - Autocompletion is initiated with MessageSearchAutocomplete to the SearchController - The search field is able to create filter queries by only giving autocompletions for the last token in the query - For named tokens the search field adds their token ids to the query in the form of "A,25" for faster lookup bug id = #21
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define SEARCH_VIEW_H
|
||||
|
||||
#include "component/view/View.h"
|
||||
#include "data/SearchIndex.h"
|
||||
|
||||
class SearchController;
|
||||
|
||||
@@ -15,7 +16,7 @@ public:
|
||||
|
||||
virtual void setText(const std::string& s) = 0;
|
||||
virtual void setFocus() = 0;
|
||||
virtual void setAutocompletionList(const std::vector<std::string>& autocompletionList) = 0;
|
||||
virtual void setAutocompletionList(const std::vector<SearchIndex::SearchMatch>& autocompletionList) = 0;
|
||||
|
||||
protected:
|
||||
SearchController* getController();
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
virtual ~View();
|
||||
|
||||
virtual std::string getName() const = 0;
|
||||
|
||||
virtual void createWidgetWrapper() = 0;
|
||||
virtual void initView() = 0;
|
||||
virtual void refreshView() = 0;
|
||||
|
||||
Reference in New Issue
Block a user