OpenCurves  0.9
plotdatacurve.h
1 //
2 // author Kazys Stepanas
3 //
4 // Copyright (c) CSIRO 2015
5 //
6 #ifndef PLOTDATACURVE_H_
7 #define PLOTDATACURVE_H_
8 
9 #include "ocurvesconfig.h"
10 
11 #include <qwt_plot_curve.h>
12 
13 #include "qwtrttiext.h"
14 
15 class PlotInstance;
16 
22 class PlotDataCurve : public QwtPlotCurve
23 {
24 public:
25  enum
26  {
29  };
30 
32  explicit PlotDataCurve(PlotInstance &curve);
33 
36  int rtti() const override;
37 
41  inline void invalidate() { dataChanged(); }
42 
45  inline PlotInstance &curve() { return *_curve; }
46 
49  inline const PlotInstance &curve() const { return *_curve; }
50 
51 private:
52  PlotInstance *_curve;
53 };
54 
55 
56 #endif // PLOTDATACURVE_H_
The id for rtti() identifying a PlotDataCurve class.
Definition: plotdatacurve.h:28
PlotDataCurve(PlotInstance &curve)
Constructor.
int rtti() const override
Returns the Rtti value for this object.
const PlotInstance & curve() const
Access the data being visualised.
Definition: plotdatacurve.h:49
Holds data for a single curve.
Definition: plotinstance.h:43
PlotDataCurve type.
Definition: qwtrttiext.h:16
void invalidate()
Invalidate this curve visualiser, requesting a replot.
Definition: plotdatacurve.h:41
A specialisation of QwtPlotCurve used to visualisation PlotInstanceData.
Definition: plotdatacurve.h:22
PlotInstance & curve()
Access the data being visualised.
Definition: plotdatacurve.h:45