Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
UPlotCurve Class Reference

#include <UPlot.h>

Inheritance diagram for UPlotCurve:
Inheritance graph
[legend]

Public Slots

void addValue (const QString &y)
 
void addValue (qreal x, qreal y)
 
void addValue (qreal y)
 
void addValue (UPlotItem *data)
 
void addValues (const QVector< int > &ys)
 
void addValues (const QVector< qreal > &xs, const QVector< qreal > &ys)
 
void addValues (const QVector< qreal > &ys)
 
void addValues (const std::vector< int > &ys)
 
void addValues (const std::vector< qreal > &ys)
 
void addValues (QVector< UPlotItem * > &data)
 
virtual void clear ()
 
void setData (const QVector< qreal > &x, const QVector< qreal > &y)
 
void setData (const QVector< qreal > &y)
 
void setData (const std::vector< qreal > &x, const std::vector< qreal > &y)
 
void setData (const std::vector< qreal > &y)
 
void setVisible (bool visible)
 
void setXIncrement (qreal increment)
 
void setXStart (qreal val)
 

Signals

void dataChanged (const UPlotCurve *)
 

Public Member Functions

const QBrush & brush () const
 
void draw (QPainter *painter, const QRect &limits)
 
void getData (QMap< qreal, qreal > &data) const
 
void getData (QVector< qreal > &x, QVector< qreal > &y) const
 
QPointF getItemData (int index)
 
bool isVisible () const
 
QColor itemsColor () const
 
int itemsSize () const
 
QString name () const
 
const QPen & pen () const
 
void setBrush (const QBrush &brush)
 
void setData (QVector< UPlotItem * > &data)
 
void setItemsColor (const QColor &color)
 
void setPen (const QPen &pen)
 
 UPlotCurve (const QString &name, const QVector< qreal > &x, const QVector< qreal > &y, QObject *parent=0)
 
 UPlotCurve (const QString &name, const QVector< UPlotItem * > data, QObject *parent=0)
 
 UPlotCurve (const QString &name, QObject *parent=0)
 
virtual ~UPlotCurve ()
 

Protected Member Functions

void _addValue (UPlotItem *data)
 
void attach (UPlot *plot)
 
void detach (UPlot *plot)
 
const QVector< qreal > & getMinMax () const
 
virtual bool isMinMaxValid () const
 
int removeItem (int index)
 
virtual void update (qreal scaleX, qreal scaleY, qreal offsetX, qreal offsetY, qreal xDir, qreal yDir, int maxItemsKept)
 
void updateMinMax ()
 

Protected Attributes

QList< QGraphicsItem * > _items
 
UPlot_plot
 

Private Member Functions

void removeItem (UPlotItem *item)
 

Private Attributes

QBrush _brush
 
QColor _itemsColor
 
QVector< qreal > _minMax
 
QString _name
 
QPen _pen
 
QGraphicsRectItem * _rootItem
 
bool _valuesShown
 
bool _visible
 
qreal _xIncrement
 
qreal _xStart
 

Friends

class UPlot
 

Detailed Description

UPlotCurve is a curve used to hold data shown in a UPlot.

Definition at line 93 of file UPlot.h.

Constructor & Destructor Documentation

◆ UPlotCurve() [1/3]

UPlotCurve::UPlotCurve ( const QString &  name,
QObject *  parent = 0 
)

Constructor 1

Definition at line 257 of file UPlot.cpp.

◆ UPlotCurve() [2/3]

UPlotCurve::UPlotCurve ( const QString &  name,
const QVector< UPlotItem * >  data,
QObject *  parent = 0 
)

Constructor 2

◆ UPlotCurve() [3/3]

UPlotCurve::UPlotCurve ( const QString &  name,
const QVector< qreal > &  x,
const QVector< qreal > &  y,
QObject *  parent = 0 
)

Constructor 3

Definition at line 284 of file UPlot.cpp.

◆ ~UPlotCurve()

UPlotCurve::~UPlotCurve ( )
virtual

Definition at line 298 of file UPlot.cpp.

Member Function Documentation

◆ _addValue()

void UPlotCurve::_addValue ( UPlotItem data)
protected

Definition at line 377 of file UPlot.cpp.

◆ addValue [1/4]

void UPlotCurve::addValue ( const QString &  y)
slot

