30#include <QGraphicsEllipseItem>
31#include <QGraphicsScene>
69 void update(QPointF positionLeftTop = QPointF(0, 0));
81 std::vector<TreeNodePtr> getChildren()
const;
119 virtual void drawEdge(QLineF line);
125 virtual void drawNode(QRectF boundingBox);
132 void updateLayout(QPointF center);
135 QSize calculateSubTreeSize();
138 QRectF calculateChildsBoundingBox();
142 QGraphicsEllipseItem* nodeItem;
143 QGraphicsLineItem* edgeItem;
152 std::vector<TreeNodePtr> childs;
#define ARMARXCOMPONENT_IMPORT_EXPORT
void setSize(QSize nodeSize)
Sets size of node.
static const QSize DefaultNodeSize
static const QSize DefaultNodeVerticalSeparator
static const QSize DefaultNodeHorizontalSeparator
void addChild(TreeNodePtr child)
Adds a child to the node in the tree structure.
QSize getSize()
Retrieve size of the node.
QRectF getBoundingBox()
Retrieve boundingbox of the node.
TreeNode(QGraphicsScene *scene, QSize nodeSize=TreeNode::DefaultNodeSize)
Constructs a tree node as part of a Qt visualizable tree.
void update(QPointF positionLeftTop=QPointF(0, 0))
Updates the layout of the tree.
QSize getSubTreeSize()
Retrieve size of the complete subtree where the current node is root.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< TreeNode > TreeNodePtr
std::weak_ptr< TreeNode > TreeNodeWeakPtr