ui: Added custom trail dialog (issue #249)

* open custom trail dialg via button in top of trail controls
* search from symbol to symbol or all referenced/referencing of symbol
* define search depth with slider
* define horizontal/vertical layout
* define node and edge types
* renamed depth graph to trail in graph ui
* added custom trail UI tests

fortune cookie message = A happy surprise is waiting for you.
This commit is contained in:
Eberhard Graether
2019-07-29 11:25:34 +02:00
parent 6a2c59f3e5
commit 68c9782e33
54 changed files with 1740 additions and 130 deletions
@@ -215,10 +215,11 @@ void GraphController::handleMessage(MessageActivateTrail* message)
m_activeEdgeIds.clear();
std::shared_ptr<Graph> graph = m_storageAccess->getGraphForTrail(
message->originId, message->targetId, message->trailType, message->depth);
message->originId, message->targetId, message->nodeTypes, message->edgeTypes, message->nodeNonIndexed, message->depth,
true /* !message->custom || (message->originId && message->targetId) */);
// remove non-indexed files from include graph if indexed file is origin
if (message->trailType & Edge::EDGE_INCLUDE)
if (!message->custom && message->edgeTypes & Edge::EDGE_INCLUDE)
{
Node* fileNode = graph->getNodeById(message->originId ? message->originId : message->targetId);
if (fileNode && fileNode->isDefined())
@@ -262,11 +263,13 @@ void GraphController::handleMessage(MessageActivateTrail* message)
m_graph->setTrailMode(message->horizontalLayout ? Graph::TRAIL_HORIZONTAL : Graph::TRAIL_VERTICAL);
m_graph->setHasTrailOrigin(message->originId);
setVisibility(setActive(m_activeNodeIds, true));
m_activeNodeIds = { message->originId ? message->originId : message->targetId };
setActive(m_activeNodeIds, true);
setVisibility(true);
MessageStatus(L"Layouting depth graph", false, true).dispatch();
if (message->trailType & Edge::EDGE_INHERITANCE)
if (!message->custom && message->edgeTypes & Edge::EDGE_INHERITANCE)
{
groupTrailNodes(GroupType::INHERITANCE);
}
@@ -274,6 +277,15 @@ void GraphController::handleMessage(MessageActivateTrail* message)
layoutNesting();
layoutTrail(message->horizontalLayout, message->originId);
if (message->originId && message->targetId)
{
DummyNode* targetNode = getDummyGraphNodeById(message->targetId).get();
if (targetNode)
{
targetNode->active = true;
}
}
MessageStatus(L"Displaying depth graph", false, true).dispatch();
GraphView::GraphParams params;