The vtkQtChartArea class manages the chart axes and layers. More...
#include <vtkQtChartArea.h>
Public Slots | |
void | layoutChart () |
Calculates the axis and chart layout. | |
void | updateLayout () |
Merges layout requests into one delayed layout event. | |
Signals | |
void | delayedLayoutNeeded () |
Emitted when a delayed chart layout is needed. | |
void | layerInserted (int index, vtkQtChartLayer *chart) |
Emitted when a chart layer has been inserted. | |
void | removingLayer (int index, vtkQtChartLayer *chart) |
Emitted before a chart layer is removed. | |
void | layerRemoved (int index, vtkQtChartLayer *chart) |
Emitted when a chart layer has been removed. | |
Public Member Functions | |
vtkQtChartArea (QWidget *parent=0) | |
Creates a chart area instance. | |
virtual | ~vtkQtChartArea () |
vtkQtChartStyleManager * | getStyleManager () const |
Gets the style manager for layers that want unique styles. | |
Layer Methods | |
void | addLayer (vtkQtChartLayer *chart) |
Adds a chart layer to the top of the layer list. | |
void | insertLayer (int index, vtkQtChartLayer *chart) |
Inserts a chart layer in the layer list. | |
void | removeLayer (vtkQtChartLayer *chart) |
Removes a chart layer from the layer list. | |
int | getNumberOfLayers () const |
Gets the number of chart layers in the list. | |
vtkQtChartLayer * | getLayer (int index) const |
Gets the chart layer at the specified index. | |
vtkQtChartLayer * | getLayer (const QString &chartName) const |
Gets the chart layer with the specified chart type. | |
vtkQtChartAxisLayer * | getAxisLayer () const |
Gets the chart axis layer. | |
int | getAxisLayerIndex () const |
Gets the index for the axis layer. | |
int | getGridLayerIndex () const |
Gets the index for the grid layer. | |
Protected Member Functions | |
virtual bool | viewportEvent (QEvent *e) |
Updates the layout when the font changes. | |
virtual void | resizeEvent (QResizeEvent *e) |
Updates the layout when the size changes. | |
Interaction Methods | |
vtkQtChartInteractor * | getInteractor () const |
Gets the current chart interactor. | |
void | setInteractor (vtkQtChartInteractor *interactor) |
Sets the chart interactor. | |
vtkQtChartContentsSpace * | getContentsSpace () const |
Gets the contents space object. | |
vtkQtChartMouseBox * | getMouseBox () const |
Gets the mouse box object. | |
void | startInteractiveResize () |
Notifies the chart layers that a resize interaction has started. | |
bool | isInteractivelyResizing () const |
Gets whether or no the chart is interactively resizing. | |
void | finishInteractiveResize () |
Notifies the chart layers that a resize interaction has finished. | |
virtual void | keyPressEvent (QKeyEvent *e) |
Handles the key press events for the chart. | |
virtual void | mousePressEvent (QMouseEvent *e) |
Handles the mouse press events for the chart. | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
Handles the mouse move events for the chart. | |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Handles the mouse release events for the chart. | |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
Handles the mouse double click events for the chart. | |
virtual void | wheelEvent (QWheelEvent *e) |
Handles the mouse wheel events for the chart. |
The vtkQtChartArea class manages the chart axes and layers.
Definition at line 44 of file vtkQtChartArea.h.
vtkQtChartArea::vtkQtChartArea | ( | QWidget * | parent = 0 ) |
Creates a chart area instance.
parent | The parent widget. |
virtual vtkQtChartArea::~vtkQtChartArea | ( | ) | [virtual] |
void vtkQtChartArea::addLayer | ( | vtkQtChartLayer * | chart ) |
Adds a chart layer to the top of the layer list.
chart | The chart to add to the list. |
void vtkQtChartArea::delayedLayoutNeeded | ( | ) | [signal] |
Emitted when a delayed chart layout is needed.
void vtkQtChartArea::finishInteractiveResize | ( | ) |
Notifies the chart layers that a resize interaction has finished.
vtkQtChartAxisLayer* vtkQtChartArea::getAxisLayer | ( | ) | const |
Gets the chart axis layer.
Referenced by QmitkVtkHistogramWidget::QmitkVtkHistogramWidget(), and QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget().
int vtkQtChartArea::getAxisLayerIndex | ( | ) | const |
Gets the index for the axis layer.
Referenced by QmitkVtkHistogramWidget::QmitkVtkHistogramWidget(), QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget(), and QmitkVtkLineProfileWidget::UpdateItemModelFromPath().
vtkQtChartContentsSpace* vtkQtChartArea::getContentsSpace | ( | ) | const |
Gets the contents space object.
int vtkQtChartArea::getGridLayerIndex | ( | ) | const |
Gets the index for the grid layer.
vtkQtChartInteractor* vtkQtChartArea::getInteractor | ( | ) | const |
Gets the current chart interactor.
vtkQtChartLayer* vtkQtChartArea::getLayer | ( | int | index ) | const |
Gets the chart layer at the specified index.
index | The index of the layer. |
vtkQtChartLayer* vtkQtChartArea::getLayer | ( | const QString & | chartName ) | const |
Gets the chart layer with the specified chart type.
chartName | The chart type name to find. |
vtkQtChartMouseBox* vtkQtChartArea::getMouseBox | ( | ) | const |
Gets the mouse box object.
int vtkQtChartArea::getNumberOfLayers | ( | ) | const |
Gets the number of chart layers in the list.
vtkQtChartStyleManager* vtkQtChartArea::getStyleManager | ( | ) | const |
Gets the style manager for layers that want unique styles.
Referenced by QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget().
void vtkQtChartArea::insertLayer | ( | int | index, |
vtkQtChartLayer * | chart | ||
) |
Inserts a chart layer in the layer list.
The chart layers are drawn in the order they reside in the list of layers. A chart at the beginning of the list is drawn underneath the other layers. A chart at the end of the list is drawn on top of the other layers.
The chart area has two built in chart layers: the grid and axis layers. By default, the grid layer is on the bottom and the axis layer is on the next layer. The index of these layers can be used to place other layers in the chart.
index | Where to insert the chart. |
chart | The chart to insert in the list. |
Referenced by QmitkVtkHistogramWidget::QmitkVtkHistogramWidget(), QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget(), and QmitkVtkLineProfileWidget::UpdateItemModelFromPath().
bool vtkQtChartArea::isInteractivelyResizing | ( | ) | const |
Gets whether or no the chart is interactively resizing.
virtual void vtkQtChartArea::keyPressEvent | ( | QKeyEvent * | e ) | [protected, virtual] |
Handles the key press events for the chart.
All the interaction events are forwarded to the vtkQtChartInteractor. It is up to the interactor object to accept or ignore the events.
e | Event specific information. |
void vtkQtChartArea::layerInserted | ( | int | index, |
vtkQtChartLayer * | chart | ||
) | [signal] |
Emitted when a chart layer has been inserted.
index | The index of the layer. |
chart | The chart layer that was inserted. |
void vtkQtChartArea::layerRemoved | ( | int | index, |
vtkQtChartLayer * | chart | ||
) | [signal] |
Emitted when a chart layer has been removed.
index | The index of the layer. |
chart | The chart layer that was removed. |
void vtkQtChartArea::layoutChart | ( | ) | [slot] |
Calculates the axis and chart layout.
virtual void vtkQtChartArea::mouseDoubleClickEvent | ( | QMouseEvent * | e ) | [protected, virtual] |
Handles the mouse double click events for the chart.
e | Event specific information. |
virtual void vtkQtChartArea::mouseMoveEvent | ( | QMouseEvent * | e ) | [protected, virtual] |
Handles the mouse move events for the chart.
e | Event specific information. |
virtual void vtkQtChartArea::mousePressEvent | ( | QMouseEvent * | e ) | [protected, virtual] |
Handles the mouse press events for the chart.
e | Event specific information. |
virtual void vtkQtChartArea::mouseReleaseEvent | ( | QMouseEvent * | e ) | [protected, virtual] |
Handles the mouse release events for the chart.
e | Event specific information. |
void vtkQtChartArea::removeLayer | ( | vtkQtChartLayer * | chart ) |
Removes a chart layer from the layer list.
chart | The chart to remove from the list. |
Referenced by QmitkVtkLineProfileWidget::UpdateItemModelFromPath().
void vtkQtChartArea::removingLayer | ( | int | index, |
vtkQtChartLayer * | chart | ||
) | [signal] |
Emitted before a chart layer is removed.
index | The index of the layer. |
chart | The chart layer that will be removed. |
virtual void vtkQtChartArea::resizeEvent | ( | QResizeEvent * | e ) | [protected, virtual] |
Updates the layout when the size changes.
e | Event specific information. |
void vtkQtChartArea::setInteractor | ( | vtkQtChartInteractor * | interactor ) |
Sets the chart interactor.
This method sets up the interactor to work with the chart. The contents space and mouse box are set on the interactor.
interactor | The new chart interactor. |
void vtkQtChartArea::startInteractiveResize | ( | ) |
Notifies the chart layers that a resize interaction has started.
Chart layers can use this method to reduce the processing load during an interaction.
void vtkQtChartArea::updateLayout | ( | ) | [slot] |
Merges layout requests into one delayed layout event.
virtual bool vtkQtChartArea::viewportEvent | ( | QEvent * | e ) | [protected, virtual] |
Updates the layout when the font changes.
e | Event specific information. |
virtual void vtkQtChartArea::wheelEvent | ( | QWheelEvent * | e ) | [protected, virtual] |
Handles the mouse wheel events for the chart.
e | Event specific information. |