diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index 1f3d459..6a7a14d 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -25,6 +25,7 @@
QPieSlice
QScatterSeries
QSeries
+ QSplineSeries
QStackedBarSeries
diff --git a/src/splinechart/qsplineseries.cpp b/src/splinechart/qsplineseries.cpp
index 2a97231..5c7bfa2 100644
--- a/src/splinechart/qsplineseries.cpp
+++ b/src/splinechart/qsplineseries.cpp
@@ -1,7 +1,30 @@
#include "qsplineseries.h"
+/*!
+ \class QSplineSeries
+ \brief Series type used to store data needed to draw a spline.
+
+ QSplineSeries stores the data points along with the segment control points needed by QPainterPath to draw spline
+ Control points are automatically calculated when data changes. The algorithm computes the points so that the normal spline can be drawn.
+*/
+
+/*!
+ \fn QSeriesType QSplineSeries::type() const
+ Returns the type of the series
+ */
+
+/*!
+ \fn QSeriesType QSplineSeries::controlPoint(int index) const
+ Returns the control point specified by \a index
+ */
+
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+/*!
+ Constructs empty series object which is a child of \a parent.
+ When series object is added to QChartView or QChart instance then the ownerships is transfered.
+ */
+
QSplineSeries::QSplineSeries(QObject *parent) :
QLineSeries(parent)
{
@@ -10,11 +33,15 @@ QSplineSeries::QSplineSeries(QObject *parent) :
connect(this,SIGNAL(pointReplaced(int)), this, SLOT(updateControlPoints()));
}
+/*!
+ \internal
+ Calculates control points which are needed by QPainterPath.cubicTo function to draw the cubic Bezier cureve between two points.
+ */
void QSplineSeries::calculateControlPoints()
{
// Based on http://www.codeproject.com/Articles/31859/Draw-a-Smooth-Curve-through-a-Set-of-2D-Points-wit
- // CPOL Licence
+ // CPOL License
int n = m_x.size() - 1;
if (n == 1)
@@ -74,6 +101,9 @@ void QSplineSeries::calculateControlPoints()
}
}
+/*!
+ \internal
+ */
QList QSplineSeries::getFirstControlPoints(QList rhs)
{
QList x; // Solution vector.
@@ -94,6 +124,10 @@ QList QSplineSeries::getFirstControlPoints(QList rhs)
return x;
}
+/*!
+ \internal
+ Updates the control points, besed on currently avaiable knots.
+ */
void QSplineSeries::updateControlPoints()
{
if(m_x.size() > 1)
diff --git a/src/splinechart/qsplineseries.h b/src/splinechart/qsplineseries.h
index b945f00..89218f6 100644
--- a/src/splinechart/qsplineseries.h
+++ b/src/splinechart/qsplineseries.h
@@ -17,7 +17,7 @@ class QSplineSeries : public QLineSeries
QSplineSeries(QObject *parent = 0);
QSeriesType type() const { return QSeries::SeriesTypeSpline; }
- int count() const { return m_x.size(); }
+// int count() const { return m_x.size(); }
QPointF controlPoint(int index) const { return m_controlPoints[index]; }
private: