An adaptor class converting from PlotInstance
data to QwtSeriesData
.
More...
#include <plotinstancesampler.h>
An adaptor class converting from PlotInstance
data to QwtSeriesData
.
The sampler provides two primary functions: adapting the PlotInstance
for display in Qwt widgets and resolving the time values for samples as dictated by the PlotSource
. This includes accessing the time column, adjusting the time-base and time scaling (in that order).
A PlotInstance
must outlive all its samplers.
PlotInstanceSampler::PlotInstanceSampler |
( |
const PlotInstance * |
curveData | ) |
|
Create a sampler for the give plot.
- Parameters
-
curveData | The plot to sample. |
QRectF PlotInstanceSampler::boundingRect |
( |
| ) |
const |
|
override |
Overridden to recalculate the as required bounds.
- Returns
- The curve bounds.
QRectF PlotInstanceSampler::calculateBoundingRect |
( |
size_t |
from = 0 , |
|
|
size_t |
to = ~(size_t)(0u) |
|
) |
| const |
Calculate the bounds.
- Returns
- The curve bounds.
Access the curve to sample.
- Returns
- The curve to sample.
QPointF PlotInstanceSampler::sample |
( |
size_t |
i | ) |
const |
|
override |
Samples the ith
element of the plot.
Respects timing conversions.
- Parameters
-
i | The sample number to request: [0, size() ). |
- Returns
- The plot sample. The y value is the sample value, while the x value is the sample index or adjusted time.
size_t PlotInstanceSampler::size |
( |
| ) |
const |
|
override |
Returns the number of samples in the PlotInstance
.
- Returns
- The curve sample count.
The documentation for this class was generated from the following file: