#include <timeseries_qwt.h>
Public Types | |
enum | Transform { noTransform, firstDerivative, secondDerivative, XYPlot } |
Public Slots | |
void | setTimeOffset (double offset) |
Public Member Functions | |
virtual QRectF | boundingRect () const override |
PlotDataPtr | data () |
PlotData::RangeTimeOpt | getVisualizationRangeX () |
PlotData::RangeValueOpt | getVisualizationRangeY (int first_index, int last_index) |
virtual QPointF | sample (size_t i) const override |
nonstd::optional< QPointF > | sampleFromTime (double t) |
void | setAlternativeAxisX (PlotDataPtr new_x_data) |
void | setSubsampleFactor () |
void | setTransform (Transform trans) |
virtual size_t | size () const override |
double | timeOffset () const |
TimeseriesQwt (PlotDataPtr base) | |
Transform | transform () const |
void | updateData () |
virtual | ~TimeseriesQwt () |
Private Attributes | |
PlotDataPtr | _alternative_X_axis |
QRectF | _bounding_box |
std::vector< QPointF > | _cached_transformed_curve |
PlotDataPtr | _plot_data |
unsigned | _subsample |
double | _time_offset |
Transform | _transform |
Definition at line 9 of file timeseries_qwt.h.
Definition at line 37 of file timeseries_qwt.h.
Definition at line 7 of file timeseries_qwt.cpp.
virtual TimeseriesQwt::~TimeseriesQwt | ( | ) | [inline, virtual] |
Definition at line 15 of file timeseries_qwt.h.
QRectF TimeseriesQwt::boundingRect | ( | ) | const [override, virtual] |
Calculate the bounding rect of all samples
The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.
qwtBoundingRect(...) offers slow implementations iterating over the samples. For large sets it is recommended to implement something faster f.e. by caching the bounding rectangle.
Implements QwtSeriesData< QPointF >.
Definition at line 26 of file timeseries_qwt.cpp.
PlotDataPtr TimeseriesQwt::data | ( | ) | [inline] |
Definition at line 23 of file timeseries_qwt.h.
Definition at line 170 of file timeseries_qwt.cpp.
PlotData::RangeValueOpt TimeseriesQwt::getVisualizationRangeY | ( | int | first_index, |
int | last_index | ||
) |
Definition at line 181 of file timeseries_qwt.cpp.
QPointF TimeseriesQwt::sample | ( | size_t | i | ) | const [override, virtual] |
Return a sample
i | Index |
Implements QwtSeriesData< QPointF >.
Definition at line 16 of file timeseries_qwt.cpp.
nonstd::optional< QPointF > TimeseriesQwt::sampleFromTime | ( | double | t | ) |
Definition at line 213 of file timeseries_qwt.cpp.
void TimeseriesQwt::setAlternativeAxisX | ( | PlotDataPtr | new_x_data | ) |
Definition at line 208 of file timeseries_qwt.cpp.
void TimeseriesQwt::setSubsampleFactor | ( | ) |
Definition at line 39 of file timeseries_qwt.cpp.
void TimeseriesQwt::setTimeOffset | ( | double | offset | ) | [slot] |
Definition at line 245 of file timeseries_qwt.cpp.
void TimeseriesQwt::setTransform | ( | TimeseriesQwt::Transform | trans | ) |
Definition at line 236 of file timeseries_qwt.cpp.
size_t TimeseriesQwt::size | ( | ) | const [override, virtual] |
Implements QwtSeriesData< QPointF >.
Definition at line 31 of file timeseries_qwt.cpp.
double TimeseriesQwt::timeOffset | ( | ) | const [inline] |
Definition at line 48 of file timeseries_qwt.h.
Transform TimeseriesQwt::transform | ( | ) | const [inline] |
Definition at line 46 of file timeseries_qwt.h.
void TimeseriesQwt::updateData | ( | ) |
Definition at line 44 of file timeseries_qwt.cpp.
Definition at line 63 of file timeseries_qwt.h.
QRectF TimeseriesQwt::_bounding_box [private] |
Definition at line 65 of file timeseries_qwt.h.
std::vector<QPointF> TimeseriesQwt::_cached_transformed_curve [private] |
Definition at line 57 of file timeseries_qwt.h.
PlotDataPtr TimeseriesQwt::_plot_data [private] |
Definition at line 55 of file timeseries_qwt.h.
unsigned TimeseriesQwt::_subsample [private] |
Definition at line 59 of file timeseries_qwt.h.
double TimeseriesQwt::_time_offset [private] |
Definition at line 67 of file timeseries_qwt.h.
Transform TimeseriesQwt::_transform [private] |
Definition at line 61 of file timeseries_qwt.h.