ui: renamed undefined to non-indexed and made node/edge names more readable
This commit is contained in:
@@ -150,7 +150,7 @@ void QtAutocompletionDelegate::paint(QPainter* painter, const QStyleOptionViewIt
|
||||
|
||||
if (type.size() && type != "command")
|
||||
{
|
||||
const GraphViewStyle::NodeColor& nodeColor = GraphViewStyle::getNodeColor(Node::getTypeString(nodeType), false);
|
||||
const GraphViewStyle::NodeColor& nodeColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(nodeType), false);
|
||||
fillColor = QColor(nodeColor.fill.c_str());
|
||||
textColor = QColor(nodeColor.text.c_str());
|
||||
}
|
||||
|
||||
@@ -724,11 +724,11 @@ void QtSmartSearchBox::updateElements()
|
||||
|
||||
if (match.searchType == SearchMatch::SEARCH_TOKEN)
|
||||
{
|
||||
element->setObjectName(QString::fromStdString("search_element_" + match.getNodeTypeAsString()));
|
||||
color = GraphViewStyle::getNodeColor(Node::getTypeString(match.nodeType), false).fill;
|
||||
hoverColor = GraphViewStyle::getNodeColor(Node::getTypeString(match.nodeType), true).fill;
|
||||
textColor = GraphViewStyle::getNodeColor(Node::getTypeString(match.nodeType), false).text;
|
||||
textHoverColor = GraphViewStyle::getNodeColor(Node::getTypeString(match.nodeType), true).text;
|
||||
element->setObjectName(QString::fromStdString("search_element_" + match.getNodeTypeAsUnderscoredString()));
|
||||
color = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), false).fill;
|
||||
hoverColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), true).fill;
|
||||
textColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), false).text;
|
||||
textHoverColor = GraphViewStyle::getNodeColor(Node::getUnderscoredTypeString(match.nodeType), true).text;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ void QtGraphEdge::updateLine()
|
||||
style, m_weight, showArrow);
|
||||
}
|
||||
|
||||
QString toolTip = utility::replace(Edge::getTypeString(type), "_", " ").c_str();
|
||||
QString toolTip = Edge::getReadableTypeString(type).c_str();
|
||||
if (type == Edge::EDGE_AGGREGATION)
|
||||
{
|
||||
toolTip += ": " + QString::number(m_weight) + " edge";
|
||||
|
||||
@@ -41,15 +41,15 @@ void QtGraphNodeBundle::onClick()
|
||||
{
|
||||
MessageGraphNodeBundleSplit(
|
||||
m_tokenId,
|
||||
m_type != Node::NODE_UNDEFINED && getName() != "Anonymous Namespaces",
|
||||
m_type != Node::NODE_UNDEFINED
|
||||
m_type != Node::NODE_NON_INDEXED && getName() != "Anonymous Namespaces",
|
||||
m_type != Node::NODE_NON_INDEXED
|
||||
).dispatch();
|
||||
}
|
||||
|
||||
void QtGraphNodeBundle::updateStyle()
|
||||
{
|
||||
GraphViewStyle::NodeStyle style;
|
||||
if (m_type != Node::NODE_UNDEFINED)
|
||||
if (m_type != Node::NODE_NON_INDEXED)
|
||||
{
|
||||
style = GraphViewStyle::getStyleForNodeType(m_type, true, false, m_isHovering, false, false);
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@ QtGraphNodeData::QtGraphNodeData(const Node* data, const std::string& name, bool
|
||||
|
||||
this->setName(name);
|
||||
|
||||
std::string toolTip = data->getTypeString();
|
||||
if (!data->isDefined() && !data->isType(Node::NODE_UNDEFINED))
|
||||
std::string toolTip = data->getReadableTypeString();
|
||||
if (!data->isDefined() && !data->isType(Node::NODE_NON_INDEXED))
|
||||
{
|
||||
toolTip = "undefined " + toolTip;
|
||||
toolTip = "non-indexed " + toolTip;
|
||||
}
|
||||
else if (data->isImplicit())
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ QtGraphNodeQualifier::QtGraphNodeQualifier(const NameHierarchy& name)
|
||||
m_rightArrowSmall = new QGraphicsPolygonItem(this);
|
||||
|
||||
QFont font;
|
||||
font.setFamily(GraphViewStyle::getFontNameForNodeType(Node::NODE_UNDEFINED).c_str());
|
||||
font.setFamily(GraphViewStyle::getFontNameForNodeType(Node::NODE_NON_INDEXED).c_str());
|
||||
font.setPixelSize(GraphViewStyle::getFontSizeOfQualifier());
|
||||
font.setWeight(QFont::Normal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user