#include <UPlot.h>
Public Slots | |
void | addValue (UPlotItem *data) |
void | addValue (float y) |
void | addValue (float x, float y) |
void | addValue (const QString &y) |
void | addValues (QVector< UPlotItem * > &data) |
void | addValues (const QVector< float > &xs, const QVector< float > &ys) |
void | addValues (const QVector< float > &ys) |
void | addValues (const QVector< int > &ys) |
void | addValues (const std::vector< float > &ys) |
void | addValues (const std::vector< int > &ys) |
virtual void | clear () |
void | setData (const QVector< float > &x, const QVector< float > &y) |
void | setData (const std::vector< float > &x, const std::vector< float > &y) |
void | setData (const QVector< float > &y) |
void | setData (const std::vector< float > &y) |
void | setVisible (bool visible) |
void | setXIncrement (float increment) |
void | setXStart (float val) |
Signals | |
void | dataChanged (const UPlotCurve *) |
Public Member Functions | |
const QBrush & | brush () const |
void | draw (QPainter *painter, const QRect &limits) |
void | getData (QVector< float > &x, QVector< float > &y) const |
void | getData (QMap< float, float > &data) 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, QObject *parent=0) | |
UPlotCurve (const QString &name, const QVector< UPlotItem * > data, QObject *parent=0) | |
UPlotCurve (const QString &name, const QVector< float > &x, const QVector< float > &y, QObject *parent=0) | |
virtual | ~UPlotCurve () |
Protected Member Functions | |
void | _addValue (UPlotItem *data) |
void | attach (UPlot *plot) |
void | detach (UPlot *plot) |
const QVector< float > & | getMinMax () const |
virtual bool | isMinMaxValid () const |
int | removeItem (int index) |
virtual void | update (float scaleX, float scaleY, float offsetX, float offsetY, float xDir, float 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< float > | _minMax |
QString | _name |
QPen | _pen |
QGraphicsRectItem * | _rootItem |
bool | _valuesShown |
bool | _visible |
float | _xIncrement |
float | _xStart |
Friends | |
class | UPlot |
UPlotCurve is a curve used to hold data shown in a UPlot.
UPlotCurve::UPlotCurve | ( | const QString & | name, |
QObject * | parent = 0 |
||
) |
UPlotCurve::UPlotCurve | ( | const QString & | name, |
const QVector< UPlotItem * > | data, | ||
QObject * | parent = 0 |
||
) |
Constructor 2
UPlotCurve::UPlotCurve | ( | const QString & | name, |
const QVector< float > & | x, | ||
const QVector< float > & | y, | ||
QObject * | parent = 0 |
||
) |
UPlotCurve::~UPlotCurve | ( | ) | [virtual] |
void UPlotCurve::_addValue | ( | UPlotItem * | data | ) | [protected] |
void UPlotCurve::addValue | ( | UPlotItem * | data | ) | [slot] |
void UPlotCurve::addValue | ( | float | y | ) | [slot] |
Add a single value y, x is auto-incremented by the increment set with setXIncrement().
void UPlotCurve::addValue | ( | float | x, |
float | y | ||
) | [slot] |
void UPlotCurve::addValue | ( | const QString & | y | ) | [slot] |
For convenience... Add a single value y, x is auto-incremented by the increment set with setXIncrement().
void UPlotCurve::addValues | ( | QVector< UPlotItem * > & | data | ) | [slot] |
void UPlotCurve::addValues | ( | const QVector< float > & | xs, |
const QVector< float > & | ys | ||
) | [slot] |
void UPlotCurve::addValues | ( | const QVector< float > & | ys | ) | [slot] |
Add multiple values y, x is auto-incremented by the increment set with setXIncrement().
void UPlotCurve::addValues | ( | const QVector< int > & | ys | ) | [slot] |
void UPlotCurve::addValues | ( | const std::vector< float > & | ys | ) | [slot] |
Add multiple values y, x is auto-incremented by the increment set with setXIncrement().
void UPlotCurve::addValues | ( | const std::vector< int > & | ys | ) | [slot] |
void UPlotCurve::attach | ( | UPlot * | plot | ) | [protected] |
const QBrush& UPlotCurve::brush | ( | ) | const [inline] |
void UPlotCurve::clear | ( | ) | [virtual, slot] |
Clear curve's values.
Reimplemented in rtabmap::PdfPlotCurve.
void UPlotCurve::dataChanged | ( | const UPlotCurve * | ) | [signal] |
emitted when data is changed.
void UPlotCurve::detach | ( | UPlot * | plot | ) | [protected] |
void UPlotCurve::draw | ( | QPainter * | painter, |
const QRect & | limits | ||
) |
void UPlotCurve::getData | ( | QVector< float > & | x, |
QVector< float > & | y | ||
) | const |
void UPlotCurve::getData | ( | QMap< float, float > & | data | ) | const |
QPointF UPlotCurve::getItemData | ( | int | index | ) |
const QVector<float>& UPlotCurve::getMinMax | ( | ) | const [inline, protected] |
virtual bool UPlotCurve::isMinMaxValid | ( | ) | const [inline, protected, virtual] |
Reimplemented in UPlotCurveThreshold.
bool UPlotCurve::isVisible | ( | ) | const [inline] |
QColor UPlotCurve::itemsColor | ( | ) | const [inline] |
int UPlotCurve::itemsSize | ( | ) | const |
QString UPlotCurve::name | ( | ) | const [inline] |
const QPen& UPlotCurve::pen | ( | ) | const [inline] |
int UPlotCurve::removeItem | ( | int | index | ) | [protected] |
void UPlotCurve::removeItem | ( | UPlotItem * | item | ) | [private] |
void UPlotCurve::setBrush | ( | const QBrush & | brush | ) |
void UPlotCurve::setData | ( | QVector< UPlotItem * > & | data | ) |
void UPlotCurve::setData | ( | const QVector< float > & | x, |
const QVector< float > & | y | ||
) | [slot] |
void UPlotCurve::setData | ( | const std::vector< float > & | x, |
const std::vector< float > & | y | ||
) | [slot] |
void UPlotCurve::setData | ( | const QVector< float > & | y | ) | [slot] |
void UPlotCurve::setData | ( | const std::vector< float > & | y | ) | [slot] |
void UPlotCurve::setItemsColor | ( | const QColor & | color | ) |
void UPlotCurve::setPen | ( | const QPen & | pen | ) |
void UPlotCurve::setVisible | ( | bool | visible | ) | [slot] |
void UPlotCurve::setXIncrement | ( | float | increment | ) | [slot] |
void UPlotCurve::setXStart | ( | float | val | ) | [slot] |
void UPlotCurve::update | ( | float | scaleX, |
float | scaleY, | ||
float | offsetX, | ||
float | offsetY, | ||
float | xDir, | ||
float | yDir, | ||
int | maxItemsKept | ||
) | [protected, virtual] |
Reimplemented in UPlotCurveThreshold.
void UPlotCurve::updateMinMax | ( | ) | [protected] |
friend class UPlot [friend] |
Reimplemented in UPlotCurveThreshold.
QBrush UPlotCurve::_brush [private] |
QList<QGraphicsItem *> UPlotCurve::_items [protected] |
QColor UPlotCurve::_itemsColor [private] |
QVector<float> UPlotCurve::_minMax [private] |
QString UPlotCurve::_name [private] |
QPen UPlotCurve::_pen [private] |
UPlot* UPlotCurve::_plot [protected] |
QGraphicsRectItem* UPlotCurve::_rootItem [private] |
bool UPlotCurve::_valuesShown [private] |
bool UPlotCurve::_visible [private] |
float UPlotCurve::_xIncrement [private] |
float UPlotCurve::_xStart [private] |