6 #ifndef PLOTINSTANCESAMPLER_H_
7 #define PLOTINSTANCESAMPLER_H_
9 #include "plotsconfig.h"
11 #include "qwt_series_data.h"
40 size_t size()
const override;
47 QPointF
sample(
size_t i)
const override;
64 double lookupSampleTime(
double initialTime,
size_t i)
const;
67 mutable QRectF _boundingRect;
68 mutable size_t _lastRingHead;
69 mutable size_t _lastRingSize;
72 #endif // PLOTINSTANCESAMPLER_H_
An adaptor class converting from PlotInstance data to QwtSeriesData.
Definition: plotinstancesampler.h:24
PlotInstanceSampler(const PlotInstance *curveData)
Create a sampler for the give plot.
size_t size() const override
Returns the number of samples in the PlotInstance.
void setCurve(const PlotInstance *curveData)
Sets the curve, replacing the existing curve.
Holds data for a single curve.
Definition: plotinstance.h:43
void invalidateBoundingRect()
Invalidate the bounding rectangle, to be recalculated.
QRectF boundingRect() const override
Overridden to recalculate the as required bounds.
QPointF sample(size_t i) const override
Samples the ith element of the plot.
QRectF calculateBoundingRect(size_t from=0, size_t to=~(size_t)(0u)) const
Calculate the bounds.
const PlotInstance * curve() const
Access the curve to sample.
Definition: plotinstancesampler.h:36