ui: Show call graphs, inheritance trees and include trees for active symbol (issue 249 337)
* Added TrailLayouter with Sugiyama dependency layouting * Layouter supports horizontal and vertical layouts * Added basic ui to graph view for showing incoming and outgoing paths * Added depth slider, with infinity at maximum * Disable trail ui when not available * Added trail messages to undo stack and only use last one when undoing * Added QtGraphLineBezier for trail graphs and refactored other line types * Disabled edge activation for trail layouts, shown only visually * Highlight all connected edges when hovering a node in trail layout * Use different color when highlighting call edges for better contrast * Fixed BucketLayouter issue when edge does not leave node * Increased click area for angled edges bug id = 249 337 fortune cookie message = Answer just what the heart prompts to you.
This commit is contained in:
@@ -213,12 +213,34 @@ void QtGraphNode::hoverEnter()
|
||||
void QtGraphNode::focusIn()
|
||||
{
|
||||
m_isHovering = true;
|
||||
|
||||
forEachEdge(
|
||||
[](QtGraphEdge* edge)
|
||||
{
|
||||
if (edge->isTrailEdge())
|
||||
{
|
||||
edge->focusIn();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
updateStyle();
|
||||
}
|
||||
|
||||
void QtGraphNode::focusOut()
|
||||
{
|
||||
m_isHovering = false;
|
||||
|
||||
forEachEdge(
|
||||
[](QtGraphEdge* edge)
|
||||
{
|
||||
if (edge->isTrailEdge())
|
||||
{
|
||||
edge->focusOut();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
updateStyle();
|
||||
}
|
||||
|
||||
@@ -353,11 +375,11 @@ void QtGraphNode::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
void QtGraphNode::notifyEdgesAfterMove()
|
||||
void QtGraphNode::forEachEdge(std::function<void(QtGraphEdge*)> func)
|
||||
{
|
||||
for (const std::shared_ptr<QtGraphEdge>& edge : m_outEdges)
|
||||
{
|
||||
edge->updateLine();
|
||||
func(edge.get());
|
||||
}
|
||||
|
||||
for (const std::weak_ptr<QtGraphEdge>& e : m_inEdges)
|
||||
@@ -365,9 +387,19 @@ void QtGraphNode::notifyEdgesAfterMove()
|
||||
std::shared_ptr<QtGraphEdge> edge = e.lock();
|
||||
if (edge)
|
||||
{
|
||||
edge->updateLine();
|
||||
func(edge.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QtGraphNode::notifyEdgesAfterMove()
|
||||
{
|
||||
forEachEdge(
|
||||
[](QtGraphEdge* edge)
|
||||
{
|
||||
edge->updateLine();
|
||||
}
|
||||
);
|
||||
|
||||
for (const std::shared_ptr<QtGraphNode>& node : m_subNodes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user