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