point_series_xy.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 
7 #ifndef POINT_SERIES_H
8 #define POINT_SERIES_H
9 
10 #include "timeseries_qwt.h"
11 
13 {
14 public:
15  PointSeriesXY(const PlotData* x_axis, const PlotData* y_axis);
16 
17  virtual QPointF sample(size_t i) const override
18  {
19  const auto& p = _cached_curve.at(i);
20  return QPointF(p.x, p.y);
21  }
22 
23  size_t size() const override;
24 
25  std::optional<QPointF> sampleFromTime(double t) override;
26 
27  RangeOpt getVisualizationRangeY(Range range_X) override;
28 
29  void updateCache(bool reset_old_data) override;
30 
32 
33  const PlotData* dataX() const
34  {
35  return _x_axis;
36  }
37  const PlotData* dataY() const
38  {
39  return _y_axis;
40  }
41 
42  const PlotDataXY* plotData() const override
43  {
44  return &_cached_curve;
45  }
46 
47 protected:
48  const PlotData* _x_axis;
49  const PlotData* _y_axis;
51 };
52 
53 #endif // POINT_SERIES_H
PointSeriesXY(const PlotData *x_axis, const PlotData *y_axis)
RangeOpt getVisualizationRangeX() override
PlotDataXY _cached_curve
size_t size() const override
std::optional< Range > RangeOpt
Definition: plotdatabase.h:35
const PlotDataXY * plotData() const override
const PlotData * _y_axis
void updateCache(bool reset_old_data) override
const PlotData * dataX() const
virtual QPointF sample(size_t i) const override
const PlotData * dataY() const
const Point & at(size_t index) const
Definition: plotdatabase.h:192
const PlotData * _x_axis
std::optional< QPointF > sampleFromTime(double t) override
RangeOpt getVisualizationRangeY(Range range_X) override


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38