ui: Colors in SearchView

Show the right colors in SearchView for the different NodeTypes or QueryNodeTyps

Note: add colors to your Applcationsettings like in the template

fortune cookie message = recognition will come from unexpected sources
This commit is contained in:
Andreas Stallinger
2015-03-04 11:55:25 +01:00
parent 284fb336a6
commit da1a6d69c4
32 changed files with 455 additions and 100 deletions
@@ -13,15 +13,19 @@ SearchController::~SearchController()
{
}
#include <iostream>
void SearchController::handleMessage(MessageActivateTokens* message)
{
if (!m_ignoreNextMessageActivateTokens && message->tokenIds.size())
{
SearchMatch match;
match.fullName = m_graphAccess->getNameForNodeWithId(message->tokenIds[0]);
match.nodeType = m_graphAccess->getNodeTypeForNodeWithId(message->tokenIds[0]);
match.tokenIds.insert(message->tokenIds[0]);
match.queryNodeType = QueryNode::QUERYNODETYPE_TOKEN;
getView()->setText(match.encodeForQuery());
getView()->setMatch(match);
}
m_ignoreNextMessageActivateTokens = false;