qsplineseries.h
46 lines
| 1.1 KiB
| text/x-c
|
CLexer
Marek Rosa
|
r295 | #ifndef QSPLINESERIES_H | ||
#define QSPLINESERIES_H | ||||
Marek Rosa
|
r401 | #include "qchartglobal.h" | ||
#include <QtGlobal> | ||||
Michal Klocek
|
r470 | #include "qlineseries.h" | ||
Marek Rosa
|
r401 | #include <QList> | ||
#include <QPointF> | ||||
Marek Rosa
|
r295 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Michal Klocek
|
r470 | class QTCOMMERCIALCHART_EXPORT QSplineSeries : public QLineSeries | ||
Marek Rosa
|
r295 | { | ||
Q_OBJECT | ||||
Michal Klocek
|
r467 | public: | ||
Marek Rosa
|
r305 | |||
QSplineSeries(QObject *parent = 0); | ||||
Michal Klocek
|
r467 | QSeriesType type() const {return QSeries::SeriesTypeSpline;} | ||
Marek Rosa
|
r401 | |||
Marek Rosa
|
r433 | // int count() const { return m_x.size(); } | ||
Michal Klocek
|
r467 | QPointF controlPoint(int index) const {return m_controlPoints[index];} | ||
Marek Rosa
|
r519 | bool setModel(QAbstractItemModel* model); | ||
Marek Rosa
|
r305 | |||
Marek Rosa
|
r527 | void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); | ||
Marek Rosa
|
r434 | // TODO: allow the user to set custom control points | ||
// void setCustomControlPoints(QList<QPointsF> controlPoints); | ||||
// bool calculateControlPointsAutomatically(); | ||||
// void setCalculateControlPointsAutomatically(); | ||||
Michal Klocek
|
r467 | |||
private: | ||||
Marek Rosa
|
r431 | void calculateControlPoints(); | ||
QList<qreal> getFirstControlPoints(QList<qreal> rhs); | ||||
Michal Klocek
|
r467 | private slots: | ||
Marek Rosa
|
r431 | void updateControlPoints(); | ||
Marek Rosa
|
r305 | |||
Michal Klocek
|
r467 | private: | ||
Marek Rosa
|
r318 | QList<QPointF> m_controlPoints; | ||
Michal Klocek
|
r467 | |||
Marek Rosa
|
r295 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QSPLINESERIES_H | ||||