VTK
Public Types | Signals | Public Member Functions | Protected Attributes | List of all members
vtkQtChartLayer Class Referenceabstract

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

#include <vtkQtChartLayer.h>

Inheritance diagram for vtkQtChartLayer:
[legend]
Collaboration diagram for vtkQtChartLayer:
[legend]

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.
 

Detailed Description

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

Definition at line 43 of file vtkQtChartLayer.h.

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 ( )
inlinevirtual

Definition at line 60 of file vtkQtChartLayer.h.

Member Function Documentation

virtual int vtkQtChartLayer::type ( ) const
inlinevirtual

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)
inlinevirtual

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
areaThe new chart area.

Reimplemented in vtkQtChartAxisLayer, vtkQtChartSeriesLayer, vtkQtLineChart, vtkQtBarChart, vtkQtChartGridLayer, 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
domainUsed to return the chart layer's domain.

Reimplemented in vtkQtLineChart, vtkQtBarChart, 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
areaThe area the chart should occupy.

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

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
itemOne of the layer's child items.
painterThe 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
pointThe help location in scene coordinates.
textUsed to return the help text.
Returns
True if help text is found for the given location.

Reimplemented in vtkQtLineChart, vtkQtBarChart, vtkQtStackedChart, and vtkQtStatisticalBoxChart.

virtual void vtkQtChartLayer::startInteractiveResize ( )
inlinevirtual

Notifies the chart layer that a resize interaction has started.

Definition at line 132 of file vtkQtChartLayer.h.

virtual void vtkQtChartLayer::finishInteractiveResize ( )
inlinevirtual

Notifies the chart layer that a resize interaction has finished.

Reimplemented in vtkQtLineChart, vtkQtBarChart, 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

vtkQtChartArea* vtkQtChartLayer::ChartArea
protected

Stores the containing chart area.

Definition at line 149 of file vtkQtChartLayer.h.


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