logic: preselecting SearchNodes for autocompletion by prefiltering the Graph with the entered Query

This change only shows matches in the autocompletion list that are prefiltered by the already entered query. The
autocompletion now also shows up after an operator of type . or > has been entered to show an alphabetical list of
possible tokens.
This commit is contained in:
Eberhard Graether
2014-10-28 20:21:19 +01:00
parent ede0af4291
commit 86f4629b0d
27 changed files with 407 additions and 198 deletions
@@ -18,7 +18,10 @@ void SearchController::handleMessage(MessageActivateToken* message)
{
if (!m_ignoreNextMessageActivateToken && message->tokenId)
{
getView()->setText(m_graphAccess->getNameForNodeWithId(message->tokenId));
std::string name = m_graphAccess->getNameForNodeWithId(message->tokenId);
std::stringstream ss;
ss << '"' << name << ',' << message->tokenId << '"';
getView()->setText(ss.str());
}
m_ignoreNextMessageActivateToken = false;
@@ -55,8 +58,8 @@ void SearchController::handleMessage(MessageSearch* message)
void SearchController::handleMessage(MessageSearchAutocomplete* message)
{
LOG_INFO("autocomplete string: \"" + message->query + "\"");
getView()->setAutocompletionList(m_graphAccess->getAutocompletionMatches(message->query));
LOG_INFO("autocomplete string: \"" + message->word + "\"");
getView()->setAutocompletionList(m_graphAccess->getAutocompletionMatches(message->query, message->word));
}
SearchView* SearchController::getView()