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
+40
View File
@@ -71,6 +71,46 @@ public:
TS_ASSERT_EQUALS(result[2], "");
}
void test_join_with_char_delimiter()
{
std::vector<std::string> list;
list.push_back("A");
list.push_back("B");
list.push_back("C");
std::string result = utility::join<std::vector<std::string> >(list, ',');
TS_ASSERT_EQUALS(result, "A,B,C");
}
void test_join_with_string_delimiter()
{
std::vector<std::string> list;
list.push_back("A");
list.push_back("B");
list.push_back("C");
std::string result = utility::join<std::vector<std::string> >(list, "==");
TS_ASSERT_EQUALS(result, "A==B==C");
}
void test_join_on_empty_list()
{
std::vector<std::string> list;
std::string result = utility::join<std::vector<std::string> >(list, ',');
TS_ASSERT_EQUALS(result, "");
}
void test_join_with_empty_strings_in_list()
{
std::vector<std::string> list;
list.push_back("A");
list.push_back("");
list.push_back("");
std::string result = utility::join<std::vector<std::string> >(list, ':');
TS_ASSERT_EQUALS(result, "A::");
}
void test_tokenize_with_string()
{
std::vector<std::string> result = utility::tokenize<std::vector<std::string> >("A->B->C", "->");