MIRA
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
PointVectorObject< PointType > Class Template Reference

#include <visualization/2d/PointVectorObject.h>

Inheritance diagram for PointVectorObject< PointType >:
Inheritance graph
[legend]

Public Member Functions

 PointVectorObject (QGraphicsItem *parent=NULL)
 
virtual ~PointVectorObject ()
 
void setData (const std::vector< PointType > &data)
 
void setData (const std::vector< std::pair< PointType, QColor >> &data)
 
void setWidth (qreal width)
 
void setColor (const QColor &color)
 
qreal width () const
 
QColor color () const
 
QRectF boundingRect () const
 

Protected Types

typedef QPair< QPointF, QColor > ColouredPoint
 

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=NULL)
 
void addPoint (qreal x, qreal y, QColor color=QColor::Invalid)
 
void updateColor ()
 

Protected Attributes

QVector< ColouredPointmData
 
QRectF mBoundingRect
 
QRectF mBoundingRectAdjusted
 
qreal mWidth
 
QColor mColor
 

Member Typedef Documentation

◆ ColouredPoint

typedef QPair<QPointF, QColor> ColouredPoint
protected

Constructor & Destructor Documentation

◆ PointVectorObject()

PointVectorObject ( QGraphicsItem *  parent = NULL)

◆ ~PointVectorObject()

virtual ~PointVectorObject ( )
virtual

Member Function Documentation

◆ setData() [1/2]

void setData ( const std::vector< PointType > &  data)

◆ setData() [2/2]

void setData ( const std::vector< std::pair< PointType, QColor >> &  data)

◆ setWidth()

void setWidth ( qreal  width)

◆ setColor()

void setColor ( const QColor &  color)

◆ width()

qreal width ( ) const

◆ color()

QColor color ( ) const

◆ boundingRect()

QRectF boundingRect ( ) const

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = NULL 
)
protected

◆ addPoint()

void addPoint ( qreal  x,
qreal  y,
QColor  color = QColor::Invalid 
)
protected

◆ updateColor()

void updateColor ( )
protected

Member Data Documentation

◆ mData

QVector<ColouredPoint> mData
protected

◆ mBoundingRect

QRectF mBoundingRect
protected

◆ mBoundingRectAdjusted

QRectF mBoundingRectAdjusted
protected

◆ mWidth

qreal mWidth
protected

◆ mColor

QColor mColor
protected

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