For convenience... Add a single value y, x is auto-incremented by the increment set with setXIncrement().

See also
setXStart()

Definition at line 464 of file UPlot.cpp.

◆ addValue [2/4]

void UPlotCurve::addValue ( qreal  x,
qreal  y 
)
slot

Add a single value y at x.

Definition at line 433 of file UPlot.cpp.

◆ addValue [3/4]

void UPlotCurve::addValue ( qreal  y)
slot

Add a single value y, x is auto-incremented by the increment set with setXIncrement().

See also
setXStart()

Definition at line 449 of file UPlot.cpp.

◆ addValue [4/4]

void UPlotCurve::addValue ( UPlotItem data)
slot

Add a single value, using a custom UPlotItem.

Definition at line 423 of file UPlot.cpp.

◆ addValues [1/6]

void UPlotCurve::addValues ( const QVector< int > &  ys)
slot

Definition at line 517 of file UPlot.cpp.

◆ addValues [2/6]

void UPlotCurve::addValues ( const QVector< qreal > &  xs,
const QVector< qreal > &  ys 
)
slot

Add multiple values y at x. Vectors must have the same size.

Definition at line 487 of file UPlot.cpp.

◆ addValues [3/6]

void UPlotCurve::addValues ( const QVector< qreal > &  ys)
slot

Add multiple values y, x is auto-incremented by the increment set with setXIncrement().

See also
setXStart()

Definition at line 497 of file UPlot.cpp.

◆ addValues [4/6]

void UPlotCurve::addValues ( const std::vector< int > &  ys)
slot

Definition at line 537 of file UPlot.cpp.

◆ addValues [5/6]

void UPlotCurve::addValues ( const std::vector< qreal > &  ys)
slot

Add multiple values y, x is auto-incremented by the increment set with setXIncrement().

See also
setXStart()

Definition at line 557 of file UPlot.cpp.

◆ addValues [6/6]

void UPlotCurve::addValues ( QVector< UPlotItem * > &  data)
slot

For convenience... Add multiple values, using custom UPlotItem.

Definition at line 478 of file UPlot.cpp.

◆ attach()

void UPlotCurve::attach ( UPlot plot)
protected

Definition at line 311 of file UPlot.cpp.

◆ brush()

const QBrush& UPlotCurve::brush ( ) const
inline

Get brush.

Definition at line 119 of file UPlot.h.

◆ clear

void UPlotCurve::clear ( )
virtualslot

Clear curve's values.

Reimplemented in rtabmap::PdfPlotCurve.

Definition at line 653 of file UPlot.cpp.

◆ dataChanged

void UPlotCurve::dataChanged ( const UPlotCurve )
signal

emitted when data is changed.

◆ detach()

void UPlotCurve::detach ( UPlot plot)
protected

Definition at line 325 of file UPlot.cpp.

◆ draw()

void UPlotCurve::draw ( QPainter *  painter,
const QRect &  limits 
)

Definition at line 768 of file UPlot.cpp.

◆ getData() [1/2]

void UPlotCurve::getData ( QMap< qreal, qreal > &  data) const

Definition at line 1038 of file UPlot.cpp.

◆ getData() [2/2]

void UPlotCurve::getData ( QVector< qreal > &  x,
QVector< qreal > &  y 
) const

Definition at line 1021 of file UPlot.cpp.

◆ getItemData()

QPointF UPlotCurve::getItemData ( int  index)

Definition at line 861 of file UPlot.cpp.

◆ getMinMax()

const QVector<qreal>& UPlotCurve::getMinMax ( ) const
inlineprotected

Definition at line 235 of file UPlot.h.

◆ isMinMaxValid()

virtual bool UPlotCurve::isMinMaxValid ( ) const
inlineprotectedvirtual

Reimplemented in UPlotCurveThreshold.

Definition at line 238 of file UPlot.h.

◆ isVisible()

bool UPlotCurve::isVisible ( ) const
inline

Definition at line 142 of file UPlot.h.

◆ itemsColor()

QColor UPlotCurve::itemsColor ( ) const
inline

Definition at line 131 of file UPlot.h.

◆ itemsSize()

int UPlotCurve::itemsSize ( ) const

Get the number of items in the curve (dot + line items).

Definition at line 856 of file UPlot.cpp.

◆ name()

QString UPlotCurve::name ( ) const
inline

Get name.

