qsplineseries.h
41 lines
| 928 B
| text/x-c
|
CLexer
|
r295 | #ifndef QSPLINESERIES_H | ||
#define QSPLINESERIES_H | ||||
|
r401 | #include "qchartglobal.h" | ||
#include <QtGlobal> | ||||
|
r295 | #include "qchartseries.h" | ||
|
r401 | #include <QList> | ||
#include <QPointF> | ||||
|
r295 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class QSplineSeries : public QChartSeries | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
|
r305 | |||
QSplineSeries(QObject *parent = 0); | ||||
|
r295 | QChartSeriesType type() const { return QChartSeries::SeriesTypeSpline; } | ||
|
r305 | void addData(QPointF value); | ||
QSplineSeries& operator << (const QPointF &value); | ||||
|
r318 | void calculateControlPoints(); | ||
|
r401 | QList<qreal> getFirstControlPoints(QList<qreal> rhs); | ||
int count() const { return m_data.size(); } | ||||
QPointF at(int index) const { return m_data[index]; } | ||||
QPointF controlPoint(int index) const { return m_controlPoints[index]; } | ||||
|
r305 | |||
|
r295 | signals: | ||
public slots: | ||||
|
r305 | |||
private: | ||||
QList<QPointF> m_data; | ||||
|
r318 | QList<QPointF> m_controlPoints; | ||
|
r295 | |||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QSPLINESERIES_H | ||||