Reference documentation
Public Member Functions | Protected Member Functions | List of all members
RadialTree Class Reference

The RadialTree implements a tree representation of item from the given model. More...

Inheritance diagram for RadialTree:
AbstractTree AbstractItemView

Public Member Functions

virtual void positionsInTree ()
 Defines the positions of the items in the tree.
 
virtual void positionsInView ()
 Defines the positions of the items in the view relative to their positions in the tree. More...
 
void setRotateText (bool rotate=true)
 If rotate is true, the item text will be rotated to follow the line between the item position and the center.
 
- Public Member Functions inherited from AbstractTree
 AbstractTree (QWidget *parent=0)
 Initializes an AbstractTree object. More...
 
QPen connectionPen () const
 Returns the QPen used to paint the connection between a parent and its children.
 
virtual QPainterPath itemPath (const QModelIndex &index) const
 Defines the outer bounds of the item as a QPainterPath. More...
 
virtual QRectF itemRect (const QModelIndex &index) const
 Defines the outer bounds of the item as a rectangle. More...
 
void setConnectionPen (const QPen &pen)
 Sets the QPen used to paint the connection between a parent and its children.
 
void setItemSpacing (int w, int h)
 Sets the spacing between two items.
 
- Public Member Functions inherited from AbstractItemView
 AbstractItemView (QWidget *parent=0)
 Constructs an abstract item view with the given parent.
 
virtual QRectF itemRect (int row, int column, const QModelIndex &parent=QModelIndex()) const
 This function overloads itemRect(). More...
 

Protected Member Functions

virtual void paintCircles (QPainter &painter, const QPointF &offset) const
 Paints the circles on the background.
 
virtual void paintConnections (QPainter &painter, QPointF offset) const
 Paints the connections between the parents and its children.
 
void updatePerimeter ()
 Updates the outer perimeter. More...
 
- Protected Member Functions inherited from AbstractTree
virtual void paintConnections (QPainter &painter, const QPointF &offset) const
 Paints the connections between the parents and its children.
 
virtual void paintConnectionsFor (QPainter &painter, const QModelIndex &index, const QPointF &offset) const
 Paints the connections between index and its children.
 
virtual void paintItems (QPainter &painter, const QPointF &offset) const
 Paints the items in the view using the results of the positionInView() method.
 
virtual void setX (const QModelIndex &index, qreal x)
 Sets the X coordinates for the given index to x.
 
virtual void setY (const QModelIndex &index, qreal y)
 Sets the Y coordinates for the given index to y.
 
virtual void updateValues ()
 Updates the items in the item view. More...
 

Additional Inherited Members

- Public Slots inherited from AbstractItemView

Detailed Description

The RadialTree implements a tree representation of item from the given model.

Contrary to QTreeView, a radial tree is not a hierarchical list: the root is placed at the center and all children are placed on concentric circles.

See Also
Thistle::VerticalTree, Thistle::HorizontaTree, Thistle::AbstractTree

Member Function Documentation

virtual void positionsInView ( )
virtual

Defines the positions of the items in the view relative to their positions in the tree.

This function uses the margins and the item size to calculate

Implements AbstractTree.

void updatePerimeter ( )
protected

Updates the outer perimeter.

It used to defines the size needed by the view.