Public Types | Public Member Functions | Static Public Member Functions

vtkQtChartShape Class Reference

The vtkQtChartShape class is the base class for shapes used in the chart shape locators. More...

#include <vtkQtChartShape.h>

Inheritance diagram for vtkQtChartShape:
Inheritance graph
[legend]

List of all members.

Public Types

enum  BoundingBoxCode { Left = 0x01000000, Top = 0x00010000, Right = 0x00000100, Bottom = 0x00000001 }

Public Member Functions

 vtkQtChartShape ()
 vtkQtChartShape (int series, int index)
 Constructs a chart shape.
 vtkQtChartShape (const vtkQtChartShape &other)
virtual ~vtkQtChartShape ()
vtkQtChartShapeoperator= (const vtkQtChartShape &other)
virtual void getBounds (QRectF &bounds) const =0
 Gets the bounding box for the shape.
virtual bool contains (const QPointF &point) const =0
 Gets whether or not the shape contains the given point.
virtual bool intersects (const QRectF &area) const =0
 Gets whether or not the shape intersects the given area.
virtual void setRectangle (const QRectF &rectangle)
 Sets the shape for rectangular types.
virtual void setPolygon (const QPolygonF &polygon)
 Sets the shape for polygonal types.
int getSeries () const
 Gets the series number.
void setSeries (int series)
 Sets the series number.
int getIndex () const
 Gets the index in the series.
void setIndex (int index)
 Sets the index in the series.

Static Public Member Functions

static int getBoundingBoxCode (const QPointF &point, const QRectF &bounds)
 Gets the bounding box code for the given point and rectangle.
static int getXBoundingBoxCode (float x, const QRectF &bounds)
 Gets the bounding box code for the given coordinate and rectangle.
static int getYBoundingBoxCode (float y, const QRectF &bounds)
 Gets the bounding box code for the given coordinate and rectangle.

Detailed Description

The vtkQtChartShape class is the base class for shapes used in the chart shape locators.

Definition at line 38 of file vtkQtChartShape.h.


Member Enumeration Documentation

Enumerator:
Left 

Left of bounding box.

Top 

Above the bounding box.

Right 

Right of bounding box.

Bottom 

Below the bounding box.

Definition at line 41 of file vtkQtChartShape.h.

    {
    Left   = 0x01000000, 
    Top    = 0x00010000, 
    Right  = 0x00000100, 
    Bottom = 0x00000001  
    };

Constructor & Destructor Documentation

vtkQtChartShape::vtkQtChartShape (  )
vtkQtChartShape::vtkQtChartShape ( int  series,
int  index 
)

Constructs a chart shape.

Parameters:
seriesThe series index.
indexThe index in the given series.
vtkQtChartShape::vtkQtChartShape ( const vtkQtChartShape other )
virtual vtkQtChartShape::~vtkQtChartShape (  ) [inline, virtual]

Definition at line 58 of file vtkQtChartShape.h.

{}

Member Function Documentation

virtual bool vtkQtChartShape::contains ( const QPointF &  point ) const [pure virtual]

Gets whether or not the shape contains the given point.

Parameters:
pointThe position to evaluate.
Returns:
True if the shape contains the given point.

Implemented in vtkQtChartBar, and vtkQtChartQuad.

static int vtkQtChartShape::getBoundingBoxCode ( const QPointF &  point,
const QRectF &  bounds 
) [static]

Gets the bounding box code for the given point and rectangle.

This method combines the x and y bounding box codes.

Parameters:
pointThe position to evaluate.
boundsThe bounding box.
virtual void vtkQtChartShape::getBounds ( QRectF &  bounds ) const [pure virtual]

Gets the bounding box for the shape.

Parameters:
boundsUsed to return the bounding box.

Implemented in vtkQtChartBar, and vtkQtChartQuad.

int vtkQtChartShape::getIndex (  ) const [inline]

Gets the index in the series.

Returns:
The index in the series.

Definition at line 118 of file vtkQtChartShape.h.

{return this->Index;}
int vtkQtChartShape::getSeries (  ) const [inline]

Gets the series number.

Returns:
The series number.

Definition at line 107 of file vtkQtChartShape.h.

{return this->Series;}
static int vtkQtChartShape::getXBoundingBoxCode ( float  x,
const QRectF &  bounds 
) [static]

Gets the bounding box code for the given coordinate and rectangle.

Parameters:
xThe x position to evaluate.
boundsThe bounding box.
static int vtkQtChartShape::getYBoundingBoxCode ( float  y,
const QRectF &  bounds 
) [static]

Gets the bounding box code for the given coordinate and rectangle.

Parameters:
yThe y position to evaluate.
boundsThe bounding box.
virtual bool vtkQtChartShape::intersects ( const QRectF &  area ) const [pure virtual]

Gets whether or not the shape intersects the given area.

Parameters:
areaThe area to evaluate.
Returns:
True if the shape intersects the given area.

Implemented in vtkQtChartBar, and vtkQtChartQuad.

vtkQtChartShape& vtkQtChartShape::operator= ( const vtkQtChartShape other )
void vtkQtChartShape::setIndex ( int  index ) [inline]

Sets the index in the series.

Parameters:
indexThe new index in the series.

Definition at line 123 of file vtkQtChartShape.h.

{this->Index = index;}
virtual void vtkQtChartShape::setPolygon ( const QPolygonF &  polygon ) [virtual]

Sets the shape for polygonal types.

This method can be used to set the shape. The default implementation does nothing. This is useful for objects that have a polygonal shape.

Parameters:
polygonThe new shape.
See also:
vtkQtChartShape::setRectangle(const QRectF &)

Reimplemented in vtkQtChartQuad.

virtual void vtkQtChartShape::setRectangle ( const QRectF &  rectangle ) [virtual]

Sets the shape for rectangular types.

This method can be used to set the shape. The default implementation does nothing. This is useful for objects that have a rectangular shape.

Parameters:
rectangleThe new shape.
See also:
vtkQtChartShape::setPolygon(const QPolygonF &)

Reimplemented in vtkQtChartBar.

void vtkQtChartShape::setSeries ( int  series ) [inline]

Sets the series number.

Parameters:
seriesThe new series number.

Definition at line 112 of file vtkQtChartShape.h.

{this->Series = series;}

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