point_series_xy.h
Go to the documentation of this file.
00001 #ifndef POINT_SERIES_H
00002 #define POINT_SERIES_H
00003 
00004 #include "series_data.h"
00005 
00006 class PointSeriesXY: public DataSeriesBase
00007 {
00008 public:
00009     PointSeriesXY(const PlotData* y_axis, const PlotData* x_axis);
00010 
00011     virtual QPointF sample( size_t i ) const override
00012     {
00013         const auto& p = _cached_curve.at(i);
00014         return QPointF(p.x, p.y);
00015     }
00016 
00017     QRectF boundingRect() const override
00018     {
00019         return _bounding_box;
00020     }
00021 
00022     PlotData::RangeTimeOpt getVisualizationRangeX() override;
00023 
00024     nonstd::optional<QPointF> sampleFromTime(double t) override;
00025 
00026     PlotData::RangeValueOpt getVisualizationRangeY(PlotData::RangeTime range_X) override;
00027 
00028     bool updateCache() override;
00029 
00030 protected:
00031 
00032     const PlotData *_x_axis;
00033     const PlotData *_y_axis;
00034     PlotData _cached_curve;
00035 };
00036 
00037 #endif // POINT_SERIES_H


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:04