src: converted NodeType to a class

NodeType internally still uses the Type enum
This commit is contained in:
mlangkabel
2017-11-23 17:05:15 +01:00
parent c512992e2c
commit 90e17c5868
52 changed files with 779 additions and 656 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ QtHistoryItem::QtHistoryItem(const SearchMatch& match, size_t index, bool isCurr
layout->setContentsMargins(0, 0, 0, 0);
layout->setAlignment(Qt::AlignTop);
std::string name = utility::elide(match.nodeType == Node::NODE_FILE ? match.text : match.name, utility::ELIDE_RIGHT, 100);
std::string name = utility::elide(match.nodeType.getType() == NodeType::NODE_FILE ? match.text : match.name, utility::ELIDE_RIGHT, 100);
m_name = new QLabel(name.c_str(), this);
m_name->setAttribute(Qt::WA_MacShowFocusRect, 0);
@@ -43,8 +43,8 @@ QtHistoryItem::QtHistoryItem(const SearchMatch& match, size_t index, bool isCurr
ColorScheme* scheme = ColorScheme::getInstance().get();
if (match.searchType == SearchMatch::SEARCH_TOKEN)
{
m_indicatorColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), false).fill;
m_indicatorHoverColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), true).fill;
m_indicatorColor = GraphViewStyle::getNodeColor(match.nodeType.getUnderscoredTypeString(), false).fill;
m_indicatorHoverColor = GraphViewStyle::getNodeColor(match.nodeType.getUnderscoredTypeString(), true).fill;
}
else
{