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:
Eberhard Graether
2017-04-24 01:14:53 +02:00
parent 01bd0efefb
commit f0b7dcdcdd
40 changed files with 1892 additions and 487 deletions
@@ -77,6 +77,19 @@ void UndoRedoController::handleMessage(MessageActivateTokens* message)
processCommand(command);
}
void UndoRedoController::handleMessage(MessageActivateTrail* message)
{
if (sameMessageTypeAsLast(message) &&
static_cast<MessageActivateTrail*>(lastMessage())->originId == message->originId &&
static_cast<MessageActivateTrail*>(lastMessage())->targetId == message->targetId)
{
return;
}
Command command(std::make_shared<MessageActivateTrail>(*message), Command::ORDER_ADAPT, true);
processCommand(command);
}
void UndoRedoController::handleMessage(MessageChangeFileView* message)
{
Command command(std::make_shared<MessageChangeFileView>(*message), Command::ORDER_VIEW);
@@ -320,9 +333,21 @@ void UndoRedoController::replayCommands(std::list<Command>::iterator it)
std::vector<std::list<Command>::iterator> viewCommands;
bool keepsContent = true;
std::map<std::string, std::list<Command>::iterator> lastOfType;
std::list<Command>::iterator at = it;
while (at != m_iterator)
{
if (at->replayLastOnly)
{
lastOfType[at->message->getType()] = at;
}
std::advance(at, 1);
}
while (it != m_iterator)
{
if (it->order != Command::ORDER_VIEW || it->replayLastOnly == false)
if (!it->replayLastOnly || lastOfType[it->message->getType()] == it)
{
replayCommand(it);
@@ -330,13 +355,8 @@ void UndoRedoController::replayCommands(std::list<Command>::iterator it)
{
keepsContent = false;
}
if (it->order != Command::ORDER_VIEW)
{
viewCommands.clear();
}
}
else
else if (it->order == Command::ORDER_VIEW)
{
viewCommands.push_back(it);
}