Definition at line 136 of file UPlot.h.

◆ pen()

const QPen& UPlotCurve::pen ( ) const
inline

Get pen.

Definition at line 115 of file UPlot.h.

◆ removeItem() [1/2]

int UPlotCurve::removeItem ( int  index)
protected

Definition at line 577 of file UPlot.cpp.

◆ removeItem() [2/2]

void UPlotCurve::removeItem ( UPlotItem item)
private

Definition at line 629 of file UPlot.cpp.

◆ setBrush()

void UPlotCurve::setBrush ( const QBrush &  brush)

Set brush.

Definition at line 671 of file UPlot.cpp.

◆ setData [1/5]

void UPlotCurve::setData ( const QVector< qreal > &  x,
const QVector< qreal > &  y 
)
slot

Definition at line 904 of file UPlot.cpp.

◆ setData [2/5]

void UPlotCurve::setData ( const QVector< qreal > &  y)
slot

Definition at line 986 of file UPlot.cpp.

◆ setData [3/5]

void UPlotCurve::setData ( const std::vector< qreal > &  x,
const std::vector< qreal > &  y 
)
slot

Definition at line 945 of file UPlot.cpp.

◆ setData [4/5]

void UPlotCurve::setData ( const std::vector< qreal > &  y)
slot

Definition at line 991 of file UPlot.cpp.

◆ setData() [5/5]

void UPlotCurve::setData ( QVector< UPlotItem * > &  data)

Definition at line 895 of file UPlot.cpp.

◆ setItemsColor()

void UPlotCurve::setItemsColor ( const QColor &  color)

Definition at line 677 of file UPlot.cpp.

◆ setPen()

void UPlotCurve::setPen ( const QPen &  pen)

Set pen.

Definition at line 662 of file UPlot.cpp.

◆ setVisible

void UPlotCurve::setVisible ( bool  visible)
slot

Show or hide the curve.

Definition at line 876 of file UPlot.cpp.

◆ setXIncrement

void UPlotCurve::setXIncrement ( qreal  increment)
slot

Set increment of the x values (when auto-increment is used).

Definition at line 885 of file UPlot.cpp.

◆ setXStart

void UPlotCurve::setXStart ( qreal  val)
slot

Set starting x value (when auto-increment is used).

Definition at line 890 of file UPlot.cpp.

◆ update()

void UPlotCurve::update ( qreal  scaleX,
qreal  scaleY,
qreal  offsetX,
qreal  offsetY,
qreal  xDir,
qreal  yDir,
int  maxItemsKept 
)
protectedvirtual

Reimplemented in UPlotCurveThreshold.

Definition at line 691 of file UPlot.cpp.

◆ updateMinMax()

void UPlotCurve::updateMinMax ( )
protected

Definition at line 340 of file UPlot.cpp.

Friends And Related Function Documentation

◆ UPlot

friend class UPlot
friend

Definition at line 231 of file UPlot.h.

Member Data Documentation

◆ _brush

QBrush UPlotCurve::_brush
private

Definition at line 249 of file UPlot.h.

◆ _items

QList<QGraphicsItem *> UPlotCurve::_items
protected

Definition at line 240 of file UPlot.h.

◆ _itemsColor

QColor UPlotCurve::_itemsColor
private

Definition at line 256 of file UPlot.h.

◆ _minMax

QVector<qreal> UPlotCurve::_minMax
private

Definition at line 254 of file UPlot.h.

◆ _name

QString UPlotCurve::_name
private

Definition at line 247 of file UPlot.h.

◆ _pen

QPen UPlotCurve::_pen
private

Definition at line 248 of file UPlot.h.

◆ _plot

UPlot* UPlotCurve::_plot
protected

Definition at line 241 of file UPlot.h.

◆ _rootItem

QGraphicsRectItem* UPlotCurve::_rootItem
private

Definition at line 255 of file UPlot.h.

◆ _valuesShown

bool UPlotCurve::_valuesShown
private

Definition at line 253 of file UPlot.h.

◆ _visible

bool UPlotCurve::_visible
private

Definition at line 252 of file UPlot.h.

◆ _xIncrement

qreal UPlotCurve::_xIncrement
private

Definition at line 250 of file UPlot.h.

◆ _xStart

qreal UPlotCurve::_xStart
private

Definition at line 251 of file UPlot.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:26