VTK
Public Slots | Public Member Functions | Protected Slots | List of all members
vtkQtBarChart Class Reference

The vtkQtBarChart class is used to display a bar chart. More...

#include <vtkQtBarChart.h>

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

Public Slots

void reset ()
 Refreshes the bar chart data from the model.
- Public Slots inherited from vtkQtChartSeriesLayer
void setXOffset (float offset)
 Sets the contents x-axis offset.
void setYOffset (float offset)
 Sets the contents y-axis offset.

Public Member Functions

 vtkQtBarChart ()
virtual ~vtkQtBarChart ()
Setup Methods
virtual void setChartArea (vtkQtChartArea *area)
 Sets the chart area for the chart layer.
virtual void setModel (vtkQtChartSeriesModel *model)
 Sets the chart series model.
Drawing Parameters
vtkQtBarChartOptionsgetOptions () const
 Gets the bar chart drawing options.
void setOptions (const vtkQtBarChartOptions &options)
 Sets the bar chart drawing options.
virtual QPixmap getSeriesIcon (int series) const
 Gets the bar chart drawing options.
Layout Methods
virtual void getLayerDomain (vtkQtChartLayerDomain &domain) const
 Notifies the chart layer that a resize interaction has finished.
virtual void layoutChart (const QRectF &area)
 Notifies the chart layer that a resize interaction has finished.
virtual bool getHelpText (const QPointF &point, QString &text)
 Notifies the chart layer that a resize interaction has finished.
virtual void finishInteractiveResize ()
 Notifies the chart layer that a resize interaction has finished.
Selection Methods
virtual void getSeriesAt (const QPointF &point, vtkQtChartSeriesSelection &selection) const
 Gets the list of series at a given position.
virtual void getPointsAt (const QPointF &point, vtkQtChartSeriesSelection &selection) const
 Gets the list of points at a given position.
virtual void getSeriesIn (const QRectF &area, vtkQtChartSeriesSelection &selection) const
 Gets the list of series in a given area.
virtual void getPointsIn (const QRectF &area, vtkQtChartSeriesSelection &selection) const
 Gets the list of points in a given area.
QGraphicsItem Methods
virtual QRectF boundingRect () const
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
- Public Member Functions inherited from vtkQtChartSeriesLayer
 vtkQtChartSeriesLayer (bool useContents=true)
virtual ~vtkQtChartSeriesLayer ()
vtkQtChartSeriesModelgetModel () const
 Gets the chart series model.
vtkQtChartSeriesOptionsModelgetOptionsModel () const
 Gets the chart series options model.
virtual void setOptionsModel (vtkQtChartSeriesOptionsModel *model)
 Sets the chart series options model.
vtkQtChartSeriesOptionsgetSeriesOptions (int series) const
 Gets the drawing options for the given series.
int getSeriesOptionsIndex (vtkQtChartSeriesOptions *options) const
 Gets the index for the given series options.
vtkQtChartSeriesSelectionModelgetSelectionModel () const
 Gets the chart series selection model.
- Public Member Functions inherited from vtkQtChartLayer
 vtkQtChartLayer ()
virtual ~vtkQtChartLayer ()
virtual int type () const
vtkQtChartAreagetChartArea () const
 Gets the chart area containing this layer.
virtual bool drawItemFilter (QGraphicsItem *item, QPainter *painter)
 Used to filter items while drawing.
virtual void startInteractiveResize ()
 Notifies the chart layer that a resize interaction has started.

Protected Slots

virtual void handleOptionsChanged (vtkQtChartSeriesOptions *, int type, const QVariant &newvalue, const QVariant &oldvalue)
 Called when any of the series options are changed.
- Protected Slots inherited from vtkQtChartSeriesLayer
virtual void handleOptionsChanged (vtkQtChartSeriesOptions *, int type, const QVariant &newvalue, const QVariant &oldvalue)
 Called when any of the series options are changed.

Additional Inherited Members

- Public Types inherited from vtkQtChartSeriesLayer
enum  { Type = vtkQtChart_SeriesLayerType }
- Signals inherited from vtkQtChartSeriesLayer
void modelChanged (vtkQtChartSeriesModel *previous, vtkQtChartSeriesModel *current)
 Emitted when the series model is changed.
void modelSeriesChanged (int first, int last)
 Emitted when the name or icon changes for a set of series.
- Protected Member Functions inherited from vtkQtChartSeriesLayer
virtual void setupOptions (vtkQtChartSeriesOptions *options)
 Sets up the default values for the series options object.
virtual void cleanupOptions (vtkQtChartSeriesOptions *options)
 Cleans up the options by deallocating the style reservation for the option.
- Protected Attributes inherited from vtkQtChartSeriesLayer
vtkQtChartSeriesSelectionModelSelection
 Stores the series/point selection.
vtkQtChartSeriesModelModel
 Stores the series model.
vtkQtChartContentsAreaContents
 Used for panning.
