VTK
Public Member Functions
vtkQtChartBarLocator Class Reference

The vtkQtChartBarLocator class is used to locate bars in a tree structure. More...

#include <vtkQtChartBarLocator.h>

List of all members.

Public Member Functions

 vtkQtChartBarLocator ()
 ~vtkQtChartBarLocator ()
void clear ()
 Removes all the tree items.
void build (const QList< vtkQtChartBar * > &list)
 Builds a bar tree from the ordered list of rectangles.
void update ()
 Updates the bounding rectangles in the bar tree.
vtkQtChartBargetItemAt (const QPointF &point) const
 Gets the bar at the specified point.
QList< vtkQtChartBar * > getItemsIn (const QRectF &area) const
 Gets the bars in the specified rectangle.
vtkQtChartBarLocatorNodegetLast ()
 Gets the last node in the tree.
vtkQtChartBarLocatorNodegetPrevious (vtkQtChartBarLocatorNode *node)
 Gets the previous node in the tree.

Detailed Description

The vtkQtChartBarLocator class is used to locate bars in a tree structure.

The tree is built from a list of bars. The leaf nodes store the bars. The bounding rectangles can be updated if the layout remains unchanged.

Definition at line 152 of file vtkQtChartBarLocator.h.


Constructor & Destructor Documentation

vtkQtChartBarLocator::vtkQtChartBarLocator ( )
vtkQtChartBarLocator::~vtkQtChartBarLocator ( )

Member Function Documentation

void vtkQtChartBarLocator::clear ( )

Removes all the tree items.

void vtkQtChartBarLocator::build ( const QList< vtkQtChartBar * > &  list)

Builds a bar tree from the ordered list of rectangles.

The bar pointers are stored by the tree and should not be deleted until the tree has been cleared.

Parameters:
listThe ordered list of rectangles.
void vtkQtChartBarLocator::update ( )

Updates the bounding rectangles in the bar tree.

The nodes are traversed from last to first. The bounding rectangle of each node is updated using the bar if it is a leaf or the bounds of the children otherwise.

vtkQtChartBar* vtkQtChartBarLocator::getItemAt ( const QPointF &  point) const

Gets the bar at the specified point.

Parameters:
pointThe point to search.
Returns:
A pointer to the bar at the given point.
QList<vtkQtChartBar *> vtkQtChartBarLocator::getItemsIn ( const QRectF &  area) const

Gets the bars in the specified rectangle.

Parameters:
areaThe rectangle to search.
Returns:
The list of bars in the given rectangle.
vtkQtChartBarLocatorNode* vtkQtChartBarLocator::getLast ( )

Gets the last node in the tree.

Returns:
A pointer to the last node in the tree.
vtkQtChartBarLocatorNode* vtkQtChartBarLocator::getPrevious ( vtkQtChartBarLocatorNode node)

Gets the previous node in the tree.

Parameters:
nodeThe node to search from.
Returns:
A pointer to the previous node in the tree.

The documentation for this class was generated from the following file: