qsplineseries.h
42 lines
| 997 B
| text/x-c
|
CLexer
Marek Rosa
|
r295 | #ifndef QSPLINESERIES_H | ||
#define QSPLINESERIES_H | ||||
Marek Rosa
|
r401 | #include "qchartglobal.h" | ||
#include <QtGlobal> | ||||
Marek Rosa
|
r419 | #include "qlineseries.h" | ||
Marek Rosa
|
r401 | #include <QList> | ||
#include <QPointF> | ||||
Marek Rosa
|
r295 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Marek Rosa
|
r419 | class QSplineSeries : public QLineSeries | ||
Marek Rosa
|
r295 | { | ||
Q_OBJECT | ||||
public: | ||||
Marek Rosa
|
r305 | |||
QSplineSeries(QObject *parent = 0); | ||||
Marek Rosa
|
r419 | QSeriesType type() const { return QSeries::SeriesTypeSpline; } | ||
Marek Rosa
|
r401 | |||
Marek Rosa
|
r433 | // int count() const { return m_x.size(); } | ||
Marek Rosa
|
r401 | QPointF controlPoint(int index) const { return m_controlPoints[index]; } | ||
Marek Rosa
|
r305 | |||
Marek Rosa
|
r434 | // TODO: allow the user to set custom control points | ||
// void setCustomControlPoints(QList<QPointsF> controlPoints); | ||||
// bool calculateControlPointsAutomatically(); | ||||
// void setCalculateControlPointsAutomatically(); | ||||
Marek Rosa
|
r431 | private: | ||
void calculateControlPoints(); | ||||
QList<qreal> getFirstControlPoints(QList<qreal> rhs); | ||||
private slots: | ||||
void updateControlPoints(); | ||||
Marek Rosa
|
r305 | |||
private: | ||||
Marek Rosa
|
r318 | QList<QPointF> m_controlPoints; | ||
Marek Rosa
|
r295 | |||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QSPLINESERIES_H | ||||