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
+72
View File
@@ -0,0 +1,72 @@
#ifndef QT_LINE_ITEM_BASE_H
#define QT_LINE_ITEM_BASE_H
#include <QGraphicsItem>
#include "utility/math/Vector4.h"
#include "component/view/GraphViewStyle.h"
class QtLineItemBase
: public QGraphicsLineItem
{
public:
enum Route
{
ROUTE_ANY,
ROUTE_HORIZONTAL,
ROUTE_VERTICAL
};
enum Pivot
{
PIVOT_THIRD,
PIVOT_MIDDLE
};
QtLineItemBase(QGraphicsItem* parent);
virtual ~QtLineItemBase();
void updateLine(
Vec4i ownerRect, Vec4i targetRect,
Vec4i ownerParentRect, Vec4i targetParentRect,
GraphViewStyle::EdgeStyle style,
size_t weight, bool showArrow);
void setRoute(Route route);
void setPivot(Pivot pivot);
void setOnFront(bool front);
void setOnBack(bool back);
void setHorizontalIn(bool horizontal);
protected:
QPolygon getPath() const;
int getDirection(const QPointF& a, const QPointF& b) const;
QRectF getArrowBoundingRect(const QPolygon& poly) const;
void drawArrow(const QPolygon& poly, QPainterPath* path) const;
void getPivotPoints(Vec2f* p, const Vec4i& in, const Vec4i& out, int offset, bool target) const;
GraphViewStyle::EdgeStyle m_style;
bool m_showArrow;
bool m_onFront;
bool m_onBack;
bool m_horizontalIn;
Route m_route;
Pivot m_pivot;
private:
Vec4i m_ownerRect;
Vec4i m_targetRect;
Vec4i m_ownerParentRect;
Vec4i m_targetParentRect;
mutable QPolygon m_polygon;
};
#endif // QT_LINE_ITEM_BASE_H