Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_spline.h
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_SPLINE_H
11 #define QWT_SPLINE_H
12
13 #include "qwt_global.h"
14 #include <qpolygon.h>
15 #include <qvector.h>
16
57 class QWT_EXPORT QwtSpline
58 {
59 public:
61 enum SplineType
62 {
64 Natural,
65
67 Periodic
68 };
69
70 QwtSpline();
71 QwtSpline( const QwtSpline & );
72
73 ~QwtSpline();
74
75 QwtSpline &operator=( const QwtSpline & );
76
77 void setSplineType( SplineType );
78 SplineType splineType() const;
79
80 bool setPoints( const QPolygonF& points );
81 QPolygonF points() const;
82
83 void reset();
84
85 bool isValid() const;
86 double value( double x ) const;
87
88 const QVector<double> &coefficientsA() const;
89 const QVector<double> &coefficientsB() const;
90 const QVector<double> &coefficientsC() const;
91
92 protected:
93 bool buildNaturalSpline( const QPolygonF & );
94 bool buildPeriodicSpline( const QPolygonF & );
95
96 private:
97 class PrivateData;
98 PrivateData *d_data;
99 };
100
101 #endif