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;
+1
View File
@@ -15,6 +15,7 @@ public:
virtual std::string getName() const;
virtual void setText(const std::string& s) = 0;
virtual void setMatch(const SearchMatch& m) = 0;
virtual void setFocus() = 0;
virtual void setAutocompletionList(const std::vector<SearchMatch>& autocompletionList) = 0;