ui: search view autocompletion

- Implemented autocompletion for the QtSearchView.
- Added: MessageFinishedParsing that will be dispatched by the Project after the parsing step is done.
- Moved the initial MessageActivateToken from the Project to the Application.
- Added getNamesForNodesWithNamePrefix() to GraphAccess.
This commit is contained in:
malte_langkabel
2014-07-07 11:25:46 +02:00
parent a70a9009cc
commit c02767362f
18 changed files with 162 additions and 11 deletions
@@ -2,7 +2,6 @@
#include "component/view/SearchView.h"
#include "data/access/GraphAccess.h"
#include "utility/messaging/type/MessageActivateToken.h"
SearchController::SearchController(std::shared_ptr<GraphAccess> graphAccess)
: m_graphAccess(graphAccess)
@@ -34,6 +33,11 @@ void SearchController::handleMessage(MessageActivateToken* message)
getView()->setText(m_graphAccess->getNameForNodeWithId(message->tokenId));
}
void SearchController::handleMessage(MessageFinishedParsing* message)
{
getView()->setAutocompletionList(m_graphAccess->getNamesForNodesWithNamePrefix(""));
}
SearchView* SearchController::getView()
{
return Controller::getView<SearchView>();