Reference documentation
Protected Member Functions | List of all members
HorizontalTree Class Reference

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

Inheritance diagram for HorizontalTree:
VerticalTree AbstractTree AbstractItemView

Protected Member Functions

virtual void positionsInView ()
 Defines the positions of the items in the view relative to their positions in the tree. 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 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
- Public Member Functions inherited from VerticalTree
virtual void paintConnectionsFor (QPainter &painter, const QModelIndex &index, const QPointF &offset) const
 Paints the connections between index and its children.
 
virtual void positionsInTree ()
 Defines the positions of the items in the tree.
 
- 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...
 

Detailed Description

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

Contrary to QTreeView, a horizontal tree is not a hierarchical list: the root is placed at the left and all children are placed on vertical lines.

See Also
Thistle::VerticalTree, Thistle::RadialTree, Thistle::AbstractTree

Member Function Documentation

virtual void positionsInView ( )
protectedvirtual

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

Reimplemented from VerticalTree.