logic: don't show implicit or undefined child nodes in graph unless connected

* visit implicit declarations in ASTVisitor
* show implicit and undefined child nodes only when connected
* fixed some bundle edges couldn't be split
* add "implicit" to tooltip
* show undefiend and implicit nodes hatched
This commit is contained in:
Eberhard Graether
2016-04-07 14:16:17 +02:00
parent 7a0cd0c8d7
commit ae6cd6e02c
10 changed files with 97 additions and 13 deletions
@@ -176,7 +176,9 @@ void QtGraphEdge::onClick()
{
if (!getData())
{
MessageGraphNodeBundleSplit(m_target.lock()->getTokenId()).dispatch();
std::weak_ptr<QtGraphNode> node =
(m_direction == TokenComponentAggregation::DIRECTION_BACKWARD ? m_owner : m_target);
MessageGraphNodeBundleSplit(node.lock()->getTokenId()).dispatch();
}
else
{
@@ -21,6 +21,10 @@ QtGraphNodeData::QtGraphNodeData(const Node* data, const std::string& name, bool
{
toolTip = "undefined " + toolTip;
}
else if (data->isImplicit())
{
toolTip = "implicit " + toolTip;
}
if (data->isType(Node::NODE_FUNCTION | Node::NODE_METHOD))
{
@@ -75,8 +79,8 @@ void QtGraphNodeData::moved(const Vec2i& oldPosition)
void QtGraphNodeData::updateStyle()
{
GraphViewStyle::NodeStyle style =
GraphViewStyle::getStyleForNodeType(m_data->getType(), m_data->isDefined(), m_isActive, m_isHovering, m_childVisible);
GraphViewStyle::NodeStyle style = GraphViewStyle::getStyleForNodeType(
m_data->getType(), m_data->isExplicit(), m_isActive, m_isHovering, m_childVisible);
setStyle(style);
}