vtkQtChartLayer Class Reference

#include <vtkQtChartLayer.h>

Inheritance diagram for vtkQtChartLayer:

Inheritance graph
[legend]
Collaboration diagram for vtkQtChartLayer:

Collaboration graph
[legend]

List of all members.


Detailed Description

The vtkQtChartLayer class is the base class for all chart drawing layers.

Definition at line 43 of file vtkQtChartLayer.h.


Public Types

enum  AxesCorner { BottomLeft = 0, BottomRight, TopLeft, TopRight }
enum  { Type = vtkQtChart_LayerType }

Signals

void layoutNeeded ()
 Emitted when the layer layout needs to be calculated.
void rangeChanged ()
 Emitted when the axis range for the layer has changed.

Public Member Functions

 vtkQtChartLayer ()
virtual ~vtkQtChartLayer ()
virtual int type () const
vtkQtChartAreagetChartArea () const
 Gets the chart area containing this layer.
virtual void setChartArea (vtkQtChartArea *area)
 Sets the chart area that contains this layer.
virtual void getLayerDomain (vtkQtChartLayerDomain &domain) const
 Gets the chart layer's domain.
virtual void layoutChart (const QRectF &area)=0
 Used to layout the chart layer.
virtual bool drawItemFilter (QGraphicsItem *item, QPainter *painter)
 Used to filter items while drawing.
virtual bool getHelpText (const QPointF &point, QString &text)
 Gets the help text for the given location.
virtual void startInteractiveResize ()
 Notifies the chart layer that a resize interaction has started.
virtual void finishInteractiveResize ()
 Notifies the chart layer that a resize interaction has finished.

Protected Attributes

vtkQtChartAreaChartArea
 Stores the containing chart area.

Member Enumeration Documentation

Enumerator:
BottomLeft  Uses the bottom and left axes.
BottomRight  Uses the bottom and right axes.
TopLeft  Uses the top and left axes.
TopRight  Uses the top and right axes.

Definition at line 48 of file vtkQtChartLayer.h.

anonymous enum

Enumerator:
Type 

Definition at line 56 of file vtkQtChartLayer.h.


Constructor & Destructor Documentation

vtkQtChartLayer::vtkQtChartLayer (  ) 

virtual vtkQtChartLayer::~vtkQtChartLayer (  )  [inline, virtual]

Definition at line 60 of file vtkQtChartLayer.h.


Member Function Documentation

virtual int vtkQtChartLayer::type (  )  const [inline, virtual]

Definition at line 62 of file vtkQtChartLayer.h.

vtkQtChartArea* vtkQtChartLayer::getChartArea (  )  const [inline]

Gets the chart area containing this layer.

Returns:
A pointer to the chart area.

Definition at line 68 of file vtkQtChartLayer.h.

virtual void vtkQtChartLayer::setChartArea ( vtkQtChartArea area  )  [inline, virtual]

Sets the chart area that contains this layer.

The chart area will call this method when the layer is added to it. The layer can overload this method to perform any setup it needs to.

Parameters:
area The new chart area.

Reimplemented in vtkQtBarChart, vtkQtChartAxisLayer, vtkQtChartGridLayer, vtkQtChartSeriesLayer, vtkQtLineChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

Definition at line 78 of file vtkQtChartLayer.h.

virtual void vtkQtChartLayer::getLayerDomain ( vtkQtChartLayerDomain domain  )  const [virtual]

Gets the chart layer's domain.

The layer should use the mergeDomain method of the domain parameter to add its domains. The domains from all of the chart layers will be combined using the domain object.

Parameters:
domain Used to return the chart layer's domain.

Reimplemented in vtkQtBarChart, vtkQtLineChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

virtual void vtkQtChartLayer::layoutChart ( const QRectF &  area  )  [pure virtual]

Used to layout the chart layer.

Use the AxisDomain from the relevant axes to determine if the chart data can be displayed. The domain priority for the axes can override a layer's desired domain.

Parameters:
area The area the chart should occupy.

Implemented in vtkQtBarChart, vtkQtChartAxisLayer, vtkQtChartGridLayer, vtkQtLineChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

virtual bool vtkQtChartLayer::drawItemFilter ( QGraphicsItem *  item,
QPainter *  painter 
) [virtual]

Used to filter items while drawing.

Items can be filtered in two ways. First, this method can return true to skip drawing the item. Second, the painter can be modified to clip the item. The default implementation simply returns false.

Note:
The painter is in scene coordinates when passed in. It will be transformed to item coordinates after this call. To clip in item coordinates, use the item's paint method.
Parameters:
item One of the layer's child items.
painter The painter used to draw the item.
Returns:
True if the item should not be drawn.

virtual bool vtkQtChartLayer::getHelpText ( const QPointF &  point,
QString &  text 
) [virtual]

Gets the help text for the given location.

When the chart receives a help event, the layers are searched, in order, for help text at the help event location. If a layer has an item at the location, it should return true.

Parameters:
point The help location in scene coordinates.
text Used to return the help text.
Returns:
True if help text is found for the given location.

Reimplemented in vtkQtBarChart, vtkQtLineChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

virtual void vtkQtChartLayer::startInteractiveResize (  )  [inline, virtual]

Notifies the chart layer that a resize interaction has started.

Definition at line 132 of file vtkQtChartLayer.h.

virtual void vtkQtChartLayer::finishInteractiveResize (  )  [inline, virtual]

Notifies the chart layer that a resize interaction has finished.

Reimplemented in vtkQtBarChart, vtkQtLineChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

Definition at line 135 of file vtkQtChartLayer.h.

void vtkQtChartLayer::layoutNeeded (  )  [signal]

Emitted when the layer layout needs to be calculated.

void vtkQtChartLayer::rangeChanged (  )  [signal]

Emitted when the axis range for the layer has changed.

Note:
This signal should be emitted before the layoutNeeded signal to be effective.


Member Data Documentation

Stores the containing chart area.

Definition at line 149 of file vtkQtChartLayer.h.


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

Generated on Wed Jun 3 19:28:17 2009 for VTK by  doxygen 1.5.6