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:
Eberhard Graether
2014-09-11 14:53:03 +02:00
parent 760e5ffafd
commit fec7abbc9b
48 changed files with 786 additions and 391 deletions
+5 -2
View File
@@ -13,7 +13,9 @@ class QueryNode;
class QueryTree
{
public:
QueryTree(std::string query);
static std::deque<std::string> tokenizeQuery(const std::string& query);
QueryTree(const std::string& query);
~QueryTree();
std::shared_ptr<QueryNode> getRoot() const;
@@ -26,7 +28,8 @@ private:
std::shared_ptr<QueryNode> buildTree(std::deque<std::string>& tokens, std::shared_ptr<QueryNode> frontNode);
std::shared_ptr<QueryNode> buildGroup(std::deque<std::string>& tokens, QueryOperator::OperatorType closeType);
std::shared_ptr<QueryNode> getNextNode(std::deque<std::string>& tokens);
std::shared_ptr<QueryNode> createCommand(std::string name);
std::shared_ptr<QueryNode> createCommand(const std::string& name);
std::shared_ptr<QueryNode> createToken(const std::string& name);
std::shared_ptr<QueryNode> m_root;
std::string m_query;