A custom QwtPlotCurve that can self-update and toggle.
More...
Public Member Functions |
| | DtFrameratePlotSeries (DtFrameratePlot *plot, unsigned int seriesId, const QString &title) |
| | CTOR Instantiates a new DtQtGpsAccuracyPlotSeries for use with the given plot.
|
| virtual | ~DtFrameratePlotSeries () |
| | Virtual DTOR.
|
| virtual void | initStorageBuffer (unsigned int size) |
| | Initializes the storage buffers to the given size.
|
| virtual void | reinitStorageBuffer (unsigned int size) |
| | Re-initializes the storage buffers to the given size.
|
| virtual void | updateLegend (QwtLegend *legend) const |
| | Updates the legend to display the series.
|
| virtual void | setData (double *timeVals, double *dataVals, unsigned int numVals) |
| | Sets the data for the series.
|
| virtual void | setOnlyVisibleMinMax (bool enable) |
| | Sets whether to only factor visible points into min/max.
|
| virtual bool | onlyVisibleMinMax () const |
| | Returns whether only visible points are factored into min/max.
|
| virtual void | setLazyMinMaxEnabled (bool enabled) |
| | Set whether min/max calculation limiting should be enabled.
|
| virtual bool | lazyMinMaxEnabled () const |
| | Get whether lazy min/max calculations are enabled.
|
| virtual double | minYValue () const |
| | Returns the min y value for the series.
|
| virtual double | maxYValue () const |
| | Returns the max y value for the series.
|
| virtual double | lastPlottedTime () const |
| | Returns the time of the last plotted point.
|
| virtual void | clear () |
| | Clears the data representing the series state.
|
| virtual void | setPenStyle (Qt::PenStyle style) |
| | Sets the style of the series' pen.
|
| virtual void | setPenColor (const QColor &color) |
| | Sets the color of the series' pen.
|
| virtual void | setEnabled (bool state) |
| | Sets whether the series is visible on the plot and legend.
|
| virtual unsigned int | seriesId () const |
| | Get the id this series is indexed as.
|
Protected Member Functions |
| virtual void | addDataPoint (double time, double val) |
| | Adds a data point to the series.
|
| virtual void | computeMinMaxValues () const |
| | Computes the min and max values for the series.
|
Detailed Description
A custom QwtPlotCurve that can self-update and toggle.
Constructor & Destructor Documentation
| MAKVrExchange::DtFrameratePlotSeries::DtFrameratePlotSeries |
( |
DtFrameratePlot * |
plot, |
|
|
unsigned int |
seriesId, |
|
|
const QString & |
title |
|
) |
| |
CTOR Instantiates a new DtQtGpsAccuracyPlotSeries for use with the given plot.
- Parameters
-
| plot | the parent plot for the series (used when toggling series visibility) |
| title | the name of the series |
| virtual MAKVrExchange::DtFrameratePlotSeries::~DtFrameratePlotSeries |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void MAKVrExchange::DtFrameratePlotSeries::addDataPoint |
( |
double |
time, |
|
|
double |
val |
|
) |
| |
|
protectedvirtual |
Adds a data point to the series.
Note: Should only be called by the parent plot to preserve scaling.
- Parameters
-
| time | the time (x value) |
| value | the value (y value) |
| virtual void MAKVrExchange::DtFrameratePlotSeries::clear |
( |
| ) |
|
|
virtual |
Clears the data representing the series state.
| virtual void MAKVrExchange::DtFrameratePlotSeries::computeMinMaxValues |
( |
| ) |
const |
|
protectedvirtual |
Computes the min and max values for the series.
Only factors in visible points if onlyVisibleMinMax is true.
| virtual void MAKVrExchange::DtFrameratePlotSeries::initStorageBuffer |
( |
unsigned int |
size | ) |
|
|
virtual |
Initializes the storage buffers to the given size.
Regardless of current and new sizes, the buffers are re-created. Note that this clears all data stored in the buffers.
| virtual double MAKVrExchange::DtFrameratePlotSeries::lastPlottedTime |
( |
| ) |
const |
|
virtual |
Returns the time of the last plotted point.
If no points have been plotted, returns 0.
| virtual bool MAKVrExchange::DtFrameratePlotSeries::lazyMinMaxEnabled |
( |
| ) |
const |
|
virtual |
Get whether lazy min/max calculations are enabled.
| virtual double MAKVrExchange::DtFrameratePlotSeries::maxYValue |
( |
| ) |
const |
|
virtual |
Returns the max y value for the series.
Overridden to perform check against only visible values if parts of series are off the edges of the plot.
| virtual double MAKVrExchange::DtFrameratePlotSeries::minYValue |
( |
| ) |
const |
|
virtual |
Returns the min y value for the series.
Overridden to perform check against only visible values if parts of series are off the edges of the plot.
| virtual bool MAKVrExchange::DtFrameratePlotSeries::onlyVisibleMinMax |
( |
| ) |
const |
|
virtual |
Returns whether only visible points are factored into min/max.
| virtual void MAKVrExchange::DtFrameratePlotSeries::reinitStorageBuffer |
( |
unsigned int |
size | ) |
|
|
virtual |
Re-initializes the storage buffers to the given size.
If the buffers are shrinking, existing data is truncated to fit in new buffers. If buffers are growing, existing data is copied to them.
| virtual unsigned int MAKVrExchange::DtFrameratePlotSeries::seriesId |
( |
| ) |
const |
|
virtual |
Get the id this series is indexed as.
| virtual void MAKVrExchange::DtFrameratePlotSeries::setData |
( |
double * |
timeVals, |
|
|
double * |
dataVals, |
|
|
unsigned int |
numVals |
|
) |
| |
|
virtual |
Sets the data for the series.
| virtual void MAKVrExchange::DtFrameratePlotSeries::setEnabled |
( |
bool |
state | ) |
|
|
virtual |
Sets whether the series is visible on the plot and legend.
- Parameters
-
| state | whether the series is visible on the plot and legend |
| virtual void MAKVrExchange::DtFrameratePlotSeries::setLazyMinMaxEnabled |
( |
bool |
enabled | ) |
|
|
virtual |
Set whether min/max calculation limiting should be enabled.
Disabling this causes the last calculated min/max values to be stored and returned for further calls until the series is updated, at which point the series' min and max are recalculated. Note: In more complex plotting scenarios (eg. plot rescaling independent from series updates), this setting may need to be disabled in order to work with the onlyVisibleMinMax setting.
| virtual void MAKVrExchange::DtFrameratePlotSeries::setOnlyVisibleMinMax |
( |
bool |
enable | ) |
|
|
virtual |
Sets whether to only factor visible points into min/max.
If set to true, using minYValue and maxYValue will iterate over the series' data points and return the min and max only for the plot's visible range.
| virtual void MAKVrExchange::DtFrameratePlotSeries::setPenColor |
( |
const QColor & |
color | ) |
|
|
virtual |
Sets the color of the series' pen.
| virtual void MAKVrExchange::DtFrameratePlotSeries::setPenStyle |
( |
Qt::PenStyle |
style | ) |
|
|
virtual |
Sets the style of the series' pen.
| virtual void MAKVrExchange::DtFrameratePlotSeries::updateLegend |
( |
QwtLegend * |
legend | ) |
const |
|
virtual |
Updates the legend to display the series.
Overridden to set the length of the sample line.
Friends And Related Function Documentation
Member Data Documentation
| double* MAKVrExchange::DtFrameratePlotSeries::myDataVals |
|
protected |
| bool MAKVrExchange::DtFrameratePlotSeries::myDirtyMinMaxFlag |
|
mutableprotected |
| bool MAKVrExchange::DtFrameratePlotSeries::myEnabledFlag |
|
protected |
| bool MAKVrExchange::DtFrameratePlotSeries::myEnableLazyMinMaxFlag |
|
protected |
| double MAKVrExchange::DtFrameratePlotSeries::myMax |
|
mutableprotected |
| unsigned int MAKVrExchange::DtFrameratePlotSeries::myMaxDataPoints |
|
protected |
| double MAKVrExchange::DtFrameratePlotSeries::myMin |
|
mutableprotected |
| unsigned int MAKVrExchange::DtFrameratePlotSeries::myNumVals |
|
protected |
| bool MAKVrExchange::DtFrameratePlotSeries::myOnlyVisibleMinMaxFlag |
|
protected |
| unsigned int MAKVrExchange::DtFrameratePlotSeries::mySeriesId |
|
protected |
| double* MAKVrExchange::DtFrameratePlotSeries::myTimeVals |
|
protected |
The documentation for this class was generated from the following file: