Public Slots | Signals | Public Member Functions | Protected Member Functions

vtkQtChartArea Class Reference

The vtkQtChartArea class manages the chart axes and layers. More...

#include <vtkQtChartArea.h>

List of all members.

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 ()
vtkQtChartStyleManagergetStyleManager () 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.
vtkQtChartLayergetLayer (int index) const
 Gets the chart layer at the specified index.
vtkQtChartLayergetLayer (const QString &chartName) const
 Gets the chart layer with the specified chart type.
vtkQtChartAxisLayergetAxisLayer () 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

vtkQtChartInteractorgetInteractor () const
 Gets the current chart interactor.
void setInteractor (vtkQtChartInteractor *interactor)
 Sets the chart interactor.
vtkQtChartContentsSpacegetContentsSpace () const
 Gets the contents space object.
vtkQtChartMouseBoxgetMouseBox () 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.

Detailed Description

The vtkQtChartArea class manages the chart axes and layers.

Definition at line 44 of file vtkQtChartArea.h.


Constructor & Destructor Documentation

vtkQtChartArea::vtkQtChartArea ( QWidget *  parent = 0 )

Creates a chart area instance.

Parameters:
parentThe parent widget.
virtual vtkQtChartArea::~vtkQtChartArea (  ) [virtual]

Member Function Documentation

void vtkQtChartArea::addLayer ( vtkQtChartLayer chart )

Adds a chart layer to the top of the layer list.

Parameters:
chartThe chart to add to the list.
See also:
vtkQtChartArea::insertLayer(int, vtkQtChartLayer *)
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.

Returns:
A pointer to the chart axis layer.

Referenced by QmitkVtkHistogramWidget::QmitkVtkHistogramWidget(), and QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget().

int vtkQtChartArea::getAxisLayerIndex (  ) const
vtkQtChartContentsSpace* vtkQtChartArea::getContentsSpace (  ) const

Gets the contents space object.

Returns:
A pointer to the contents space object.
int vtkQtChartArea::getGridLayerIndex (  ) const

Gets the index for the grid layer.

Returns:
The index for the grid layer.
vtkQtChartInteractor* vtkQtChartArea::getInteractor (  ) const

Gets the current chart interactor.

Returns:
A pointer to the current chart interactor.
vtkQtChartLayer* vtkQtChartArea::getLayer ( int  index ) const

Gets the chart layer at the specified index.

Parameters:
indexThe index of the layer.
Returns:
A pointer to the chart layer at the specified index.
vtkQtChartLayer* vtkQtChartArea::getLayer ( const QString &  chartName ) const

Gets the chart layer with the specified chart type.

Parameters:
chartNameThe chart type name to find.
Returns:
A pointer to the chart layer with the specified chart type.
vtkQtChartMouseBox* vtkQtChartArea::getMouseBox (  ) const

Gets the mouse box object.

Returns:
A pointer to the mouse box object.
int vtkQtChartArea::getNumberOfLayers (  ) const

Gets the number of chart layers in the list.

Returns:
The number of chart layers in the list.
vtkQtChartStyleManager* vtkQtChartArea::getStyleManager (  ) const

Gets the style manager for layers that want unique styles.

Returns:
A pointer to the style manager.

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.

Parameters:
indexWhere to insert the chart.
chartThe chart to insert in the list.
See also:
vtkQtChartArea::getGridLayerIndex(), vtkQtChartArea::getAxisLayerIndex()

Referenced by QmitkVtkHistogramWidget::QmitkVtkHistogramWidget(), QmitkVtkLineProfileWidget::QmitkVtkLineProfileWidget(), and QmitkVtkLineProfileWidget::UpdateItemModelFromPath().

bool vtkQtChartArea::isInteractivelyResizing (  ) const

Gets whether or no the chart is interactively resizing.

Returns:
True if 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.

Parameters:
eEvent specific information.
void vtkQtChartArea::layerInserted ( int  index,
vtkQtChartLayer chart 
) [signal]

Emitted when a chart layer has been inserted.

Parameters:
indexThe index of the layer.
chartThe chart layer that was inserted.
void vtkQtChartArea::layerRemoved ( int  index,
vtkQtChartLayer chart 
) [signal]

Emitted when a chart layer has been removed.

Parameters:
indexThe index of the layer.
chartThe 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.

Parameters:
eEvent specific information.
virtual void vtkQtChartArea::mouseMoveEvent ( QMouseEvent *  e ) [protected, virtual]

Handles the mouse move events for the chart.

Parameters:
eEvent specific information.
virtual void vtkQtChartArea::mousePressEvent ( QMouseEvent *  e ) [protected, virtual]

Handles the mouse press events for the chart.

Parameters:
eEvent specific information.
virtual void vtkQtChartArea::mouseReleaseEvent ( QMouseEvent *  e ) [protected, virtual]

Handles the mouse release events for the chart.

Parameters:
eEvent specific information.
void vtkQtChartArea::removeLayer ( vtkQtChartLayer chart )

Removes a chart layer from the layer list.

Parameters:
chartThe 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.

Parameters:
indexThe index of the layer.
chartThe chart layer that will be removed.
virtual void vtkQtChartArea::resizeEvent ( QResizeEvent *  e ) [protected, virtual]

Updates the layout when the size changes.

Parameters:
eEvent 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.

Parameters:
interactorThe 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.

Parameters:
eEvent specific information.
Returns:
True if the event was handled.
virtual void vtkQtChartArea::wheelEvent ( QWheelEvent *  e ) [protected, virtual]

Handles the mouse wheel events for the chart.

Parameters:
eEvent specific information.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines