CFEL - ASG Software Suite  2.5.0
CASS
curve_plot.h
Go to the documentation of this file.
1 // Copyright (C) 2014 Lutz Foucar
2 
3 /**
4  * @file curve_plot.h contains an alternative curve plot
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _CURVEPLOT_
10 #define _CURVEPLOT_
11 
12 #include <qwt_plot_curve.h>
13 
14 class Qstring;
15 
16 namespace jocassview
17 {
18 /** an alternative curve plot
19  *
20  * is an qwt plot curve but evaluates whether the point to be drawn is invalid
21  * if so it just skips these parts of the curve.
22  *
23  * @author Stephan Kassemeyer
24  * @author Lutz Foucar
25  */
26 class PlotCurve : public QwtPlotCurve
27 {
28 public:
29  /** default constructor */
30  PlotCurve();
31 
32  /** constructor
33  *
34  * @param title The title of the curve
35  */
36  PlotCurve(const QString &title);
37 
38  /** draw the curve
39  *
40  * uses the base class draw, but only for areas hat have valid values
41  *
42  * @param painter
43  * @param xMap
44  * @param yMap
45  * @param canvasRect
46  * @param from
47  * @param to
48  */
49  void drawSeries(QPainter *painter,
50  const QwtScaleMap &xMap, const QwtScaleMap &yMap,
51  const QRectF &canvasRect, int from, int to) const;
52 };
53 
54 }//end namespace jocassview
55 #endif
void drawSeries(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
draw the curve
Definition: curve_plot.cpp:48
PlotCurve()
default constructor
Definition: curve_plot.cpp:19
an alternative curve plot
Definition: curve_plot.h:26