vtkQtChartSeriesOptionsModelOptions
 Stores the series options.

Detailed Description

The vtkQtBarChart class is used to display a bar chart.

Definition at line 38 of file vtkQtBarChart.h.

Constructor & Destructor Documentation

vtkQtBarChart::vtkQtBarChart ( )
virtual vtkQtBarChart::~vtkQtBarChart ( )
virtual

Member Function Documentation

virtual void vtkQtBarChart::setChartArea ( vtkQtChartArea area)
virtual

Sets the chart area for the chart layer.

If the model is set before the chart layer is added to a chart area, series options will not be available. Setting the chart area will create the series options for the model in this case. Subclasses can extend this method to handle the new options.

Parameters
areaThe new chart area.

Reimplemented from vtkQtChartSeriesLayer.

virtual void vtkQtBarChart::setModel ( vtkQtChartSeriesModel model)
virtual

Sets the chart series model.

Parameters
modelThe new chart series model.

Reimplemented from vtkQtChartSeriesLayer.

vtkQtBarChartOptions* vtkQtBarChart::getOptions ( ) const
inline

Gets the bar chart drawing options.

Returns
A pointer to the bar chart drawing options.

Definition at line 59 of file vtkQtBarChart.h.

void vtkQtBarChart::setOptions ( const vtkQtBarChartOptions options)

Sets the bar chart drawing options.

This method sets all the options at once, which can prevent unnecessary view updates.

Parameters
optionsThe new bar chart drawing options.
virtual QPixmap vtkQtBarChart::getSeriesIcon ( int  series) const
virtual

Gets the bar chart drawing options.

Returns
A pointer to the bar chart drawing options.

Reimplemented from vtkQtChartSeriesLayer.

virtual void vtkQtBarChart::getLayerDomain ( vtkQtChartLayerDomain domain) const
virtual

Notifies the chart layer that a resize interaction has finished.

The chart bar tree is not updated while the chart is in an interactive state. It is updated in this method if needed.

Reimplemented from vtkQtChartLayer.

virtual void vtkQtBarChart::layoutChart ( const QRectF &  area)
virtual

Notifies the chart layer that a resize interaction has finished.

The chart bar tree is not updated while the chart is in an interactive state. It is updated in this method if needed.

Implements vtkQtChartLayer.

virtual bool vtkQtBarChart::getHelpText ( const QPointF &  point,
QString &  text 
)
virtual

Notifies the chart layer that a resize interaction has finished.

The chart bar tree is not updated while the chart is in an interactive state. It is updated in this method if needed.

Reimplemented from vtkQtChartLayer.

virtual void vtkQtBarChart::finishInteractiveResize ( )
virtual

Notifies the chart layer that a resize interaction has finished.

The chart bar tree is not updated while the chart is in an interactive state. It is updated in this method if needed.

Reimplemented from vtkQtChartLayer.

virtual void vtkQtBarChart::getSeriesAt ( const QPointF &  point,
vtkQtChartSeriesSelection selection 
) const
virtual

Gets the list of series at a given position.

Parameters
pointThe position in scene coordinates.
selectionUsed to return the list of series.

Reimplemented from vtkQtChartSeriesLayer.

virtual void vtkQtBarChart::getPointsAt ( const QPointF &  point,
vtkQtChartSeriesSelection selection 
) const
virtual

Gets the list of points at a given position.

Parameters
pointThe position in scene coordinates.
selectionUsed to return the list of points.

Reimplemented from vtkQtChartSeriesLayer.

virtual void vtkQtBarChart::getSeriesIn ( const QRectF &  area,
vtkQtChartSeriesSelection selection 
) const
virtual

Gets the list of series in a given area.

Parameters
areaThe rectangle in scene coordinates.
selectionUsed to return the list of series.

Reimplemented from vtkQtChartSeriesLayer.

virtual void vtkQtBarChart::getPointsIn ( const QRectF &  area,
vtkQtChartSeriesSelection selection 
) const
virtual

Gets the list of points in a given area.

Parameters
areaThe rectangle in scene coordinates.
selectionUsed to return the list of points.

Reimplemented from vtkQtChartSeriesLayer.

virtual QRectF vtkQtBarChart::boundingRect ( ) const
virtual
virtual void vtkQtBarChart::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
virtual
void vtkQtBarChart::reset ( )
slot

Refreshes the bar chart data from the model.

The currently displayed data is cleaned up. If a model is set, it is used to populate the bar chart.

virtual void vtkQtBarChart::handleOptionsChanged ( vtkQtChartSeriesOptions ,
int  type,
const QVariant &  newvalue,
const QVariant &  oldvalue 
)
protectedvirtualslot

Called when any of the series options are changed.

Default implementation fires the modelSeriesChanged() signal.

Parameters
optionsThe options that fired the dataChanged() signal.
typeType of the option that was changed.
newValueThe new value for the option.
oldValueThe previous value for the option, if any.

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