QXRD  0.11.16
qwt_plot_piecewise_curve.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_PIECEWISE_CURVE_H
11 #define QWT_PLOT_PIECEWISE_CURVE_H
12 
13 #include "qwt_plot_curve.h"
14 
15 #include "qcepplot-ptr.h"
16 
23 class QWT_EXPORT QwtPlotPiecewiseCurve: public QwtPlotCurve
24 {
25 public:
26  explicit QwtPlotPiecewiseCurve();
27  explicit QwtPlotPiecewiseCurve(QcepPlot *plot, const QwtText &title);
28  explicit QwtPlotPiecewiseCurve(QcepPlot *plot, const QString &title);
29 
30  virtual QRectF boundingRect() const;
31 
32  virtual void drawSeries(QPainter *p,
33  const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect,
34  int from, int to) const;
35 
36 private:
37  static bool isNaN(double x);
38  bool ignorePoint(double x, double y) const;
39  double x(int n) const;
40  double y(int n) const;
42 };
43 
44 #endif
A class which draws piecewise curves.