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