#include <vtkQtChartBarLocator.h>
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.
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. | |
vtkQtChartBar * | getItemAt (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. | |
vtkQtChartBarLocatorNode * | getLast () |
Gets the last node in the tree. | |
vtkQtChartBarLocatorNode * | getPrevious (vtkQtChartBarLocatorNode *node) |
Gets the previous node in the tree. |
vtkQtChartBarLocator::vtkQtChartBarLocator | ( | ) |
vtkQtChartBarLocator::~vtkQtChartBarLocator | ( | ) |
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.
list | The 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.
point | The point to search. |
QList<vtkQtChartBar *> vtkQtChartBarLocator::getItemsIn | ( | const QRectF & | area | ) | const |
Gets the bars in the specified rectangle.
area | The rectangle to search. |
vtkQtChartBarLocatorNode* vtkQtChartBarLocator::getLast | ( | ) |
Gets the last node in the tree.
vtkQtChartBarLocatorNode* vtkQtChartBarLocator::getPrevious | ( | vtkQtChartBarLocatorNode * | node | ) |
Gets the previous node in the tree.
node | The node to search from. |