diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-01-16 16:41:41 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-01-17 15:32:30 +0000 |
commit | b9a2ce7bfb202bc93d3ceb651b8ca95ec4942ace (patch) | |
tree | 3ba84d0dc77c5375b96fc829f19ea01b04bd25ec | |
parent | 502565d6cd89d5c999c16e6f93693d5f5fbdfd5b (diff) |
Doc: Edit spline series class and type docs
Change-Id: I9ac5adeef2644da66af7961028a81aeb4cccef09
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/charts/splinechart/qsplineseries.cpp | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/src/charts/splinechart/qsplineseries.cpp b/src/charts/splinechart/qsplineseries.cpp index 02039224..3c3e167b 100644 --- a/src/charts/splinechart/qsplineseries.cpp +++ b/src/charts/splinechart/qsplineseries.cpp @@ -38,14 +38,16 @@ /*! \class QSplineSeries \inmodule Qt Charts - \brief Series type used to store data needed to draw a spline. + \brief The QSplineSeries class presents data as spline charts. - 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. + A spline series stores the data points and the segment control points needed + by QPainterPath to draw a spline. The control points are automatically + calculated when the data changes. The algorithm computes the points so that + the normal spline can be drawn. \image examples_splinechart.png - Creating basic spline chart is simple: + The following code snippet illustrates how to create a basic spline chart: \code QSplineSeries* series = new QSplineSeries(); series->append(0, 6); @@ -61,44 +63,50 @@ \inherits XYSeries - \brief The SplineSeries type is used for making spline charts. + \brief Presents data as spline charts. + + A spline series stores the data points and the segment control points needed + by QPainterPath to draw a spline. The control points are automatically + calculated when the data changes. The algorithm computes the points so that + the normal spline can be drawn. - The following QML shows how to create a simple spline chart: - \snippet qmlchart/qml/qmlchart/View3.qml 1 - \beginfloatleft \image examples_qmlchart3.png - \endfloat - \clearfloat -*/ -/*! - \fn QSeriesType QSplineSeries::type() const - Returns the type of the series + The following QML code shows how to create a simple spline chart: + \snippet qmlchart/qml/qmlchart/View3.qml 1 */ /*! \qmlproperty real SplineSeries::width - The width of the line. By default the width is 2.0. + The width of the line. By default, the width is 2.0. */ /*! \qmlproperty Qt::PenStyle SplineSeries::style - Controls the style of the line. Set to one of Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, - Qt.DashDotLine or Qt.DashDotDotLine. Using Qt.CustomDashLine is not supported in the QML API. - By default the style is Qt.SolidLine. + Controls the style of the line. Set to one of \l{Qt::NoPen}{Qt.NoPen}, + \l{Qt::SolidLine}{Qt.SolidLine}, \l{Qt::DashLine}{Qt.DashLine}, \l{Qt::DotLine}{Qt.DotLine}, + \l{Qt::DashDotLine}{Qt.DashDotLine}, or \l{Qt::DashDotDotLine}{Qt.DashDotDotLine}. + Using \l{Qt::CustomDashLine}{Qt.CustomDashLine} is not supported in the QML API. + By default, the style is Qt.SolidLine. + + \sa Qt::PenStyle */ /*! \qmlproperty Qt::PenCapStyle SplineSeries::capStyle - Controls the cap style of the line. Set to one of Qt.FlatCap, Qt.SquareCap or Qt.RoundCap. By - default the cap style is Qt.SquareCap. + Controls the cap style of the line. Set to one of \l{Qt::FlatCap}{Qt.FlatCap}, + \l{Qt::SquareCap}{Qt.SquareCap} or \l{Qt::RoundCap}{Qt.RoundCap}. By + default, the cap style is Qt.SquareCap. + + \sa Qt::PenCapStyle */ QT_CHARTS_BEGIN_NAMESPACE /*! - Constructs empty series object which is a child of \a parent. - When series object is added to a QChart instance then the ownerships is transferred. + Constructs an empty series object that is a child of \a parent. + When the series object is added to a QChart instance, the ownerships is + transferred. */ QSplineSeries::QSplineSeries(QObject *parent) @@ -107,7 +115,7 @@ QSplineSeries::QSplineSeries(QObject *parent) } /*! - Destroys the object. + Deletes the spline series. */ QSplineSeries::~QSplineSeries() { @@ -116,6 +124,9 @@ QSplineSeries::~QSplineSeries() d->m_chart->removeSeries(this); } +/*! + \reimp +*/ QAbstractSeries::SeriesType QSplineSeries::type() const { return QAbstractSeries::SeriesTypeSpline; |