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:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user