summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-24 13:53:34 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-24 13:53:34 +0100
commite0ba5ac91dbb1fe3611118239c00ea8d748e5678 (patch)
tree6af4ef967b16505dac93557b918b94fcb77c7535
parent1fea2116072f96a86daec092e54fe658651a4034 (diff)
parent7a66c005af12918bde79665659eee3c49f30b650 (diff)
Merge remote-tracking branch 'origin/5.8' into devv5.9.0-alpha1
Conflicts: .qmake.conf src/charts/barchart/qbarset.cpp Change-Id: Id57f9d6ac8cdf996a6bc77780e4a3ee97cae66d6
-rw-r--r--src/charts/areachart/qareaseries.cpp121
-rw-r--r--src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp17
-rw-r--r--src/charts/axis/datetimeaxis/qdatetimeaxis.cpp17
-rw-r--r--src/charts/axis/logvalueaxis/qlogvalueaxis.cpp16
-rw-r--r--src/charts/axis/qabstractaxis.cpp67
-rw-r--r--src/charts/axis/valueaxis/qvalueaxis.cpp35
-rw-r--r--src/charts/barchart/qabstractbarseries.cpp63
-rw-r--r--src/charts/barchart/qbarset.cpp53
-rw-r--r--src/charts/boxplotchart/qboxplotmodelmapper.cpp11
-rw-r--r--src/charts/boxplotchart/qhboxplotmodelmapper.cpp124
-rw-r--r--src/charts/boxplotchart/qvboxplotmodelmapper.cpp125
-rw-r--r--src/charts/candlestickchart/qcandlestickseries.cpp360
-rw-r--r--src/charts/candlestickchart/qcandlestickset.cpp150
-rw-r--r--src/charts/candlestickchart/qhcandlestickmodelmapper.cpp133
-rw-r--r--src/charts/candlestickchart/qvcandlestickmodelmapper.cpp137
-rw-r--r--src/charts/legend/qarealegendmarker.cpp11
-rw-r--r--src/charts/legend/qbarlegendmarker.cpp13
-rw-r--r--src/charts/legend/qboxplotlegendmarker.cpp10
-rw-r--r--src/charts/legend/qcandlesticklegendmarker.cpp21
-rw-r--r--src/charts/legend/qlegend.cpp134
-rw-r--r--src/charts/legend/qlegendmarker.cpp77
-rw-r--r--src/charts/legend/qpielegendmarker.cpp13
-rw-r--r--src/charts/legend/qxylegendmarker.cpp11
-rw-r--r--src/charts/linechart/qlineseries.cpp46
-rw-r--r--src/charts/piechart/qhpiemodelmapper.cpp97
-rw-r--r--src/charts/piechart/qpieseries.cpp310
-rw-r--r--src/charts/piechart/qpieslice.cpp331
-rw-r--r--src/charts/piechart/qvpiemodelmapper.cpp98
-rw-r--r--src/charts/qabstractseries.cpp17
-rw-r--r--src/charts/qchart.cpp204
-rw-r--r--src/charts/qchartview.cpp60
-rw-r--r--src/charts/qpolarchart.cpp62
-rw-r--r--src/charts/scatterchart/qscatterseries.cpp126
-rw-r--r--src/charts/splinechart/qsplineseries.cpp57
-rw-r--r--src/charts/xychart/qhxymodelmapper.cpp103
-rw-r--r--src/charts/xychart/qvxymodelmapper.cpp100
-rw-r--r--src/charts/xychart/qxyseries.cpp368
-rw-r--r--src/charts/xychart/xychart.cpp3
-rw-r--r--src/chartsqml2/declarativeboxplotseries.cpp142
-rw-r--r--src/chartsqml2/declarativecategoryaxis.cpp17
-rw-r--r--src/chartsqml2/declarativechart.cpp241
-rw-r--r--src/chartsqml2/declarativemargins.cpp8
-rw-r--r--src/chartsqml2/declarativepolarchart.cpp40
-rw-r--r--src/chartsqml2/declarativexypoint.cpp10
44 files changed, 2334 insertions, 1825 deletions
diff --git a/src/charts/areachart/qareaseries.cpp b/src/charts/areachart/qareaseries.cpp
index c1e5bac6..764579f2 100644
--- a/src/charts/areachart/qareaseries.cpp
+++ b/src/charts/areachart/qareaseries.cpp
@@ -70,18 +70,71 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief Presents data in area charts.
+ An area series is used to show quantitative data. It is based on a line
+ series, in the way that the area between the boundary lines is emphasized
+ with color. The LineSeries type defines the \e upper boundary of the
+ area. The area chart is drawn using the bottom of the plot area as the
+ \e lower boundary by default. Instead of the bottom of the plot area, the
+ lower boundary can be specified by another line. In that case, the
+ AreaSeries should use two LineSeries types.
+
+ \note The terms \e upper and \e lower boundary can be misleading in cases
+ where the value of the lower boundary is greater than that of the upper
+ boundary. The main point is that the area between these two boundary lines
+ will be filled.
+
+ \image examples_qmlchart4.png
+
The following QML shows how to create a simple area chart:
\snippet qmlchart/qml/qmlchart/View4.qml 1
- \beginfloatleft
- \image examples_qmlchart4.png
- \endfloat
- \clearfloat
\note Adding the same line series to a chart and area series is not supported. The series used as
boundary lines should be defined only for the area series.
*/
/*!
+ \qmlproperty AbstractAxis AreaSeries::axisX
+ The x-axis used for the series. If you leave both axisX and axisXTop
+ undefined, a value axis is created for the series.
+ \sa axisXTop, ValueAxis
+*/
+
+/*!
+ \qmlproperty AbstractAxis AreaSeries::axisY
+ The y-axis used for the series. If you leave both axisY and axisYRight
+ undefined, a value axis is created for the series.
+ \sa axisYRight, ValueAxis
+*/
+
+/*!
+ \qmlproperty AbstractAxis AreaSeries::axisXTop
+ The x-axis used for the series, drawn on top of the chart view.
+
+ \note You can only provide either axisX or axisXTop, not both.
+ \sa axisX
+*/
+
+/*!
+ \qmlproperty AbstractAxis AreaSeries::axisYRight
+ The y-axis used for the series, drawn to the right on the chart view.
+
+ \note You can only provide either axisY or axisYRight, not both.
+ \sa axisY
+*/
+
+/*!
+ \qmlproperty AbstractAxis AreaSeries::axisAngular
+ The angular axis used for the series, drawn around the polar chart view.
+ \sa axisX, PolarChartView
+*/
+
+/*!
+ \qmlproperty AbstractAxis AreaSeries::axisRadial
+ The radial axis used for the series, drawn inside the polar chart view.
+ \sa axisY, PolarChartView
+*/
+
+/*!
\property QAreaSeries::upperSeries
\brief The upper one of the two line series used to define area series boundaries.
*/
@@ -151,19 +204,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::colorChanged(QColor color)
\brief This signal is emitted when the fill (brush) color changes to \a color.
*/
-/*!
- \qmlsignal AreaSeries::onColorChanged(color color)
- This signal is emitted when the fill (brush) color changes to \a color.
-*/
/*!
\fn void QAreaSeries::borderColorChanged(QColor color)
\brief This signal is emitted when the line (pen) color changes to \a color.
*/
-/*!
- \qmlsignal AreaSeries::onBorderColorChanged(color color)
- This signal is emitted when the line (pen) color changes to \a color.
-*/
/*!
\fn void QAreaSeries::clicked(const QPointF& point)
@@ -172,10 +217,13 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa pressed, released, doubleClicked
*/
/*!
- \qmlsignal AreaSeries::onClicked(QPointF point)
+ \qmlsignal AreaSeries::clicked(point point)
This signal is emitted when the user triggers a press on \a point by clicking it in an
area chart.
- \sa onPressed, onReleased, onDoubleClicked
+
+ The corresponding signal handler is \c {onClicked}.
+
+ \sa pressed, released, doubleClicked
*/
/*!
@@ -185,10 +233,12 @@ QT_CHARTS_BEGIN_NAMESPACE
the cursor hovers over the series and turns \e false when it moves away from the series.
*/
/*!
- \qmlsignal AreaSeries::onHovered(point point, bool state)
+ \qmlsignal AreaSeries::hovered(point point, bool state)
This signal is emitted when the user hovers the mouse cursor over a series or moves it away from
the series. \a point shows the origin (coordinate) of the hover event. \a state is \c true when
the cursor hovers over the series and turns \e false when it moves away from the series.
+
+ The corresponding signal handler is \c {onHovered}.
*/
/*!
@@ -198,9 +248,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa clicked, released, doubleClicked
*/
/*!
- \qmlsignal AreaSeries::onPressed(QPointF point)
+ \qmlsignal AreaSeries::pressed(point point)
This signal is emitted when the user presses the point specified by \a point in an area chart.
- \sa onClicked, onReleased, onDoubleClicked
+
+ The corresponding signal handler is \c {onPressed}.
+
+ \sa clicked, released, doubleClicked
*/
/*!
@@ -210,10 +263,13 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa pressed, clicked, doubleClicked
*/
/*!
- \qmlsignal AreaSeries::onReleased(QPointF point)
+ \qmlsignal AreaSeries::released(point point)
This signal is emitted when the user releases a press that was triggered on
\a point in an area chart.
- \sa onPressed, onClicked, onDoubleClicked
+
+ The corresponding signal handler is \c {onReleased}.
+
+ \sa pressed, clicked, doubleClicked
*/
/*!
@@ -223,10 +279,13 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa pressed, released, clicked
*/
/*!
- \qmlsignal AreaSeries::onDoubleClicked(QPointF point)
+ \qmlsignal AreaSeries::doubleClicked(point point)
This signal is emitted when the user triggers the first press in an area chart
by doubleclicking \a point.
- \sa onPressed, onReleased, onClicked
+
+ The corresponding signal handler is \c {onDoubleClicked}.
+
+ \sa pressed, released, clicked
*/
/*!
@@ -273,10 +332,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::pointLabelsFormatChanged(const QString &format)
This signal is emitted when the \a format of data point labels is changed.
*/
-/*!
- \qmlsignal AreaSeries::onPointLabelsFormatChanged(string format)
- This signal is emitted when the \a format of data point labels is changed.
-*/
/*!
\property QAreaSeries::pointLabelsVisible
@@ -294,10 +349,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::pointLabelsVisibilityChanged(bool visible)
This signal is emitted when the visibility of the data point labels changes to \a visible.
*/
-/*!
- \qmlsignal AreaSeries::onPointLabelsVisibilityChanged(bool visible)
- This signal is emitted when the visibility of the data point labels changes to \a visible.
-*/
/*!
\property QAreaSeries::pointLabelsFont
@@ -315,10 +366,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::pointLabelsFontChanged(const QFont &font);
This signal is emitted when the font used for data point labels changes to \a font.
*/
-/*!
- \qmlsignal AreaSeries::onPointLabelsFontChanged(Font font)
- This signal is emitted when the font used for data point labels changes to \a font.
-*/
/*!
\property QAreaSeries::pointLabelsColor
@@ -338,10 +385,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::pointLabelsColorChanged(const QColor &color);
This signal is emitted when the color used for data point labels changes to \a color.
*/
-/*!
- \qmlsignal AreaSeries::onPointLabelsColorChanged(Color color)
- This signal is emitted when the color used for data point labels changes to \a color.
-*/
/*!
\property QAreaSeries::pointLabelsClipping
@@ -361,10 +404,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAreaSeries::pointLabelsClippingChanged(bool clipping)
This signal is emitted when the clipping of the data point labels changes to \a clipping.
*/
-/*!
- \qmlsignal AreaSeries::onPointLabelsClippingChanged(bool clipping)
- This signal is emitted when the clipping of the data point labels changes to \a clipping.
-*/
/*!
Constructs an area series object that will be spanned between an \a upperSeries line and a
diff --git a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
index 1c5ec1a8..efa02c15 100644
--- a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
+++ b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
@@ -131,32 +131,27 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QBarCategoryAxis::minChanged(const QString &min)
This signal is emitted when the \a min value of the axis changes.
*/
-/*!
- \qmlsignal BarCategoryAxis::onMinChanged(const QString &min)
- This signal is emitted when the \a min value of the axis changes.
-*/
/*!
\fn void QBarCategoryAxis::maxChanged(const QString &max)
This signal is emitted when the \a max value of the axis changes.
*/
-/*!
- \qmlsignal BarCategoryAxis::onMaxChanged(const QString &max)
- This signal is emitted when the \a max of the axis changes.
-*/
/*!
\fn void QBarCategoryAxis::countChanged()
This signal is emitted when the number of categories of an axis changes.
*/
+
/*!
- \qmlsignal BarCategoryAxis::onCountChanged()
- This signal is emitted when the number of categories of an axis changes.
+ \fn void QBarCategoryAxis::rangeChanged(const QString &min, const QString &max)
+ This signal is emitted when \a min or \a max value of the axis changes.
*/
/*!
- \fn void QBarCategoryAxis::rangeChanged(const QString &min, const QString &max)
+ \qmlsignal BarCategoryAxis::rangeChanged(string min, string max)
This signal is emitted when \a min or \a max value of the axis changes.
+
+ The corresponding signal handler is \c onRangeChanged.
*/
/*!
diff --git a/src/charts/axis/datetimeaxis/qdatetimeaxis.cpp b/src/charts/axis/datetimeaxis/qdatetimeaxis.cpp
index 47aa485a..03ffccb2 100644
--- a/src/charts/axis/datetimeaxis/qdatetimeaxis.cpp
+++ b/src/charts/axis/datetimeaxis/qdatetimeaxis.cpp
@@ -132,19 +132,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QDateTimeAxis::minChanged(QDateTime min)
This signal is emitted when the minimum value of the axis, specified by \a min, changes.
*/
-/*!
- \qmlsignal DateTimeAxis::onMinChanged(datetime min)
- This signal is emitted when the minimum value of the axis, specified by \a min, changes.
-*/
/*!
\fn void QDateTimeAxis::maxChanged(QDateTime max)
This signal is emitted when the maximum value of the axis, specified by \a max, changes.
*/
-/*!
- \qmlsignal DateTimeAxis::onMaxChanged(datetime max)
- This signal is emitted when the maximum value of the axis, specified by \a max, changes.
-*/
/*!
\fn void QDateTimeAxis::rangeChanged(QDateTime min, QDateTime max)
@@ -182,20 +174,11 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when the number of tick marks on the axis, specified by \a tickCount,
changes.
*/
-/*!
- \qmlsignal DateTimeAxis::tickCountChanged(int tickCount)
- This signal is emitted when the number of tick marks on the axis, specified by \a tickCount,
- changes.
-*/
/*!
\fn void QDateTimeAxis::formatChanged(QString format)
This signal is emitted when the \a format of the axis changes.
*/
-/*!
- \qmlsignal DateTimeAxis::onFormatChanged(string format)
- This signal is emitted when the \a format of the axis changes.
-*/
/*!
Constructs an axis object that is a child of \a parent.
diff --git a/src/charts/axis/logvalueaxis/qlogvalueaxis.cpp b/src/charts/axis/logvalueaxis/qlogvalueaxis.cpp
index ee1cedfc..8efe1139 100644
--- a/src/charts/axis/logvalueaxis/qlogvalueaxis.cpp
+++ b/src/charts/axis/logvalueaxis/qlogvalueaxis.cpp
@@ -171,19 +171,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QLogValueAxis::minChanged(qreal min)
This signal is emitted when the minimum value of the axis, specified by \a min, changes.
*/
-/*!
- \qmlsignal LogValueAxis::onMinChanged(qreal min)
- This signal is emitted when the minimum value of the axis, specified by \a min, changes.
-*/
/*!
\fn void QLogValueAxis::maxChanged(qreal max)
This signal is emitted when the maximum value of the axis, specified by \a max, changes.
*/
-/*!
- \qmlsignal LogValueAxis::onMaxChanged(qreal max)
- This signal is emitted when the maximum value of the axis, specified by \a max, changes.
-*/
/*!
\fn void QLogValueAxis::rangeChanged(qreal min, qreal max)
@@ -217,19 +209,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QLogValueAxis::labelFormatChanged(const QString &format)
This signal is emitted when the \a format of axis labels changes.
*/
-/*!
- \qmlsignal LogValueAxis::labelFormatChanged(const QString &format)
- This signal is emitted when the \a format of axis labels changes.
-*/
/*!
\fn void QLogValueAxis::baseChanged(qreal base)
This signal is emitted when the \a base of the logarithm of the axis changes.
*/
-/*!
- \qmlsignal LogValueAxis::baseChanged(qreal base)
- This signal is emitted when the \a base of the logarithm of the axis changes.
-*/
/*!
Constructs an axis object that is a child of \a parent.
diff --git a/src/charts/axis/qabstractaxis.cpp b/src/charts/axis/qabstractaxis.cpp
index 05f0dc4b..a4065570 100644
--- a/src/charts/axis/qabstractaxis.cpp
+++ b/src/charts/axis/qabstractaxis.cpp
@@ -176,7 +176,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty Font AbstractAxis::labelsFont
+ \qmlproperty font AbstractAxis::labelsFont
The font of the axis labels.
For more information, see \l [QML]{font}.
@@ -255,7 +255,7 @@ QT_CHARTS_BEGIN_NAMESPACE
Empty by default. Axis titles support HTML formatting.
*/
/*!
- \qmlproperty String AbstractAxis::titleText
+ \qmlproperty string AbstractAxis::titleText
The title of the axis. Empty by default. Axis titles support HTML formatting.
*/
@@ -271,7 +271,7 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief The font of the title of the axis.
*/
/*!
- \qmlproperty Font AbstractAxis::titleFont
+ \qmlproperty font AbstractAxis::titleFont
The font of the title of the axis.
*/
@@ -323,10 +323,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractAxis::visibleChanged(bool visible)
This signal is emitted when the visibility of the axis changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onVisibleChanged(bool visible)
- This signal is emitted when the visibility of the axis changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::linePenChanged(const QPen& pen)
@@ -337,28 +333,16 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractAxis::lineVisibleChanged(bool visible)
This signal is emitted when the visibility of the axis line changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onLineVisibleChanged(bool visible)
- This signal is emitted when the visibility of the axis line changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::labelsVisibleChanged(bool visible)
This signal is emitted when the visibility of the labels of the axis changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onLabelsVisibleChanged(bool visible)
- This signal is emitted when the visibility of the labels of the axis changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::labelsFontChanged(const QFont& font)
This signal is emitted when the font of the axis labels changes to \a font.
*/
-/*!
- \qmlsignal AbstractAxis::onLabelsFontChanged(Font font)
- This signal is emitted when the font of the axis labels changes to \a font.
-*/
/*!
\fn void QAbstractAxis::labelsBrushChanged(const QBrush& brush)
@@ -369,30 +353,17 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractAxis::labelsAngleChanged(int angle)
This signal is emitted when the angle of the axis labels changes to \a angle.
*/
-/*!
- \qmlsignal AbstractAxis::onLabelsAngleChanged(int angle)
- This signal is emitted when the angle of the axis labels changes to \a angle.
-*/
/*!
\fn void QAbstractAxis::gridVisibleChanged(bool visible)
This signal is emitted when the visibility of the grid lines of the axis changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onGridVisibleChanged(bool visible)
- This signal is emitted when the visibility of the grid lines of the axis changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::minorGridVisibleChanged(bool visible)
This signal is emitted when the visibility of the minor grid lines of the axis
changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onMinorGridVisibleChanged(bool visible)
- This signal is emitted when the visibility of the minor grid lines of the axis
- changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::gridLinePenChanged(const QPen& pen)
@@ -419,37 +390,21 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractAxis::colorChanged(QColor color)
This signal is emitted when the color of the axis changes to \a color.
*/
-/*!
- \qmlsignal AbstractAxis::onColorChanged(QColor color)
- This signal is emitted when the color of the axis changes to \a color.
-*/
/*!
\fn void QAbstractAxis::labelsColorChanged(QColor color)
This signal is emitted when the color of the axis labels changes to \a color.
*/
-/*!
- \qmlsignal AbstractAxis::onLabelsColorChanged(QColor color)
- This signal is emitted when the color of the axis labels changes to \a color.
-*/
/*!
\fn void QAbstractAxis::titleVisibleChanged(bool visible)
This signal is emitted when the visibility of the title text of the axis changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onTitleVisibleChanged(bool visible)
- This signal is emitted when the visibility of the title text of the axis changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::titleTextChanged(const QString& text)
This signal is emitted when the text of the axis title changes to \a text.
*/
-/*!
- \qmlsignal AbstractAxis::onTitleTextChanged(String text)
- This signal is emitted when the text of the axis title changes to \a text.
-*/
/*!
\fn void QAbstractAxis::titleBrushChanged(const QBrush& brush)
@@ -460,37 +415,21 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractAxis::titleFontChanged(const QFont& font)
This signal is emitted when the font of the axis title changes to \a font.
*/
-/*!
- \qmlsignal AbstractAxis::onTitleFontChanged(Font font)
- This signal is emitted when the font of the axis title changes to \a font.
-*/
/*!
\fn void QAbstractAxis::shadesVisibleChanged(bool)
This signal is emitted when the visibility of the axis shades changes to \a visible.
*/
-/*!
- \qmlsignal AbstractAxis::onShadesVisibleChanged(bool visible)
- This signal is emitted when the visibility of the axis shades changes to \a visible.
-*/
/*!
\fn void QAbstractAxis::shadesColorChanged(QColor color)
This signal is emitted when the color of the axis shades changes to \a color.
*/
-/*!
- \qmlsignal AbstractAxis::onShadesColorChanged(QColor color)
- This signal is emitted when the color of the axis shades changes to \a color.
-*/
/*!
\fn void QAbstractAxis::shadesBorderColorChanged(QColor color)
This signal is emitted when the border color of the axis shades changes to \a color.
*/
-/*!
- \qmlsignal AbstractAxis::onBorderColorChanged(QColor color)
- This signal is emitted when the border color of the axis shades changes to \a color.
-*/
/*!
\fn void QAbstractAxis::shadesBrushChanged(const QBrush& brush)
diff --git a/src/charts/axis/valueaxis/qvalueaxis.cpp b/src/charts/axis/valueaxis/qvalueaxis.cpp
index d650d3ba..2b775e2a 100644
--- a/src/charts/axis/valueaxis/qvalueaxis.cpp
+++ b/src/charts/axis/valueaxis/qvalueaxis.cpp
@@ -168,41 +168,23 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QValueAxis::minChanged(qreal min)
This signal is emitted when the minimum value of the axis, specified by \a min, changes.
*/
-/*!
- \qmlsignal ValueAxis::onMinChanged(real min)
- This signal is emitted when the minimum value of the axis, specified by \a min, changes.
-*/
/*!
\fn void QValueAxis::maxChanged(qreal max)
This signal is emitted when the maximum value of the axis, specified by \a max, changes.
*/
-/*!
- \qmlsignal ValueAxis::onMaxChanged(real max)
- This signal is emitted when the maximum value of the axis, specified by \a max, changes.
-*/
/*!
\fn void QValueAxis::tickCountChanged(int tickCount)
This signal is emitted when the number of tick marks on the axis, specified by \a tickCount,
changes.
*/
-/*!
- \qmlsignal ValueAxis::tickCountChanged(int tickCount)
- This signal is emitted when the number of tick marks on the axis, specified by \a tickCount,
- changes.
-*/
/*!
\fn void QValueAxis::minorTickCountChanged(int minorTickCount)
This signal is emitted when the number of minor tick marks on the axis, specified by
\a minorTickCount, changes.
*/
-/*!
- \qmlsignal ValueAxis::minorTickCountChanged(int minorTickCount)
- This signal is emitted when the number of minor tick marks on the axis, specified by
- \a minorTickCount, changes.
-*/
/*!
\fn void QValueAxis::rangeChanged(qreal min, qreal max)
@@ -211,11 +193,14 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \fn void QValueAxis::labelFormatChanged(const QString &format)
- This signal is emitted when the \a format of axis labels changes.
+ \qmlsignal ValueAxis::rangeChanged(string min, string max)
+ This signal is emitted when \a min or \a max value of the axis changes.
+
+ The corresponding signal handler is \c onRangeChanged.
*/
+
/*!
- \qmlsignal ValueAxis::labelFormatChanged(const QString &format)
+ \fn void QValueAxis::labelFormatChanged(const QString &format)
This signal is emitted when the \a format of axis labels changes.
*/
@@ -333,6 +318,14 @@ QAbstractAxis::AxisType QValueAxis::type() const
}
/*!
+ \qmlmethod ValueAxis::applyNiceNumbers()
+ Modifies the current range and number of tick marks on the axis to look
+ \e nice. The algorithm considers numbers that can be expressed as a form of
+ 1*10^n, 2* 10^n, or 5*10^n to be nice numbers. These numbers are used for
+ setting spacing for the tick marks.
+*/
+
+/*!
Modifies the current range and number of tick marks on the axis to look \e nice. The algorithm
considers numbers that can be expressed as a form of 1*10^n, 2* 10^n, or 5*10^n to be
nice numbers. These numbers are used for setting spacing for the tick marks.
diff --git a/src/charts/barchart/qabstractbarseries.cpp b/src/charts/barchart/qabstractbarseries.cpp
index b2a2a7bc..cd27cd1c 100644
--- a/src/charts/barchart/qabstractbarseries.cpp
+++ b/src/charts/barchart/qabstractbarseries.cpp
@@ -191,16 +191,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmlproperty string AbstractBarSeries::labelsFormat
The format used for showing labels in a bar series.
- \sa QAbstractBarSeries::labelsFormat, labelsVisible, LabelsPosition
+ \sa QAbstractBarSeries::labelsFormat, labelsVisible, labelsPosition
*/
/*!
\fn void QAbstractBarSeries::labelsFormatChanged(const QString &format)
This signal is emitted when the \a format of data value labels changes.
*/
-/*!
- \qmlsignal XYSeries::onLabelsFormatChanged(string format)
- This signal is emitted when the \a format of data value labels changes.
-*/
/*!
\enum QAbstractBarSeries::LabelsPosition
@@ -220,14 +216,18 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa labelsVisible, labelsFormat
*/
/*!
- \qmlproperty enumeration AbstractBarSeries::LabelsPosition
+ \qmlproperty enumeration AbstractBarSeries::labelsPosition
The position of the data value labels:
- \value LabelsCenter Label is located in the center of the bar.
- \value LabelsInsideEnd Label is located inside the bar at the top.
- \value LabelsInsideBase Label is located inside the bar at the bottom.
- \value LabelsOutsideEnd Label is located outside the bar at the top.
+ \value AbstractBarSeries.LabelsCenter
+ Label is located in the center of the bar.
+ \value AbstractBarSeries.LabelsInsideEnd
+ Label is located inside the bar at the top.
+ \value AbstractBarSeries.LabelsInsideBase
+ Label is located inside the bar at the bottom.
+ \value AbstractBarSeries.LabelsOutsideEnd
+ Label is located outside the bar at the top.
\sa labelsVisible, labelsFormat
*/
@@ -235,27 +235,19 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractBarSeries::labelsPositionChanged(QAbstractBarSeries::LabelsPosition position)
This signal is emitted when the \a position of value labels changes.
*/
-/*!
- \qmlsignal AbstractBarSeries::onLabelsPositionChanged(LabelsPosition position)
- This signal is emitted when the \a position of value labels changes.
-*/
/*!
\property QAbstractBarSeries::labelsAngle
\brief The angle of the value labels in degrees.
*/
/*!
- \qmlproperty qreal QAbstractBarSeries::labelsAngle
+ \qmlproperty real AbstractBarSeries::labelsAngle
The angle of the value labels in degrees.
*/
/*!
\fn void QAbstractBarSeries::labelsAngleChanged(qreal angle)
This signal is emitted when the \a angle of the value labels changes.
*/
-/*!
- \qmlsignal AbstractBarSeries::onLabelsAngleChanged(qreal angle)
- This signal is emitted when the \a angle of the value labels changes.
-*/
/*!
\fn void QAbstractBarSeries::clicked(int index, QBarSet *barset)
@@ -263,9 +255,11 @@ QT_CHARTS_BEGIN_NAMESPACE
in the bar set specified by \a barset.
*/
/*!
- \qmlsignal AbstractBarSeries::onClicked(int index, BarSet barset)
+ \qmlsignal AbstractBarSeries::clicked(int index, BarSet barset)
This signal is emitted when the user clicks the bar specified by \a index
in the bar set specified by \a barset.
+
+ The corresponding signal handler is \c onClicked.
*/
/*!
@@ -274,9 +268,11 @@ QT_CHARTS_BEGIN_NAMESPACE
in the bar set specified by \a barset and holds down the mouse button.
*/
/*!
- \qmlsignal AbstractBarSeries::onPressed(int index, BarSet barset)
+ \qmlsignal AbstractBarSeries::pressed(int index, BarSet barset)
This signal is emitted when the user clicks the bar specified by \a index
in the bar set specified by \a barset and holds down the mouse button.
+
+ The corresponding signal handler is \c onPressed.
*/
/*!
@@ -285,9 +281,11 @@ QT_CHARTS_BEGIN_NAMESPACE
specified by \a index in the bar set specified by \a barset.
*/
/*!
- \qmlsignal AbstractBarSeries::onReleased(int index, BarSet barset)
+ \qmlsignal AbstractBarSeries::released(int index, BarSet barset)
This signal is emitted when the user releases the mouse press on the bar
specified by \a index in the bar set specified by \a barset.
+
+ The corresponding signal handler is \c onReleased.
*/
/*!
@@ -296,9 +294,11 @@ QT_CHARTS_BEGIN_NAMESPACE
in the bar set specified by \a barset.
*/
/*!
- \qmlsignal AbstractBarSeries::onDoubleClicked(int index, BarSet barset)
+ \qmlsignal AbstractBarSeries::doubleClicked(int index, BarSet barset)
This signal is emitted when the user double-clicks the bar specified by \a index
in the bar set specified by \a barset.
+
+ The corresponding signal handler is \c onDoubleClicked.
*/
/*!
@@ -309,11 +309,13 @@ QT_CHARTS_BEGIN_NAMESPACE
and when the mouse moves away again, it turns \c false.
*/
/*!
- \qmlsignal AbstractBarSeries::onHovered(bool status, int index, BarSet barset)
+ \qmlsignal AbstractBarSeries::hovered(bool status, int index, BarSet barset)
This signal is emitted when a mouse is hovered over the bar specified by \a index in the
bar set specified by \a barset. When the mouse moves over the bar, \a status turns \c true,
and when the mouse moves away again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered.
*/
/*!
@@ -321,11 +323,6 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when the number of bar sets is changed, for example by append() or
remove().
*/
-/*!
- \qmlsignal AbstractBarSeries::onCountChanged()
- This signal is emitted when the number of bar sets is changed, for example by append() or
- remove().
-*/
/*!
\fn void QAbstractBarSeries::labelsVisibleChanged()
@@ -339,8 +336,10 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa append(), insert()
*/
/*!
- \qmlsignal AbstractBarSeries::onBarsetsAdded()
+ \qmlsignal AbstractBarSeries::barsetsAdded()
This signal is emitted when bar sets are added to the series.
+
+ The corresponding signal handler is \c onBarsetsAdded.
*/
/*!
@@ -349,8 +348,10 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa remove()
*/
/*!
- \qmlsignal AbstractBarSeries::onBarsetsRemoved()
+ \qmlsignal AbstractBarSeries::barsetsRemoved()
This signal is emitted when bar sets are removed from the series.
+
+ The corresponding signal handler is \c onBarsetsRemoved.
*/
/*!
diff --git a/src/charts/barchart/qbarset.cpp b/src/charts/barchart/qbarset.cpp
index be00356f..bba1cac7 100644
--- a/src/charts/barchart/qbarset.cpp
+++ b/src/charts/barchart/qbarset.cpp
@@ -179,10 +179,6 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when the label of the bar set changes.
\sa label
*/
-/*!
- \qmlsignal BarSet::onLabelChanged()
- This signal is emitted when the label of the bar set changes.
-*/
/*!
\fn void QBarSet::penChanged()
@@ -212,28 +208,16 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QBarSet::colorChanged(QColor)
This signal is emitted when the fill (brush) color of the bar set changes to \a color.
*/
-/*!
- \qmlsignal BarSet::onColorChanged(color color)
- This signal is emitted when the fill (brush) color of the bar set changes to \a color.
-*/
/*!
\fn void QBarSet::borderColorChanged(QColor)
This signal is emitted when the line (pen) color of the bar set changes to \a color.
*/
-/*!
- \qmlsignal BarSet::onBorderColorChanged(color color)
- This signal is emitted when the line (pen) color of the bar set changes to \a color.
-*/
/*!
\fn void QBarSet::labelColorChanged(QColor)
This signal is emitted when the text (label) color of the bar set changes to \a color.
*/
-/*!
- \qmlsignal BarSet::onLabelColorChanged(color color)
- This signal is emitted when the text (label) color of the bar set changes to \a color.
-*/
/*!
\fn void QBarSet::valuesAdded(int index, int count)
@@ -243,10 +227,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa append(), insert()
*/
/*!
- \qmlsignal BarSet::onValuesAdded(int index, int count)
+ \qmlsignal BarSet::valuesAdded(int index, int count)
This signal is emitted when new values are added to the bar set.
\a index indicates the position of the first inserted value, and \a count is the number
of inserted values.
+
+ The corresponding signal handler is \c onValuesAdded.
*/
/*!
@@ -257,10 +243,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa remove()
*/
/*!
- \qmlsignal BarSet::onValuesRemoved(int index, int count)
+ \qmlsignal BarSet::valuesRemoved(int index, int count)
This signal is emitted when values are removed from the bar set.
\a index indicates the position of the first removed value, and \a count is the number
of removed values.
+
+ The corresponding signal handler is \c onValuesRemoved.
*/
/*!
@@ -269,8 +257,10 @@ QT_CHARTS_BEGIN_NAMESPACE
\sa at()
*/
/*!
- \qmlsignal BarSet::onValueChanged(int index)
+ \qmlsignal BarSet::valueChanged(int index)
This signal is emitted when the value at the position specified by \a index is modified.
+
+ The corresponding signal handler is \c onValueChanged.
*/
/*!
@@ -333,6 +323,11 @@ QString QBarSet::label() const
}
/*!
+ \qmlmethod BarSet::append(real value)
+ Appends the new value specified by \a value to the end of the bar set.
+*/
+
+/*!
Appends the new value specified by \a value to the end of the bar set.
*/
void QBarSet::append(const qreal value)
@@ -380,6 +375,14 @@ void QBarSet::insert(const int index, const qreal value)
}
/*!
+ \qmlmethod BarSet::remove(int index, int count)
+ Removes the number of values specified by \a count from the bar set starting
+ with the value specified by \a index.
+
+ If you leave out \a count, only the value specified by \a index is removed.
+*/
+
+/*!
Removes the number of values specified by \a count from the bar set starting with
the value specified by \a index.
\sa insert()
@@ -393,6 +396,12 @@ void QBarSet::remove(const int index, const int count)
}
/*!
+ \qmlmethod BarSet::replace(int index, real value)
+ Adds the value specified by \a value to the bar set at the position
+ specified by \a index.
+*/
+
+/*!
Adds the value specified by \a value to the bar set at the position specified by \a index.
*/
void QBarSet::replace(const int index, const qreal value)
@@ -404,6 +413,12 @@ void QBarSet::replace(const int index, const qreal value)
}
/*!
+ \qmlmethod BarSet::at(int index)
+ Returns the value specified by \a index from the bar set.
+ If the index is out of bounds, 0.0 is returned.
+*/
+
+/*!
Returns the value specified by \a index from the bar set.
If the index is out of bounds, 0.0 is returned.
*/
diff --git a/src/charts/boxplotchart/qboxplotmodelmapper.cpp b/src/charts/boxplotchart/qboxplotmodelmapper.cpp
index 2dcd19ff..d8fe2946 100644
--- a/src/charts/boxplotchart/qboxplotmodelmapper.cpp
+++ b/src/charts/boxplotchart/qboxplotmodelmapper.cpp
@@ -36,6 +36,17 @@
QT_CHARTS_BEGIN_NAMESPACE
+/*!
+ \class QBoxPlotModelMapper
+ \inmodule Qt Charts
+ \brief The QBoxPlotModelMapper class is the base class for box plot model
+ mapper classes.
+ \internal
+
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart.
+*/
+
QBoxPlotModelMapper::QBoxPlotModelMapper(QObject *parent) :
QObject(parent),
d_ptr(new QBoxPlotModelMapperPrivate(this))
diff --git a/src/charts/boxplotchart/qhboxplotmodelmapper.cpp b/src/charts/boxplotchart/qhboxplotmodelmapper.cpp
index 21ff90c0..7665f308 100644
--- a/src/charts/boxplotchart/qhboxplotmodelmapper.cpp
+++ b/src/charts/boxplotchart/qhboxplotmodelmapper.cpp
@@ -35,12 +35,24 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHBoxPlotModelMapper
\inmodule Qt Charts
- \brief Horizontal model mapper for box plot series.
+ \brief The QHBoxPlotModelMapper class is a horizontal model mapper for box
+ plot series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A horizontal model mapper is used to
+ create a connection between a data model and QBoxPlotSeries object, so that
+ each row in the data model defines a box-and-whiskers item and each column
+ maps to the range and three median values of the box-and-whiskers item.
+
+ Both model and series properties can be used to manipulate the
+ data. The model mapper keeps the series and the data model in sync.
+
+ The model mapper ensures that all the box-and-whiskers items in the box plot
+ series have equal sizes. Therefore, adding or removing a value from a
+ box-and-whiskers item causes the same change to be made in all the
+ box-and-whiskers items in the box plot series.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Horizontal model mapper is used to create a connection between QBoxPlotSeries and QAbstractItemModel derived model object.
- Model mapper maintains equal size of all the QBoxSets.
- \note used model has to support adding/removing rows/columns and modifying the data of the cells.
+ \sa QVBoxPlotModelMapper
*/
/*!
\qmltype HBoxPlotModelMapper
@@ -49,14 +61,25 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief Horizontal model mapper for box plot series.
- HBoxPlotModelMapper allows you to use your own QAbstractItemModel derived model with data in
- rows as a data source for any box-and-whiskers series. It is possible to use both
- QAbstractItemModel and box-and-whiskers series data API to manipulate data. HBoxPlotModelMapper
- keeps the series and the model in sync.
-
- The following QML example would create a box-and-whiskers series with three box sets (assuming
- the model has at least four rows). Each box set would contain data starting from column 1. The
- name of a set would be defined by the vertical header (of the row).
+ The HBoxPlotModelMapper type enables using a data model derived from the
+ QAbstractItemModel class as a data source for a chart. A horizontal model
+ mapper is used to create a connection between a data model and a
+ BoxPlotSeries type, so that each row in the data model defines a
+ box-and-whiskers item and each column maps to the range and three median
+ values of the box-and-whiskers item.
+
+ Both model and series properties can be used to manipulate the data. The
+ model mapper keeps the series and the data model in sync.
+
+ The model mapper ensures that all the box-and-whiskers items in the box plot
+ series have equal sizes. Therefore, adding or removing a value from a
+ box-and-whiskers item causes the same change to be made in all the
+ box-and-whiskers items in the box plot series.
+
+ The following QML code snippet creates a box plot series with three
+ box-and-whiskers items (assuming the model has at least four rows). Each
+ box-and-whiskers item contains data starting from column 1. The name of an
+ item is defined by the row header.
\code
BoxPlotSeries {
HBoxPlotModelMapper {
@@ -67,114 +90,129 @@ QT_CHARTS_BEGIN_NAMESPACE
}
}
\endcode
+
+ \sa VBoxPlotModelMapper
*/
/*!
\property QHBoxPlotModelMapper::series
- \brief Defines the QBoxPlotSeries object that is used by the mapper.
+ \brief The box plot series that is used by the mapper.
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it
+ preserves its data).
*/
/*!
\qmlproperty AbstractBarSeries HBoxPlotModelMapper::series
- Defines the AbstractBarSeries based object that is used by the mapper. All the data in the series is discarded when it is
- set to the mapper. When new series is specified the old series is disconnected (it preserves its data).
+ The box plot series that is used by the mapper. All the data in the series
+ is discarded when it is set to the mapper. When the new series is specified,
+ the old series is disconnected (but it preserves its data).
*/
/*!
\property QHBoxPlotModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel HBoxPlotModelMapper::model
- The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. \note the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ The data model that is used by the mapper. You need to implement the model
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and
+ modifying the data in the cells.
*/
/*!
\property QHBoxPlotModelMapper::firstBoxSetRow
- \brief Defines which row of the model is used as the data source for the first box-and-whiskers set.
+ \brief The row of the model that is used as the data source for the first
+ box-and-whiskers item.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HBoxPlotModelMapper::firstBoxSetRow
- Defines which row of the model is used as the data source for the first box-and-whiskers set. Default value
- is: -1 (invalid mapping).
+ The row of the model is used as the data source for the first
+ box-and-whiskers item. The default value is -1 (invalid mapping).
*/
/*!
\property QHBoxPlotModelMapper::lastBoxSetRow
- \brief Defines which row of the model is used as the data source for the last box-and-whiskers set.
+ \brief The row of the model that is used as the data source for the last
+ box-and-whiskers item.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HBoxPlotModelMapper::lastBoxSetRow
- Defines which row of the model is used as the data source for the last box-and-whiskers set. Default
- value is: -1 (invalid mapping).
+ The row of the model is used as the data source for the last
+ box-and-whiskers item. The default value is -1 (invalid mapping).
*/
/*!
\property QHBoxPlotModelMapper::firstColumn
- \brief Defines which column of the model contains the first values of the QBoxSets in the series.
+ \brief The column of the model that contains the first values of the
+ box-and-whiskers items in the box plot series.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int HBoxPlotModelMapper::firstColumn
- Defines which column of the model contains the first values of the QBoxSets in the series.
+ The column of the model that contains the first values of the
+ box-and-whiskers items in the box plot series.
The default value is 0.
*/
/*!
\property QHBoxPlotModelMapper::columnCount
- \brief Defines the number of column of the model that are mapped as the data for QBoxPlotSeries
+ \brief The number of columns of the model that are mapped as the data for
+ the box plot series.
- Minimal and default value is: -1 (count limited by the number of columns in the model)
+ The minimum and default value is -1 (number limited to the number of
+ columns in the model).
*/
/*!
\qmlproperty int HBoxPlotModelMapper::columnCount
- Defines the number of columns of the model that are mapped as the data for QBoxPlotSeries. The default value is
- -1 (count limited by the number of columns in the model)
+ The number of columns of the model that are mapped as the data for
+ the box plot series. The minimum and default value is -1 (number limited to
+ the number of columns in the model).
*/
/*!
\fn void QHBoxPlotModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to
+ changes.
*/
/*!
\fn void QHBoxPlotModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to
+ changes.
*/
/*!
\fn void QHBoxPlotModelMapper::firstBoxSetRowChanged()
- Emitted when the firstBoxSetRow has changed.
+ This signal is emitted when the first box-and-whiskers item row changes.
*/
/*!
\fn void QHBoxPlotModelMapper::lastBoxSetRowChanged()
- Emitted when the lastBoxSetRow has changed.
+ This signal is emitted when the last box-and-whiskers item row changes.
*/
/*!
\fn void QHBoxPlotModelMapper::firstColumnChanged()
- Emitted when the firstColumn has changed.
+ This signal is emitted when the first column changes.
*/
/*!
\fn void QHBoxPlotModelMapper::columnCountChanged()
- Emitted when the columnCount has changed.
+ This signal is emitted when the number of columns changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QHBoxPlotModelMapper::QHBoxPlotModelMapper(QObject *parent) :
QBoxPlotModelMapper(parent)
diff --git a/src/charts/boxplotchart/qvboxplotmodelmapper.cpp b/src/charts/boxplotchart/qvboxplotmodelmapper.cpp
index 43809432..0277e5f6 100644
--- a/src/charts/boxplotchart/qvboxplotmodelmapper.cpp
+++ b/src/charts/boxplotchart/qvboxplotmodelmapper.cpp
@@ -34,12 +34,24 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QVBoxPlotModelMapper
\inmodule Qt Charts
- \brief Vertical model mapper for box plot series.
+ \brief The QVBoxPlotModelMapper is a vertical model mapper for box plot
+ series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and a QBoxPlotSeries object, so that each column in the data model
+ defines a box-and-whiskers item and each row maps to the range and three median
+ values of the box-and-whiskers item.
+
+ Both model and series properties can be used to manipulate the data. The model mapper
+ keeps the series and the data model in sync.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Vertical model mapper is used to create a connection between QBoxPlotSeries and QAbstractItemModel derived model object.
- Model mapper maintains equal size of all the QBoxSets.
- \note used model has to support adding/removing rows/columns and modifying the data of the cells.
+ The model mapper ensures that all the bar box-and-whiskers items in the box plot
+ series have equal sizes. Therefore, adding or removing a value from a box-and-whiskers
+ item causes the same change to be made in all the box-and-whiskers items in the
+ box plot series.
+
+ \sa QHBoxPlotModelMapper
*/
/*!
\qmltype VBoxPlotModelMapper
@@ -48,14 +60,23 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief Vertical model mapper for box plot series.
- VBoxPlotModelMapper allows you to use your own QAbstractItemModel derived model with data in
- columns as a data source for any box-and-whiskers series. It is possible to use both
- QAbstractItemModel and box-and-whiskers series data API to manipulate data. VBoxPlotModelMapper
- keeps the series and the model in sync.
+ The VBoxPlotModelMapper type enables using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and a BoxPlotSeries type, so that each column in the data model
+ defines a box-and-whiskers item and each row maps to the range and three median values of
+ the box-and-whiskers item.
+
+ Both model and series properties can be used to manipulate the data. The model mapper
+ keeps the series and the data model in sync.
+
+ The model mapper ensures that all the bar box-and-whiskers items in the box plot
+ series have equal sizes. Therefore, adding or removing a value from a box-and-whiskers
+ item causes the same change to be made in all the box-and-whiskers items in the
+ box plot series.
- The following QML example would create a box-and-whiskers series with three box sets (assuming
- the model has at least four columns). Each box set would contain data starting from row 1. The
- name of a set would be defined by the horizontal header (of the column).
+ The following QML code snippet creates a box plot series with three box-and-whiskers items
+ (assuming the model has at least four columns). Each box-and-whiskers item contains
+ data starting from row 1. The name of an item is defined by the column header.
\code
BoxPlotSeries {
VBoxPlotModelMapper {
@@ -66,114 +87,134 @@ QT_CHARTS_BEGIN_NAMESPACE
}
}
\endcode
+
+ \sa HBoxPlotModelMapper
*/
/*!
\property QVBoxPlotModelMapper::series
- \brief Defines the QBoxPlotSeries object that is used by the mapper.
+ \brief The box plot series that is used by the mapper.
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it
+ preserves its data).
*/
/*!
\qmlproperty AbstractBarSeries VBoxPlotModelMapper::series
- Defines the AbstractBarSeries based object that is used by the mapper. All the data in the series is discarded when it is
- set to the mapper. When new series is specified the old series is disconnected (it preserves its data).
+ The box plot series that is used by the mapper.
+
+ All the data in the series is discarded when it is set to the mapper.
+ When a new series is specified, the old series is disconnected (but it
+ preserves its data).
*/
/*!
\property QVBoxPlotModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel VBoxPlotModelMapper::model
- The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. \note the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ The data model that is used by the mapper. You need to implement the model
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and
+ modifying the data in the cells.
*/
/*!
\property QVBoxPlotModelMapper::firstBoxSetColumn
- \brief Defines which column of the model is used as the data source for the first box-and-whiskers set.
+ \brief The column of the model that is used as the data source for the first
+ box-and-whiskers item.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VBoxPlotModelMapper::firstBoxSetColumn
- Defines which column of the model is used as the data source for the first box-and-whiskers set. Default value
- is: -1 (invalid mapping).
+ The column of the model that is used as the data source for the first
+ box-and-whiskers item. The default value is -1 (invalid mapping).
*/
/*!
\property QVBoxPlotModelMapper::lastBoxSetColumn
- \brief Defines which column of the model is used as the data source for the last box-and-whiskers set.
+ \brief The column of the model that is used as the data source for the last
+ box-and-whiskers item.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VBoxPlotModelMapper::lastBoxSetColumn
- Defines which column of the model is used as the data source for the last box-and-whiskers set. Default
- value is: -1 (invalid mapping).
+ The column of the model that is used as the data source for the last
+ box-and-whiskers item. The default value is -1 (invalid mapping).
*/
/*!
\property QVBoxPlotModelMapper::firstRow
- \brief Defines which row of the model contains the first values of the QBoxSets in the series.
+ \brief The row of the model that contains the first values of the
+ box-and-whiskers items in the box plot series.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int VBoxPlotModelMapper::firstRow
- Defines which row of the model contains the first values of the QBoxSets in the series.
+ The row of the model that contains the first values of the
+ box-and-whiskers items in the box plot series.
+
The default value is 0.
*/
/*!
\property QVBoxPlotModelMapper::rowCount
- \brief Defines the number of rows of the model that are mapped as the data for QBoxPlotSeries
+ \brief The number of rows of the model that are mapped as the data for the
+ box plot series.
- Minimal and default value is: -1 (count limited by the number of rows in the model)
+ The minimum and default value is -1 (number limited to the number of
+ columns in the model).
*/
/*!
\qmlproperty int VBoxPlotModelMapper::rowCount
- Defines the number of rows of the model that are mapped as the data for QBoxPlotSeries. The default value is
- -1 (count limited by the number of rows in the model)
+ The number of rows of the model that are mapped as the data for
+ the box plot series.
+
+ The default value is -1 (number limited to the number of
+ columns in the model).
*/
/*!
\fn void QVBoxPlotModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to
+ changes.
*/
/*!
\fn void QVBoxPlotModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to
+ changes.
*/
/*!
\fn void QVBoxPlotModelMapper::firstBoxSetColumnChanged()
- Emitted when the firstBoxSetColumn has changed.
+ This signal is emitted when the first box-and-whiskers item column changes.
*/
/*!
\fn void QVBoxPlotModelMapper::lastBoxSetColumnChanged()
- Emitted when the lastBoxSetColumn has changed.
+ This signal is emitted when the last box-and-whiskers item column changes.
*/
/*!
\fn void QVBoxPlotModelMapper::firstRowChanged()
- Emitted when the firstRow has changed.
+ This signal is emitted when the first row changes.
*/
/*!
\fn void QVBoxPlotModelMapper::rowCountChanged()
- Emitted when the rowCount has changed.
+ This signal is emitted when the number of rows changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QVBoxPlotModelMapper::QVBoxPlotModelMapper(QObject *parent) :
QBoxPlotModelMapper(parent)
diff --git a/src/charts/candlestickchart/qcandlestickseries.cpp b/src/charts/candlestickchart/qcandlestickseries.cpp
index 986d877b..ca6a8659 100644
--- a/src/charts/candlestickchart/qcandlestickseries.cpp
+++ b/src/charts/candlestickchart/qcandlestickseries.cpp
@@ -47,10 +47,9 @@ QT_CHARTS_BEGIN_NAMESPACE
\class QCandlestickSeries
\since 5.8
\inmodule Qt Charts
- \brief Series for creating a candlestick chart.
+ \brief The QCandlestickSeries class presents data as candlesticks.
- QCandlestickSeries represents a series of data shown as candlesticks. The purpose of this class
- is to act as a container for single candlestick items. Each item is drawn to its own category
+ This class acts as a container for single candlestick items. Each item is drawn to its own category
when using QBarCategoryAxis. QDateTimeAxis and QValueAxis can be used as alternatives to
QBarCategoryAxis. In this case, each candlestick item is drawn according to its timestamp value.
@@ -69,16 +68,16 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmltype CandlestickSeries
- \since 2.2
+ \since QtCharts 2.2
\instantiates QCandlestickSeries
\inqmlmodule QtCharts
\inherits AbstractSeries
- \brief Series for creating a candlestick chart.
+ \brief Represents a series of data as candlesticks.
- CandlestickSeries represents a series of data shown as candlesticks. The purpose of this class
- is to act as a container for single candlestick items. Each item is drawn to its own category
+ The CandlestickSeries type acts as a container for single candlestick items.
+ Each item is drawn to its own category
when using BarCategoryAxis. DateTimeAxis and ValueAxis can be used as an alternative to
- BarCategoryAxis. In this case each candlestick item is drawn according to its timestamp value.
+ BarCategoryAxis. In this case, each candlestick item is drawn according to its timestamp value.
\note The timestamps must be unique within a CandlestickSeries. When using BarCategoryAxis, only
the first one of the candlestick items sharing a timestamp is drawn. If the chart includes
@@ -119,13 +118,43 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
+ \qmlproperty AbstractAxis CandlestickSeries::axisX
+ The x-axis used for the series. If you leave both axisX and axisXTop
+ undefined, a value axis is created for the series.
+ \sa axisXTop, ValueAxis
+*/
+
+/*!
+ \qmlproperty AbstractAxis CandlestickSeries::axisY
+ The y-axis used for the series. If you leave both axisY and axisYRight
+ undefined, a value axis is created for the series.
+ \sa axisYRight, ValueAxis
+*/
+
+/*!
+ \qmlproperty AbstractAxis CandlestickSeries::axisXTop
+ The x-axis used for the series, drawn on top of the chart view.
+
+ \note You can only provide either axisX or axisXTop, not both.
+ \sa axisX
+*/
+
+/*!
+ \qmlproperty AbstractAxis CandlestickSeries::axisYRight
+ The y-axis used for the series, drawn to the right on the chart view.
+
+ \note You can only provide either axisY or axisYRight, not both.
+ \sa axisY
+*/
+
+/*!
\property QCandlestickSeries::count
- \brief The count of sets in series.
+ \brief The number of candlestick items in a series.
*/
/*!
\qmlproperty int CandlestickSeries::count
- The count of sets in series.
+ The number of candlestick items in a series.
*/
/*!
@@ -135,8 +164,8 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty qreal CandlestickSeries::maximumColumnWidth
- \brief The maximum width of the candlestick items in pixels. Setting a negative value means
+ \qmlproperty real CandlestickSeries::maximumColumnWidth
+ The maximum width of the candlestick items in pixels. Setting a negative value means
there is no maximum width. All negative values are converted to -1.0.
*/
@@ -147,50 +176,46 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty qreal CandlestickSeries::minimumColumnWidth
- \brief The minimum width of the candlestick items in pixels. Setting a negative value means
+ \qmlproperty real CandlestickSeries::minimumColumnWidth
+ The minimum width of the candlestick items in pixels. Setting a negative value means
there is no minimum width. All negative values are converted to -1.0.
*/
/*!
\property QCandlestickSeries::bodyWidth
- \brief The width of the candlestick items.
+ \brief The relative width of the candlestick item within its own slot, in the range
+ from 0.0 to 1.0.
- The value signifies the relative width of the candlestick item inside its own slot, in the range
- 0.0 to 1.0. Values outside this range are clamped to 0.0 or 1.0.
+ Values outside this range are clamped to 0.0 or 1.0.
*/
/*!
- \qmlproperty qreal CandlestickSeries::bodyWidth
- \brief The width of the candlestick items.
-
- The value signifies the relative width of the candlestick item inside its own slot, in the range
- 0.0 to 1.0. Values outside this range are clamped to 0.0 or 1.0.
+ \qmlproperty real CandlestickSeries::bodyWidth
+ The relative width of the candlestick item within its own slot, in the range
+ from 0.0 to 1.0. Values outside this range are clamped to 0.0 or 1.0.
*/
/*!
\property QCandlestickSeries::bodyOutlineVisible
- \brief The visibility of the candlestick body outlines.
+ \brief The visibility of the candlestick body outline.
*/
/*!
\qmlproperty bool CandlestickSeries::bodyOutlineVisible
- \brief The visibility of the candlestick body outlines.
+ The visibility of the candlestick body outlines.
*/
/*!
\property QCandlestickSeries::capsWidth
- \brief The width of the caps.
+ \brief The relative width of the caps within a candlestick, in the range from 0.0
+ to 1.0.
- The value signifies the relative width of the caps inside its own candlestick, in the range 0.0
- to 1.0. Values outside this range are clamped to 0.0 or 1.0.
+ Values outside this range are clamped to 0.0 or 1.0.
*/
/*!
- \qmlproperty qreal CandlestickSeries::capsWidth
- \brief The width of the caps.
-
- The value signifies the relative width of the caps inside its own candlestick, in the range 0.0
+ \qmlproperty real CandlestickSeries::capsWidth
+ The relative width of the caps within a candlestick, in the range from 0.0
to 1.0. Values outside this range are clamped to 0.0 or 1.0.
*/
@@ -201,277 +226,240 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlproperty bool CandlestickSeries::capsVisible
- \brief The visibility of the caps.
+ The visibility of the caps.
*/
/*!
\property QCandlestickSeries::increasingColor
- \brief The color of the increasing candlestick item body. Candlestick is \e increasing when its
- close value is higher than the open value. By default this property is set to brush color.
- Default color is used also when the property is set to an invalid color value.
+ \brief The color of the increasing candlestick item body.
+
+ A candlestick is \e increasing when its close value is higher than the open
+ value. By default, this property is set to the brush color. The default
+ color is used also when the property is set to an invalid color value.
*/
/*!
- \qmlproperty QColor CandlestickSeries::increasingColor
- \brief The color of the increasing candlestick item body. Candlestick is \e increasing when its
- close value is higher than the open value. By default this property is set to brush color.
- Default color is used also when the property is set to an invalid color value.
+ \qmlproperty color CandlestickSeries::increasingColor
+ The color of the increasing candlestick item body.
+ A candlestick is \e increasing when its close value is higher than the open
+ value. By default, this property is set to the brush color. The default
+ color is used also when the property is set to an invalid color value.
*/
/*!
\property QCandlestickSeries::decreasingColor
- \brief The color of the decreasing candlestick item body. Candlestick is \e decreasing when its
- open value is higher than the close value. By default this property is set to brush color with
- alpha channel set to 128. Default color is used also when the property is set to an invalid
- color value.
+ \brief The color of the decreasing candlestick item body.
+
+ A candlestick is \e decreasing when its open value is higher than the close
+ value. By default, this property is set to the brush color with the alpha
+ channel set to 128. The default color is used also when the property is set
+ to an invalid color value.
*/
/*!
- \qmlproperty QColor CandlestickSeries::decreasingColor
- \brief The color of the decreasing candlestick item body. Candlestick is \e decreasing when its
- open value is higher than the close value. By default this property is set to brush color with
- alpha channel set to 128. Default color is used also when the property is set to an invalid
- color value.
+ \qmlproperty color CandlestickSeries::decreasingColor
+ The color of the decreasing candlestick item body.
+ A candlestick is \e decreasing when its open value is higher than the close
+ value. By default, this property is set to the brush color with the alpha
+ channel set to 128. The default color is used also when the property is set
+ to an invalid color value.
*/
/*!
\property QCandlestickSeries::brush
- \brief The brush of the candlestick items.
+ \brief The brush used to fill the candlestick items.
*/
/*!
\property QCandlestickSeries::pen
- \brief The pen of the candlestick items.
+ \brief The pen used to draw the lines of the candlestick items.
*/
/*!
- \qmlproperty QString CandlestickSeries::brushFilename
- \brief The name of the file used as a brush for the series.
+ \qmlproperty string CandlestickSeries::brushFilename
+ The name of the file used as a brush image for the series.
*/
/*!
\fn void QCandlestickSeries::clicked(QCandlestickSet *set)
- \brief Emitted when a \a set is clicked (pressed and released) on the chart.
+ This signal is emitted when the candlestick item specified by \a set
+ is clicked on the chart.
*/
/*!
\qmlsignal CandlestickSeries::clicked(CandlestickSet set)
- \brief Emitted when a \a set is clicked (pressed and released) on the chart.
+ This signal is emitted when the candlestick item specified by \a set
+ is clicked on the chart.
The corresponding signal handler is \c {onClicked}.
*/
/*!
\fn void QCandlestickSeries::hovered(bool status, QCandlestickSet *set)
- \brief Emitted when there is change in hover \a status over the \a set.
+ This signal is emitted when a mouse is hovered over the candlestick
+ item specified by \a set in a chart.
+
+ When the mouse moves over the item, \a status turns \c true, and when the
+ mouse moves away again, it turns \c false.
*/
/*!
\qmlsignal CandlestickSeries::hovered(bool status, CandlestickSet set)
- \brief Emitted when there is change in hover \a status over the \a set.
+ This signal is emitted when a mouse is hovered over the candlestick
+ item specified by \a set in a chart.
+
+ When the mouse moves over the item, \a status turns \c true, and when the
+ mouse moves away again, it turns \c false.
The corresponding signal handler is \c {onHovered}.
*/
/*!
\fn void QCandlestickSeries::pressed(QCandlestickSet *set)
- \brief Emitted when a \a set is pressed on the chart.
+ This signal is emitted when the user clicks the candlestick item
+ specified by \a set and holds down the mouse button.
*/
/*!
\qmlsignal CandlestickSeries::pressed(CandlestickSet set)
- \brief Emitted when a \a set is pressed on the chart.
+ This signal is emitted when the user clicks the candlestick item
+ specified by \a set and holds down the mouse button.
The corresponding signal handler is \c {onPressed}.
*/
/*!
\fn void QCandlestickSeries::released(QCandlestickSet *set)
- \brief Emitted when a \a set is released on the chart.
+ This signal is emitted when the user releases the mouse press on the
+ candlestick item specified by \a set.
*/
/*!
\qmlsignal CandlestickSeries::released(CandlestickSet set)
- \brief Emitted when a \a set is released on the chart.
+ This signal is emitted when the user releases the mouse press on the
+ candlestick item specified by \a set.
The corresponding signal handler is \c {onReleased}.
*/
/*!
\fn void QCandlestickSeries::doubleClicked(QCandlestickSet *set)
- \brief Emitted when a \a set is double-clicked on the chart.
+ This signal is emitted when the candlestick item specified by \a set
+ is double-clicked on the chart.
*/
/*!
\qmlsignal CandlestickSeries::doubleClicked(CandlestickSet set)
- \brief Emitted when a \a set is double-clicked on the chart.
+ This signal is emitted when the candlestick item specified by \a set
+ is double-clicked on the chart.
The corresponding signal handler is \c {onDoubleClicked}.
*/
/*!
\fn void QCandlestickSeries::candlestickSetsAdded(const QList<QCandlestickSet *> &sets)
- \brief Emitted when new \a sets are added to the series.
+ This signal is emitted when the candlestick items specified by \a
+ sets are added to the series.
*/
/*!
\qmlsignal CandlestickSeries::candlestickSetsAdded(list<CandlestickSet> sets)
- \brief Emitted when new \a sets are added to the series.
+ This signal is emitted when the candlestick items specified by
+ \a sets are added to the series.
The corresponding signal handler is \c {onCandlestickSetsAdded}.
*/
/*!
\fn void QCandlestickSeries::candlestickSetsRemoved(const QList<QCandlestickSet *> &sets)
- \brief Emitted when \a sets are removed from the series.
+ This signal is emitted when the candlestick items specified by
+ \a sets are removed from the series.
*/
/*!
\qmlsignal CandlestickSeries::candlestickSetsRemoved(list<CandlestickSet> sets)
- \brief Emitted when \a sets are removed from the series.
+ This signal is emitted when the candlestick items specified by
+ \a sets are removed from the series.
The corresponding signal handler is \c {onCandlestickSetsRemoved}.
*/
/*!
\fn void QCandlestickSeries::countChanged()
- \brief Emitted when there is a change in the count of candlestick items in the series.
- \sa count
-*/
-
-/*!
- \qmlsignal CandlestickSeries::countChanged()
- \brief Emitted when there is a change in the count of candlestick items in the series.
+ This signal is emitted when the number of candlestick items in the
+ series changes.
\sa count
-
- The corresponding signal handler is \c {onCountChanged}.
*/
/*!
\fn void QCandlestickSeries::maximumColumnWidthChanged()
- \brief Emitted when there is a change in the maximum column width of candlestick items.
+ This signal is emitted when there is a change in the maximum column width of candlestick items.
\sa maximumColumnWidth
*/
/*!
- \qmlsignal CandlestickSeries::maximumColumnWidthChanged()
- \brief Emitted when there is a change in the maximum column width of candlestick items.
- \sa maximumColumnWidth
-
- The corresponding signal handler is \c {onMaximumColumnWidthChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::minimumColumnWidthChanged()
- \brief Emitted when there is a change in the minimum column width of candlestick items.
+ This signal is emitted when there is a change in the minimum column width of candlestick items.
\sa minimumColumnWidth
*/
/*!
- \qmlsignal CandlestickSeries::minimumColumnWidthChanged()
- \brief Emitted when there is a change in the minimum column width of candlestick items.
- \sa minimumColumnWidth
-
- The corresponding signal handler is \c {onMinimumColumnWidthChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::bodyWidthChanged()
- \brief Emitted when the candlestick item width is changed.
+ This signal is emitted when the candlestick item width changes.
\sa bodyWidth
*/
/*!
- \qmlsignal CandlestickSeries::bodyWidthChanged()
- \brief Emitted when the candlestick item width is changed.
- \sa bodyWidth
-
- The corresponding signal handler is \c {onBodyWidthChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::bodyOutlineVisibilityChanged()
- \brief Emitted when the visibility of the candlestick item body outline is changed.
+ This signal is emitted when the visibility of the candlestick item body outline changes.
\sa bodyOutlineVisible
*/
/*!
- \qmlsignal CandlestickSeries::bodyOutlineVisibilityChanged()
- \brief Emitted when the visibility of the candlestick item body outline is changed.
- \sa bodyOutlineVisible
-
- The corresponding signal handler is \c {onBodyOutlineVisibilityChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::capsWidthChanged()
- \brief Emitted when the candlestick item caps width is changed.
- \sa capsWidth
-*/
-
-/*!
- \qmlsignal CandlestickSeries::capsWidthChanged()
- \brief Emitted when the candlestick item caps width is changed.
+ This signal is emitted when the candlestick item caps width changes.
\sa capsWidth
-
- The corresponding signal handler is \c {onCapsWidthChanged}.
*/
/*!
\fn void QCandlestickSeries::capsVisibilityChanged()
- \brief Emitted when the visibility of the candlestick item caps is changed.
+ This signal is emitted when the visibility of the candlestick item caps changes.
\sa capsVisible
*/
/*!
- \qmlsignal CandlestickSeries::capsVisibilityChanged()
- \brief Emitted when the visibility of the candlestick item caps is changed.
- \sa capsVisible
-
- The corresponding signal handler is \c {onCapsVisibilityChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::increasingColorChanged()
- \brief Emitted when the candlestick item increasing color is changed.
- \sa increasingColor
-*/
-
-/*!
- \qmlsignal CandlestickSeries::increasingColorChanged()
- \brief Emitted when the candlestick item increasing color is changed.
+ This signal is emitted when the candlestick item increasing color changes.
\sa increasingColor
-
- The corresponding signal handler is \c {onIncreasingColorChanged}.
*/
/*!
\fn void QCandlestickSeries::decreasingColorChanged()
- \brief Emitted when the candlestick item decreasing color is changed.
+ This signal is emitted when the candlestick item decreasing color changes.
\sa decreasingColor
*/
/*!
- \qmlsignal CandlestickSeries::decreasingColorChanged()
- \brief Emitted when the candlestick item decreasing color is changed.
- \sa decreasingColor
-
- The corresponding signal handler is \c {onDecreasingColorChanged}.
-*/
-
-/*!
\fn void QCandlestickSeries::brushChanged()
- \brief Emitted when the candlestick item brush is changed.
+ This signal is emitted when the candlestick item brush changes.
+
\sa brush
*/
/*!
\fn void QCandlestickSeries::penChanged()
- \brief Emitted when the candlestick item pen is changed.
+ This signal is emitted when the candlestick item pen changes.
+
\sa pen
*/
/*!
+ \qmlmethod CandlestickSeries::at(int index)
+ Returns the candlestick item at the position specified by \a index. Returns
+ null if the index is not valid.
+*/
+
+/*!
Constructs an empty QCandlestickSeries. The \a parent is optional.
*/
QCandlestickSeries::QCandlestickSeries(QObject *parent)
@@ -490,8 +478,18 @@ QCandlestickSeries::~QCandlestickSeries()
}
/*!
- Adds a single set to the series. Takes ownership of the \a set. If the set is \e null or is
- already in the series, it won't be appended.
+ \qmlmethod CandlestickSeries::append(CandlestickSet set)
+ Adds a single candlestick item specified by \a set to the series and takes
+ ownership of it. If the item is null or it is already in the series, it
+ is not appended.
+
+ Returns \c true if appending succeeded, \c false otherwise.
+*/
+
+/*!
+ Adds a single candlestick item specified by \a set to the series and takes
+ ownership of it. If the item is null or it is already in the series, it
+ is not appended.
Returns \c true if appending succeeded, \c false otherwise.
*/
bool QCandlestickSeries::append(QCandlestickSet *set)
@@ -503,8 +501,15 @@ bool QCandlestickSeries::append(QCandlestickSet *set)
}
/*!
- Removes a single set from the series.
- Returns \c true if the \a set is successfully deleted, \c false otherwise.
+ \qmlmethod CandlestickSeries::remove(CandlestickSet set)
+ Removes a single candlestick item, specified by \a set, from the series.
+
+ Returns \c true if the item is successfully deleted, \c false otherwise.
+*/
+
+/*!
+ Removes a single candlestick item, specified by \a set, from the series.
+ Returns \c true if the item is successfully deleted, \c false otherwise.
*/
bool QCandlestickSeries::remove(QCandlestickSet *set)
{
@@ -515,10 +520,10 @@ bool QCandlestickSeries::remove(QCandlestickSet *set)
}
/*!
- Adds a list of sets to the series. Takes ownership of the \a sets. If any of the sets are
- \e null, already appended to the series, or the list contains duplicated sets, nothing is
- appended.
- Returns \c true if all sets were appended successfully, \c false otherwise.
+ Adds a list of candlestick items specified by \a sets to the series and
+ takes ownership of it. If any of the items are null, already belong to
+ the series, or appear in the list more than once, nothing is appended.
+ Returns \c true if all items were appended successfully, \c false otherwise.
*/
bool QCandlestickSeries::append(const QList<QCandlestickSet *> &sets)
{
@@ -534,9 +539,10 @@ bool QCandlestickSeries::append(const QList<QCandlestickSet *> &sets)
}
/*!
- Removes a list of sets from the series. If any of the \a sets are \e null, already removed from
- the series, or the list contains duplicated sets, nothing is removed.
- Returns \c true if all sets were removed successfully, \c false otherwise.
+ Removes a list of candlestick items specified by \a sets from the series. If
+ any of the items are null, were already removed from the series, or appear
+ in the list more than once, nothing is removed. Returns \c true if all items
+ were removed successfully, \c false otherwise.
*/
bool QCandlestickSeries::remove(const QList<QCandlestickSet *> &sets)
{
@@ -554,8 +560,18 @@ bool QCandlestickSeries::remove(const QList<QCandlestickSet *> &sets)
}
/*!
- Inserts a set to the series at \a index position. Takes ownership of the \a set. If the set is
- \e null or already in the series, it won't be appended.
+ \qmlmethod CandlestickSeries::insert(int index, CandlestickSet set)
+ Inserts the candlestick item specified by \a set to the series at the
+ position specified by \a index. Takes ownership of the item. If the
+ item is null or already belongs to the series, it is not inserted.
+
+ Returns \c true if inserting succeeded, \c false otherwise.
+*/
+
+/*!
+ Inserts the candlestick item specified by \a set to the series at the
+ position specified by \a index. Takes ownership of the item. If the
+ item is null or already belongs to the series, it is not inserted.
Returns \c true if inserting succeeded, \c false otherwise.
*/
bool QCandlestickSeries::insert(int index, QCandlestickSet *set)
@@ -574,10 +590,10 @@ bool QCandlestickSeries::insert(int index, QCandlestickSet *set)
}
/*!
- Takes a single \a set from the series. Does not delete the set object.
- Returns \c true if take was successful, \c false otherwise.
- \note The series remains as the set's parent object. You must set the parent object to take full
- ownership.
+ Takes a single candlestick item, specified by \a set, from the series. Does
+ not delete the item. Returns \c true if the take operation was successful, \c false otherwise.
+ \note The series remains the item's parent object. You must set the parent
+ object to take full ownership.
*/
bool QCandlestickSeries::take(QCandlestickSet *set)
{
@@ -596,7 +612,12 @@ bool QCandlestickSeries::take(QCandlestickSet *set)
}
/*!
- Removes all sets from the series, and deletes them.
+ \qmlmethod CandlestickSeries::clear()
+ Removes all candlestick items from the series and permanently deletes them.
+*/
+
+/*!
+ Removes all candlestick items from the series and permanently deletes them.
*/
void QCandlestickSeries::clear()
{
@@ -614,7 +635,8 @@ void QCandlestickSeries::clear()
}
/*!
- Returns the list of sets in the series. Ownership of the sets is unchanged.
+ Returns the list of candlestick items in the series. Ownership of the
+ items does not change.
*/
QList<QCandlestickSet *> QCandlestickSeries::sets() const
{
@@ -624,7 +646,7 @@ QList<QCandlestickSet *> QCandlestickSeries::sets() const
}
/*!
- Returns the number of the sets in the series.
+ Returns the number of the candlestick items in the series.
*/
int QCandlestickSeries::count() const
{
diff --git a/src/charts/candlestickchart/qcandlestickset.cpp b/src/charts/candlestickchart/qcandlestickset.cpp
index f9a5e5d2..eb4e5105 100644
--- a/src/charts/candlestickchart/qcandlestickset.cpp
+++ b/src/charts/candlestickchart/qcandlestickset.cpp
@@ -36,11 +36,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\class QCandlestickSet
\since 5.8
\inmodule Qt Charts
- \brief Building block for a candlestick chart.
+ \brief The QCandlestickSet class represents a single candlestick item in a
+ candlestick chart.
- QCandlestickSet represents a single candlestick item in a QCandlestickSeries. It takes five
- values to create a graphical representation of a candlestick item: \e open, \e high, \e low,
- \e close, and \e timestamp. These values can be either passed to a QCandlestickSet constructor,
+ Five values are needed to create a graphical representation of a candlestick
+ item: \e open, \e high, \e low, \e close, and \e timestamp. These values can
+ be either passed to a QCandlestickSet constructor
or set by using setOpen(), setHigh(), setLow(), setClose(), and setTimestamp().
\sa QCandlestickSeries
@@ -48,233 +49,198 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmltype CandlestickSet
- \since 2.2
+ \since QtCharts 2.2
\instantiates QCandlestickSet
\inqmlmodule QtCharts
- \brief Building block for a candlestick chart.
+ \brief Represents a single candlestick item in a candlestick chart.
- CandlestickSet represents a single candlestick item in a CandlestickSeries. It takes five
- values to create a graphical representation of a candlestick item: \l open, \l high, \l low,
- \l close, and \l timestamp.
+ Five values are needed to create a graphical representation of a candlestick
+ item: \l open, \l high, \l low, \l close, and \l timestamp.
\sa CandlestickSeries
*/
/*!
\property QCandlestickSet::timestamp
- \brief The timestamp value of the set.
+ \brief The timestamp value of the candlestick item.
*/
/*!
- \qmlproperty qreal CandlestickSet::timestamp
- \brief The timestamp value of the set.
+ \qmlproperty real CandlestickSet::timestamp
+ The timestamp value of the candlestick item.
*/
/*!
\property QCandlestickSet::open
- \brief The open value of the set.
+ \brief The open value of the candlestick item.
*/
/*!
- \qmlproperty qreal CandlestickSet::open
- \brief The open value of the set.
+ \qmlproperty real CandlestickSet::open
+ The open value of the candlestick item.
*/
/*!
\property QCandlestickSet::high
- \brief The high value of the set.
+ \brief The high value of the candlestick item.
*/
/*!
- \qmlproperty qreal CandlestickSet::high
- \brief The high value of the set.
+ \qmlproperty real CandlestickSet::high
+ The high value of the candlestick item.
*/
/*!
\property QCandlestickSet::low
- \brief The low value of the set.
+ \brief The low value of the candlestick item.
*/
/*!
- \qmlproperty qreal CandlestickSet::low
- \brief The low value of the set.
+ \qmlproperty real CandlestickSet::low
+ The low value of the candlestick item.
*/
/*!
\property QCandlestickSet::close
- \brief The close value of the set.
+ \brief The close value of the candlestick item.
*/
/*!
- \qmlproperty qreal CandlestickSet::close
- \brief The close value of the set.
+ \qmlproperty real CandlestickSet::close
+ The close value of the candlestick item.
*/
/*!
\property QCandlestickSet::brush
- \brief The brush used for drawing the candlestick.
+ \brief The brush used to fill the candlestick item.
*/
/*!
\property QCandlestickSet::pen
- \brief The pen used for drawing the candlestick.
+ \brief The pen used to draw the lines of the candlestick item.
*/
/*!
- \qmlproperty QString CandlestickSet::brushFilename
- \brief The name of the file used as a brush for the set.
+ \qmlproperty string CandlestickSet::brushFilename
+ The name of the file used as a brush for the candlestick item.
*/
/*!
\fn void QCandlestickSet::clicked()
- \brief Emitted when the candlestick item is clicked (pressed and released).
+ This signal is emitted when the candlestick item is clicked.
*/
/*!
\qmlsignal CandlestickSet::clicked()
- \brief Emitted when the candlestick item is clicked (pressed and released).
+ This signal is emitted when the candlestick item is clicked.
The corresponding signal handler is \c {onClicked}.
*/
/*!
\fn void QCandlestickSet::hovered(bool status)
- \brief Emitted when there is change in hover \a status over a candlestick item.
+ This signal is emitted when a mouse is hovered over a candlestick
+ item.
- Parameter \a status indicates whether the mouse has entered (\c true) or left (\c false) the
- area of the candlestick item.
+ When the mouse moves over the item, \a status turns \c true, and when the
+ mouse moves away again, it turns \c false.
*/
/*!
\qmlsignal CandlestickSet::hovered(bool status)
- \brief Emitted when there is change in hover \a status over a candlestick item.
+ This signal is emitted when a mouse is hovered over a candlestick
+ item.
- Parameter \a status indicates whether the mouse has entered (\c true) or left (\c false) the
- area of the candlestick item.
+ When the mouse moves over the item, \a status turns \c true, and when the
+ mouse moves away again, it turns \c false.
The corresponding signal handler is \c {onHovered}.
*/
/*!
\fn void QCandlestickSet::pressed()
- \brief Emitted when there is a press on a candlestick item.
+ This signal is emitted when the user clicks the candlestick item and
+ holds down the mouse button.
*/
/*!
\qmlsignal CandlestickSet::pressed()
- \brief Emitted when there is a press on a candlestick item.
+ This signal is emitted when the user clicks the candlestick item and
+ holds down the mouse button.
The corresponding signal handler is \c {onPressed}.
*/
/*!
\fn void QCandlestickSet::released()
- \brief Emitted when there is a release on a candlestick item.
+ This signal is emitted when the user releases the mouse press on the
+ candlestick item.
*/
/*!
\qmlsignal CandlestickSet::released()
- \brief Emitted when there is a release on a candlestick item.
+ This signal is emitted when the user releases the mouse press on the
+ candlestick item.
The corresponding signal handler is \c {onReleased}.
*/
/*!
\fn void QCandlestickSet::doubleClicked()
- \brief Emitted when there is a double-click on a candlestick item.
+ This signal is emitted when the user double-clicks a candlestick item.
*/
/*!
\qmlsignal CandlestickSet::doubleClicked()
- \brief Emitted when there is a double-click on a candlestick item.
+ This signal is emitted when the user double-clicks a candlestick item.
The corresponding signal handler is \c {onDoubleClicked}.
*/
/*!
\fn void QCandlestickSet::timestampChanged()
- \brief Emitted when the candlestick item timestamp is changed.
+ This signal is emitted when the candlestick item timestamp changes.
\sa timestamp
*/
/*!
- \qmlsignal CandlestickSet::timestampChanged()
- \brief Emitted when the candlestick item timestamp is changed.
- \sa timestamp
-
- The corresponding signal handler is \c {onTimestampChanged}.
-*/
-
-/*!
\fn void QCandlestickSet::openChanged()
- \brief Emitted when the candlestick item open value is changed.
+ This signal is emitted when the candlestick item open value changes.
\sa open
*/
/*!
- \qmlsignal CandlestickSet::openChanged()
- \brief Emitted when the candlestick item open value is changed.
- \sa open
-
- The corresponding signal handler is \c {onOpenChanged}.
-*/
-
-/*!
\fn void QCandlestickSet::highChanged()
- \brief Emitted when the candlestick item high value is changed.
+ This signal is emitted when the candlestick item high value changes.
\sa high
*/
/*!
- \qmlsignal CandlestickSet::highChanged()
- \brief Emitted when the candlestick item high value is changed.
- \sa high
-
- The corresponding signal handler is \c {onHighChanged}.
-*/
-
-/*!
\fn void QCandlestickSet::lowChanged()
- \brief Emitted when the candlestick item low value is changed.
- \sa low
-*/
-
-/*!
- \qmlsignal CandlestickSet::lowChanged()
- \brief Emitted when the candlestick item low value is changed.
+ This signal is emitted when the candlestick item low value changes.
\sa low
-
- The corresponding signal handler is \c {onLowChanged}.
*/
/*!
\fn void QCandlestickSet::closeChanged()
- \brief Emitted when the candlestick item close value is changed.
- \sa close
-*/
-
-/*!
- \qmlsignal CandlestickSet::closeChanged()
- \brief Emitted when the candlestick item close value is changed.
+ This signal is emitted when the candlestick item close value changes.
\sa close
-
- The corresponding signal handler is \c {onCloseChanged}.
*/
/*!
\fn void QCandlestickSet::brushChanged()
- \brief Emitted when the candlestick item brush is changed.
+ This signal is emitted when the candlestick item brush changes.
\sa brush
*/
/*!
\fn void QCandlestickSet::penChanged()
- \brief Emitted when the candlestick item pen is changed.
+ This signal is emitted when the candlestick item pen changes.
\sa pen
*/
/*!
- Constructs a QCandlestickSet with an optional \a timestamp and a \a parent.
+ Constructs a candlestick item with an optional \a timestamp and a \a parent.
*/
QCandlestickSet::QCandlestickSet(qreal timestamp, QObject *parent)
: QObject(parent),
@@ -283,7 +249,7 @@ QCandlestickSet::QCandlestickSet(qreal timestamp, QObject *parent)
}
/*!
- Constructs a QCandlestickSet with given ordered values. The values \a open, \a high, \a low
+ Constructs a candlestick item with given ordered values. The values \a open, \a high, \a low,
and \a close are mandatory. The values \a timestamp and \a parent are optional.
*/
QCandlestickSet::QCandlestickSet(qreal open, qreal high, qreal low, qreal close, qreal timestamp,
@@ -302,7 +268,7 @@ QCandlestickSet::QCandlestickSet(qreal open, qreal high, qreal low, qreal close,
}
/*!
- Destroys the set.
+ Destroys the candlestick item.
*/
QCandlestickSet::~QCandlestickSet()
{
diff --git a/src/charts/candlestickchart/qhcandlestickmodelmapper.cpp b/src/charts/candlestickchart/qhcandlestickmodelmapper.cpp
index 10874b68..bdcc95bb 100644
--- a/src/charts/candlestickchart/qhcandlestickmodelmapper.cpp
+++ b/src/charts/candlestickchart/qhcandlestickmodelmapper.cpp
@@ -36,31 +36,47 @@ QT_CHARTS_BEGIN_NAMESPACE
\class QHCandlestickModelMapper
\since 5.8
\inmodule Qt Charts
- \brief Horizontal model mapper for a candlestick series.
+ \brief The QHCandlestickModelMapper class is a horizontal model mapper for a candlestick series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A horizontal model mapper is used to create a connection
+ between a data model and QCandlestickSeries, so that each row in the data model defines a
+ candlestick item and each column maps to the open, high, low, close, and timestamp values
+ of the candlestick item.
+
+ Both model and candlestick series properties can be used to manipulate the data. The model
+ mapper keeps the candlestick series and the data model in sync.
- Model mappers allow the use of a QAbstractItemModel-derived model as a data source for a chart
- series, creating a connection between a QCandlestickSeries and the model object. A horizontal
- model mapper maintains an equal size across all \l {QCandlestickSet} {QCandlestickSets}, and
- reads the values of the set from the model's rows.
+ The model mapper ensures that all the candlestick items in the candlestick series have equal
+ sizes. Therefore, adding or removing a value from a candlestick item causes the same change to
+ be made in all the candlestick items in the candlestick series.
- \note The model used must support adding and removing rows/columns and modifying the data of the
- cells.
+ \sa QCandlestickSeries, QCandlestickSet, QVCandlestickModelMapper
*/
/*!
\qmltype HCandlestickModelMapper
- \since 2.2
+ \since QtCharts 2.2
\instantiates QHCandlestickModelMapper
\inqmlmodule QtCharts
\brief Horizontal model mapper for a candlestick series.
- HCandlestickModelMapper allows the use of a QAbstractItemModel-derived model with data in rows
- as a data source for a candlestick series. It's possible to manipulate the data either through
- QAbstractItemModel or QCandlestickSeries.
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A horizontal model mapper is used to create a connection
+ between a data model and CandlestickSeries, so that each row in the data model defines a
+ candlestick item and each column maps to the open, high, low, close, and timestamp values
+ of the candlestick item.
- The following QML example creates a candlestick series with three candlestick sets (assuming the
- model has at least four rows). Each candlestick set would contain data defined by timestamp,
- open, high, low and close columns. The name of a set would be defined by the vertical header of
+ Both model and candlestick series properties can be used to manipulate the data. The model
+ mapper keeps the candlestick series and the data model in sync.
+
+ The model mapper ensures that all the candlestick items in the candlestick series have equal
+ sizes. Therefore, adding or removing a value from a candlestick item causes the same change to
+ be made in all the candlestick items in the candlestick series.
+
+ The following QML example creates a candlestick series with three candlestick items (assuming
+ the model has at least four rows). Each candlestick item contains data defined by the timestamp,
+ open, high, low, and close columns. The name of an item is defined by the vertical header of
the row.
\qml
CandlestickSeries {
@@ -77,21 +93,21 @@ QT_CHARTS_BEGIN_NAMESPACE
}
\endqml
- \note HCandlestickModelMapper keeps the series and the model in sync.
+ \sa CandlestickSeries, CandlestickSet, VCandlestickModelMapper
*/
/*!
\qmlproperty QAbstractItemModel HCandlestickModelMapper::model
- \brief The QAbstractItemModel-based model that is used by the mapper. The model must be
+ The QAbstractItemModel-based model that is used by the mapper. The model must be
implemented and exposed to QML.
- \note The model used must support adding and removing rows/columns and modifying the data of the
- cells.
+ \note The model used must support adding and removing rows or columns and modifying the data of
+ the cells.
*/
/*!
\qmlproperty CandlestickSeries HCandlestickModelMapper::series
- \brief Defines the CandlestickSeries based object that is used by the mapper.
+ The CandlestickSeries based object that is used by the mapper.
All the data in the series is discarded when it is set to the mapper. When a new series is
specified, the old series is disconnected (preserving its data).
@@ -99,86 +115,103 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QHCandlestickModelMapper::timestampColumn
- \brief Defines the column of the model that contains the timestamp values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The column of the model that contains the timestamp values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::timestampColumn
- \brief Defines the column of the model that contains the timestamp values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The column of the model that contains the timestamp values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::openColumn
- \brief Defines the column of the model that contains the open values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The column of the model that contains the open values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::openColumn
- \brief Defines the column of the model that contains the open values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The column of the model that contains the open values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::highColumn
- \brief Defines the column of the model that contains the high values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The column of the model that contains the high values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::highColumn
- \brief Defines the column of the model that contains the high values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The column of the model that contains the high values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::lowColumn
- \brief Defines the column of the model that contains the low values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The column of the model that contains the low values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::lowColumn
- \brief Defines the column of the model that contains the low values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The column of the model that contains the low values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::closeColumn
- \brief Defines the column of the model that contains the close values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The column of the model that contains the close values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::closeColumn
- \brief Defines the column of the model that contains the close values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The column of the model that contains the close values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::firstSetRow
- \brief Defines the row of the model that is used as the data source for the first set. Default
- value is -1 (invalid mapping).
+ \brief The row of the model that is used as the data source for the first item.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::firstSetRow
- \brief Defines the row of the model that is used as the data source for the first set. Default
- value is -1 (invalid mapping).
+ The row of the model that is used as the data source for the first item.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QHCandlestickModelMapper::lastSetRow
- \brief Defines the row of the model that is used as the data source for the last set. Default
- value is -1 (invalid mapping).
+ \brief The row of the model that is used as the data source for the last item.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HCandlestickModelMapper::lastSetRow
- \brief Defines the row of the model that is used as the data source for the last set. Default
- value is -1 (invalid mapping).
+ The row of the model that is used as the data source for the last item.
+ The default value is -1 (invalid mapping).
*/
/*!
@@ -212,13 +245,13 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\fn void QHCandlestickModelMapper::firstSetRowChanged()
- \brief Emitted when the row of the model that contains the data of the first set is changed.
+ \brief Emitted when the row of the model that contains the data of the first item is changed.
\sa firstSetRow
*/
/*!
\fn void QHCandlestickModelMapper::lastSetRowChanged()
- \brief Emitted when the row of the model that contains the data of the last set is changed.
+ \brief Emitted when the row of the model that contains the data of the last item is changed.
\sa lastSetRow
*/
@@ -238,7 +271,7 @@ QHCandlestickModelMapper::QHCandlestickModelMapper(QObject *parent)
}
/*!
- Returns Qt::Horizontal. This means that values of the set are read from rows.
+ Returns Qt::Horizontal. This means that values of the item are read from rows.
*/
Qt::Orientation QHCandlestickModelMapper::orientation() const
{
diff --git a/src/charts/candlestickchart/qvcandlestickmodelmapper.cpp b/src/charts/candlestickchart/qvcandlestickmodelmapper.cpp
index 42278b51..968e72b3 100644
--- a/src/charts/candlestickchart/qvcandlestickmodelmapper.cpp
+++ b/src/charts/candlestickchart/qvcandlestickmodelmapper.cpp
@@ -36,32 +36,48 @@ QT_CHARTS_BEGIN_NAMESPACE
\class QVCandlestickModelMapper
\since 5.8
\inmodule Qt Charts
- \brief Vertical model mapper for a candlestick series.
+ \brief The QVCandlestickModelMapper class is a vertical model mapper for a candlestick series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and QCandlestickSeries, so that each column in the data model defines a
+ candlestick item and each row maps to the open, high, low, close, and timestamp values
+ of the candlestick item.
+
+ Both model and candlestick series properties can be used to manipulate the data. The model
+ mapper keeps the candlestick series and the data model in sync.
- Model mappers allow the use of a QAbstractItemModel-derived model as a data source for a chart
- series, creating a connection between a QCandlestickSeries and the model object. A vertical
- model mapper maintains an equal size across all \l {QCandlestickSet} {QCandlestickSets}, and
- reads the values of the set from the model's columns.
+ The model mapper ensures that all the candlestick items in the candlestick series have equal
+ sizes. Therefore, adding or removing a value from a candlestick item causes the same change to
+ be made in all the candlestick items in the candlestick series.
- \note The model used must support adding and removing rows/columns and modifying the data of the
- cells.
+ \sa QCandlestickSeries, QCandlestickSet, QHCandlestickModelMapper
*/
/*!
\qmltype VCandlestickModelMapper
- \since 2.2
+ \since QtCharts 2.2
\instantiates QVCandlestickModelMapper
\inqmlmodule QtCharts
\brief Vertical model mapper for a candlestick series.
- VCandlestickModelMapper allows the use of a QAbstractItemModel-derived model with data in
- columns as a data source for a candlestick series. It's possible to manipulate the data either
- through QAbstractItemModel or QCandlestickSeries.
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and CandlestickSeries, so that each column in the data model defines a
+ candlestick item and each row maps to the open, high, low, close, and timestamp values
+ of the candlestick item.
- The following QML example creates a candlestick series with three candlestick sets (assuming the
- model has at least four columns). Each candlestick set would contain data defined by timestamp,
- open, high, low and close rows. The name of a set would be defined by the horizontal header of
- the column.
+ Both model and candlestick series properties can be used to manipulate the data. The model
+ mapper keeps the candlestick series and the data model in sync.
+
+ The model mapper ensures that all the candlestick items in the candlestick series have equal
+ sizes. Therefore, adding or removing a value from a candlestick item causes the same change to
+ be made in all the candlestick items in the candlestick series.
+
+ The following QML example creates a candlestick series with three candlestick items (assuming
+ the model has at least four columns). Each candlestick item contains data defined by the
+ timestamp, open, high, low, and close rows. The name of an item is defined by the horizontal
+ header of the column.
\qml
CandlestickSeries {
VCandlestickModelMapper {
@@ -77,108 +93,125 @@ QT_CHARTS_BEGIN_NAMESPACE
}
\endqml
- \note VCandlestickModelMapper keeps the series and the model in sync.
+ \sa CandlestickSeries, CandlestickSet, HCandlestickModelMapper
*/
/*!
\qmlproperty QAbstractItemModel VCandlestickModelMapper::model
- \brief The QAbstractItemModel-based model that is used by the mapper. The model must be
+ The QAbstractItemModel-based model that is used by the mapper. The model must be
implemented and exposed to QML.
- \note The model used must support adding and removing rows/columns and modifying the data of the
- cells.
+ \note The model used must support adding and removing rows or columns and modifying the data of
+ the cells.
*/
/*!
\qmlproperty CandlestickSeries VCandlestickModelMapper::series
- \brief Defines the CandlestickSeries based object that is used by the mapper.
+ The CandlestickSeries based object that is used by the mapper.
All the data in the series is discarded when it is set to the mapper. When a new series is
- specified, the old series is disconnected (preserving its data).
+ specified, the old series is disconnected (but it preserves its data).
*/
/*!
\property QVCandlestickModelMapper::timestampRow
- \brief Defines the row of the model that contains the timestamp values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The row of the model that contains the timestamp values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::timestampRow
- \brief Defines the row of the model that contains the timestamp values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The row of the model that contains the timestamp values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::openRow
- \brief Defines the row of the model that contains the open values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The row of the model that contains the open values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::openRow
- \brief Defines the row of the model that contains the open values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The row of the model that contains the open values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::highRow
- \brief Defines the row of the model that contains the high values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The row of the model that contains the high values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::highRow
- \brief Defines the row of the model that contains the high values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The row of the model that contains the high values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::lowRow
- \brief Defines the row of the model that contains the low values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The row of the model that contains the low values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::lowRow
- \brief Defines the row of the model that contains the low values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The row of the model that contains the low values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::closeRow
- \brief Defines the row of the model that contains the close values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ \brief The row of the model that contains the close values of the
+ candlestick items in the series.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::closeRow
- \brief Defines the row of the model that contains the close values of the
- \l {QCandlestickSet} {QCandlestickSets} in the series. Default value is -1 (invalid mapping).
+ The row of the model that contains the close values of the
+ candlestick items in the series. The default value is -1
+ (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::firstSetColumn
- \brief Defines the column of the model that is used as the data source for the first set.
- Default value is -1 (invalid mapping).
+ \brief The column of the model that is used as the data source for the first item.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::firstSetColumn
- \brief Defines the column of the model that is used as the data source for the first set.
- Default value is -1 (invalid mapping).
+ The column of the model that is used as the data source for the first item.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QVCandlestickModelMapper::lastSetColumn
- \brief Defines the column of the model that is used as the data source for the last set. Default
- value is -1 (invalid mapping).
+ \brief The column of the model that is used as the data source for the last item.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VCandlestickModelMapper::lastSetColumn
- \brief Defines the column of the model that is used as the data source for the last set. Default
- value is -1 (invalid mapping).
+ The column of the model that is used as the data source for the last item.
+ The default value is -1 (invalid mapping).
*/
/*!
@@ -213,13 +246,13 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\fn void QVCandlestickModelMapper::firstSetColumnChanged()
- \brief Emitted when the column of the model that contains the data of the first set is changed.
+ \brief Emitted when the column of the model that contains the data of the first item is changed.
\sa firstSetColumn
*/
/*!
\fn void QVCandlestickModelMapper::lastSetColumnChanged()
- \brief Emitted when the column of the model that contains the data of the last set is changed.
+ \brief Emitted when the column of the model that contains the data of the last item is changed.
\sa lastSetColumn
*/
@@ -239,7 +272,7 @@ QVCandlestickModelMapper::QVCandlestickModelMapper(QObject *parent)
}
/*!
- Returns Qt::Vertical. This means that values of the set are read from columns.
+ Returns Qt::Vertical. This means that values of the item are read from columns.
*/
Qt::Orientation QVCandlestickModelMapper::orientation() const
{
diff --git a/src/charts/legend/qarealegendmarker.cpp b/src/charts/legend/qarealegendmarker.cpp
index 2f7b7fd4..6b5dca0c 100644
--- a/src/charts/legend/qarealegendmarker.cpp
+++ b/src/charts/legend/qarealegendmarker.cpp
@@ -37,16 +37,17 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QAreaLegendMarker
\inmodule Qt Charts
- \brief QLegendMarker subclass for area series.
+ \brief The QAreaLegendMarker class is a legend marker for an area series.
- QAreaLegendMarker is related to QAreaSeries. One QAreaSeries results in one marker.
+ An area legend marker is related to a QAreaSeries object, so that one area series
+ results in one marker.
\sa QLegend, QAreaSeries
*/
/*!
\fn virtual LegendMarkerType QAreaLegendMarker::type()
- Returns QLegendMarker::LegendMarkerTypeArea
+ \reimp
*/
/*!
@@ -59,7 +60,7 @@ QAreaLegendMarker::QAreaLegendMarker(QAreaSeries *series, QLegend *legend, QObje
}
/*!
- Destructor
+ Removes the legend marker for an area series.
*/
QAreaLegendMarker::~QAreaLegendMarker()
{
@@ -74,7 +75,7 @@ QAreaLegendMarker::QAreaLegendMarker(QAreaLegendMarkerPrivate &d, QObject *paren
}
/*!
- Returns related series of marker
+ \reimp
*/
QAreaSeries* QAreaLegendMarker::series()
{
diff --git a/src/charts/legend/qbarlegendmarker.cpp b/src/charts/legend/qbarlegendmarker.cpp
index f4b4c5eb..14d920aa 100644
--- a/src/charts/legend/qbarlegendmarker.cpp
+++ b/src/charts/legend/qbarlegendmarker.cpp
@@ -37,16 +37,17 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QBarLegendMarker
\inmodule Qt Charts
- \brief QLegendMarker subclass for bar series.
+ \brief The QBarLegendMarker class is a legend marker for a bar series.
- QBarLegendMarker is related to QAbstractBarSeries derived classes. With bar series, each marker is related to one QBarSet.
+ A bar legend marker is related to QAbstractBarSeries derived classes. With a bar series,
+ each marker is related to one QBarSet.
\sa QLegend, QAbstractBarSeries, QBarSet
*/
/*!
\fn virtual LegendMarkerType QBarLegendMarker::type()
- Returns QLegendMarker::LegendMarkerTypeBar
+ \reimp
*/
/*!
@@ -60,7 +61,7 @@ QBarLegendMarker::QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset,
}
/*!
- Desturctor
+ Removes the legend marker for a bar set.
*/
QBarLegendMarker::~QBarLegendMarker()
{
@@ -75,7 +76,7 @@ QBarLegendMarker::QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent)
}
/*!
- Returns the related series of marker
+ \reimp
*/
QAbstractBarSeries *QBarLegendMarker::series()
{
@@ -84,7 +85,7 @@ QAbstractBarSeries *QBarLegendMarker::series()
}
/*!
- Returns the related barset of marker
+ Returns the bar set related to the marker.
*/
QBarSet* QBarLegendMarker::barset()
{
diff --git a/src/charts/legend/qboxplotlegendmarker.cpp b/src/charts/legend/qboxplotlegendmarker.cpp
index 3785cbe1..b960d8fe 100644
--- a/src/charts/legend/qboxplotlegendmarker.cpp
+++ b/src/charts/legend/qboxplotlegendmarker.cpp
@@ -37,16 +37,16 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QBoxPlotLegendMarker
\inmodule Qt Charts
- \brief QLegendMarker subclass for box plot series.
+ \brief The QBoxPlotLegendMarker class is a legend marker for a box plot series.
- QBoxPlotLegendMarker is related to QBoxPlotSeries classes.
+ A box plot legend marker is related to a QBoxPlotSeries object.
\sa QLegend, QBoxPlotSeries
*/
/*!
\fn virtual LegendMarkerType QBoxPlotLegendMarker::type()
- Returns QLegendMarker::LegendMarkerTypeBoxPlot
+ \reimp
*/
/*!
@@ -59,7 +59,7 @@ QBoxPlotLegendMarker::QBoxPlotLegendMarker(QBoxPlotSeries *series, QLegend *lege
}
/*!
- Destructor
+ Removes the legend marker for a box plot series.
*/
QBoxPlotLegendMarker::~QBoxPlotLegendMarker()
{
@@ -74,7 +74,7 @@ QBoxPlotLegendMarker::QBoxPlotLegendMarker(QBoxPlotLegendMarkerPrivate &d, QObje
}
/*!
- Returns the related series
+ \reimp
*/
QBoxPlotSeries* QBoxPlotLegendMarker::series()
{
diff --git a/src/charts/legend/qcandlesticklegendmarker.cpp b/src/charts/legend/qcandlesticklegendmarker.cpp
index 97208e3c..4d5890bf 100644
--- a/src/charts/legend/qcandlesticklegendmarker.cpp
+++ b/src/charts/legend/qcandlesticklegendmarker.cpp
@@ -34,6 +34,21 @@
QT_CHARTS_BEGIN_NAMESPACE
+/*!
+ \class QCandlestickLegendMarker
+ \inmodule Qt Charts
+ \since 5.8
+ \brief The QCandlestickLegendMarker class is a legend marker for a candlestick series.
+
+ QCandlestickLegendMarker is related to QCandlestickSeries, so that one candlestick series
+ results in one marker.
+
+ \sa QLegend, QCandlestickSeries
+*/
+
+/*!
+ \internal
+*/
QCandlestickLegendMarker::QCandlestickLegendMarker(QCandlestickSeries *series, QLegend *legend,
QObject *parent)
: QLegendMarker(*new QCandlestickLegendMarkerPrivate(this, series, legend), parent)
@@ -47,11 +62,17 @@ QCandlestickLegendMarker::~QCandlestickLegendMarker()
{
}
+/*!
+ \reimp
+*/
QLegendMarker::LegendMarkerType QCandlestickLegendMarker::type()
{
return LegendMarkerTypeCandlestick;
}
+/*!
+ \reimp
+*/
QCandlestickSeries* QCandlestickLegendMarker::series()
{
Q_D(QCandlestickLegendMarker);
diff --git a/src/charts/legend/qlegend.cpp b/src/charts/legend/qlegend.cpp
index 716e0f06..219d790e 100644
--- a/src/charts/legend/qlegend.cpp
+++ b/src/charts/legend/qlegend.cpp
@@ -49,12 +49,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\class QLegend
\inmodule Qt Charts
\inherits QGraphicsWidget
- \brief Legend object.
+ \brief The QLegend class displays the legend of a chart.
- QLegend is a graphical object for displaying the legend of the chart. Legend state is updated by QChart, when
- series have been changed. By default, legend is drawn by QChart, but user can set a new parent to legend and
- handle the drawing manually.
- User isn't supposed to create or delete legend objects, but can reference it via QChart class.
+ A legend is a graphical object that displays the legend of a chart. The legend state is updated
+ by QChart when series change. By default, the legend is attached to the chart, but it can be
+ detached to make it independent of chart layout. Legend objects cannot be created or deleted,
+ but they can be referenced via the QChart class.
\image examples_percentbarchart_legend.png
@@ -65,10 +65,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\instantiates QLegend
\inqmlmodule QtCharts
- \brief Legend is part of Qt Chart QML API.
+ \brief Displays the legend of a chart.
- Legend is a graphical object, which displays legend of the chart. Legend state is updated by
- ChartView, when series have been changed. Legend is used via ChartView class. For example:
+ A legend is a graphical object that displays the legend of a chart. The legend state is updated
+ by the ChartView type when series change. The \l Legend type properties can be attached to the
+ ChartView type. For example:
\code
ChartView {
legend.visible: true
@@ -79,39 +80,36 @@ QT_CHARTS_BEGIN_NAMESPACE
\image examples_percentbarchart_legend.png
- Please note that there is no QML API available for modifying legend markers, unlike in the Qt
- API of Charts. The use case of modifying markers can be implemented for example by creating your
- own custom legend. For an example on how to do this,
- see \l {qmlcustomlegend}{Qml Custom Example} application.
+ \note There is no QML API available for modifying legend markers. Markers can be modified by
+ creating a custom legend, as illustrated by \l {qmlcustomlegend}{Qml Custom Example}.
*/
/*!
\property QLegend::alignment
- \brief The alignment of the legend.
+ \brief How the legend is aligned with the chart.
- Legend paints on the defined position in the chart. The following alignments are supported:
- Qt::AlignTop, Qt::AlignBottom, Qt::AlignLeft, Qt::AlignRight. If you set more than one flag the result is undefined.
+ Can be Qt::AlignTop, Qt::AlignBottom, Qt::AlignLeft, Qt::AlignRight. If you set more than one
+ flag, the result is undefined.
*/
/*!
- \qmlproperty Qt.Alignment Legend::alignment
- \brief The alignment of the legend.
-
- Legend paints on the defined position in the chart. The following alignments are supported:
- Qt.AlignTop, Qt.AlignBottom, Qt.AlignLeft, Qt.AlignRight. If you set more than one flag the result is undefined.
+ \qmlproperty alignment Legend::alignment
+ Defines how the legend is aligned with the chart. Can be \l{Qt::AlignLeft}{Qt.AlignLeft},
+ \l{Qt::AlignRight}{Qt.AlignRight}, \l{Qt::AlignBottom}{Qt.AlignBottom}, or
+ \l{Qt::AlignTop}{Qt.AlignTop}. If you set more than one flag, the result is undefined.
*/
/*!
\property QLegend::backgroundVisible
- Whether the legend background is visible or not.
+ \brief Whether the legend background is visible.
*/
/*!
\qmlproperty bool Legend::backgroundVisible
- Whether the legend background is visible or not.
+ Whether the legend background is visible.
*/
/*!
\qmlproperty bool Legend::visible
- \brief Whether the legend is visible or not.
+ Whether the legend is visible.
By default, this property is \c true.
\sa QGraphicsObject::visible
@@ -119,55 +117,60 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QLegend::color
- The color of the legend, i.e. the background (brush) color. Note that if you change the color
- of the legend, the style of the legend brush is set to Qt::SolidPattern.
+ \brief The background (brush) color of the legend.
+
+ If you change the color of the legend, the style of the legend brush is set to
+ Qt::SolidPattern.
*/
/*!
\qmlproperty color Legend::color
- The color of the legend, i.e. the background (brush) color.
+ The background (brush) color of the legend.
*/
/*!
\property QLegend::borderColor
- The border color of the legend, i.e. the line color.
+ \brief The line color of the legend.
*/
/*!
\qmlproperty color Legend::borderColor
- The border color of the legend, i.e. the line color.
+ The line color of the legend.
*/
/*!
\property QLegend::font
- The font of markers used by legend.
+ \brief The font of the markers used by the legend.
*/
/*!
\qmlproperty Font Legend::font
- The font of markers used by legend.
+ The font of the markers used by the legend.
*/
/*!
\property QLegend::labelColor
- The color of brush used to draw labels.
+ \brief The color of the brush used to draw labels.
*/
/*!
\qmlproperty color Legend::labelColor
- The color of brush used to draw labels.
+ The color of the brush used to draw labels.
*/
/*!
\property QLegend::reverseMarkers
- Whether reverse order is used for the markers in legend or not. False by default.
+ \brief Whether reverse order is used for the markers in the legend.
+
+ This property is \c false by default.
*/
/*!
\qmlproperty bool Legend::reverseMarkers
- Whether reverse order is used for the markers in legend or not. False by default.
+ Whether reverse order is used for the markers in the legend. This property
+ is \c false by default.
*/
/*!
\property QLegend::showToolTips
- Whether tooltips are shown when the text is truncated. This is false by default.
+ \brief Whether tooltips are shown when the text is truncated.
- This will not have any effect when used in QML.
+ This property is \c false by default.
*/
/*!
@@ -213,38 +216,40 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlproperty bool Legend::showToolTips
- Whether tooltips are shown when the text is truncated. This is false by default.
- This currently has no effect as there is no support for tooltips in QML.
+ Whether tooltips are shown when the text is truncated. This property is \c false by default.
+ This property currently has no effect as there is no support for tooltips in QML.
*/
/*!
\fn void QLegend::backgroundVisibleChanged(bool)
- The visibility of the legend background changed to \a visible.
+ This signal is emitted when the visibility of the legend background changes to \a visible.
*/
/*!
\fn void QLegend::colorChanged(QColor)
- The color of the legend background changed to \a color.
+ This signal is emitted when the color of the legend background changes to \a color.
*/
/*!
\fn void QLegend::borderColorChanged(QColor)
- The border color of the legend background changed to \a color.
+ This signal is emitted when the border color of the legend background changes to \a color.
*/
/*!
\fn void QLegend::fontChanged(QFont)
- The font of markers of the legend changed to \a font.
+ This signal is emitted when the font of the markers of the legend changes to \a font.
*/
/*!
\fn void QLegend::labelColorChanged(QColor color)
- This signal is emitted when the color of brush used to draw labels has changed to \a color.
+ This signal is emitted when the color of the brush used to draw the legend
+ labels changes to \a color.
*/
/*!
\fn void QLegend::reverseMarkersChanged(bool)
- The use of reverse order for the markers in legend is changed to \a reverseMarkers.
+ This signal is emitted when the use of reverse order for the markers in the
+ legend is changed to \a reverseMarkers.
*/
/*!
@@ -263,7 +268,8 @@ QLegend::QLegend(QChart *chart): QGraphicsWidget(chart),
}
/*!
- Destroys the legend object. Legend is always owned by a QChart, so an application should never call this.
+ Destroys the legend object. The legend is always owned by a QChart, so an application
+ should never call this function.
*/
QLegend::~QLegend()
{
@@ -288,7 +294,7 @@ void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
/*!
- Sets the \a brush of legend. Brush affects the background of legend.
+ Sets the \a brush that is used to draw the background of the legend.
*/
void QLegend::setBrush(const QBrush &brush)
{
@@ -300,7 +306,7 @@ void QLegend::setBrush(const QBrush &brush)
}
/*!
- Returns the brush used by legend.
+ Returns the brush used by the legend.
*/
QBrush QLegend::brush() const
{
@@ -326,7 +332,7 @@ QColor QLegend::color()
}
/*!
- Sets the \a pen of legend. Pen affects the legend borders.
+ Sets the \a pen that is used to draw the legend borders.
*/
void QLegend::setPen(const QPen &pen)
{
@@ -338,7 +344,7 @@ void QLegend::setPen(const QPen &pen)
}
/*!
- Returns the pen used by legend.
+ Returns the pen used by the legend.
*/
QPen QLegend::pen() const
@@ -383,7 +389,7 @@ QColor QLegend::borderColor()
}
/*!
- Set brush used to draw labels to \a brush.
+ Sets the brush used to draw the legend labels to \a brush.
*/
void QLegend::setLabelBrush(const QBrush &brush)
{
@@ -400,7 +406,7 @@ void QLegend::setLabelBrush(const QBrush &brush)
}
/*!
- Brush used to draw labels.
+ Returns the brush used to draw labels.
*/
QBrush QLegend::labelBrush() const
{
@@ -440,7 +446,7 @@ Qt::Alignment QLegend::alignment() const
}
/*!
- Detaches the legend from chart. Chart won't change layout of the legend.
+ Detaches the legend from the chart. The chart will no longer adjust the layout of the legend.
*/
void QLegend::detachFromChart()
{
@@ -452,7 +458,7 @@ void QLegend::detachFromChart()
}
/*!
- Attaches the legend to chart. Chart may change layout of the legend.
+ Attaches the legend to a chart. The chart may adjust the layout of the legend.
*/
void QLegend::attachToChart()
{
@@ -463,7 +469,7 @@ void QLegend::attachToChart()
}
/*!
- Returns true, if legend is attached to chart.
+ Returns \c true, if the legend is attached to a chart.
*/
bool QLegend::isAttachedToChart()
{
@@ -471,7 +477,7 @@ bool QLegend::isAttachedToChart()
}
/*!
- Sets the visibility of legend background to \a visible
+ Sets the visibility of the legend background to \a visible.
*/
void QLegend::setBackgroundVisible(bool visible)
{
@@ -483,7 +489,7 @@ void QLegend::setBackgroundVisible(bool visible)
}
/*!
- Returns the visibility of legend background
+ Returns the visibility of the legend background.
*/
bool QLegend::isBackgroundVisible() const
{
@@ -491,8 +497,8 @@ bool QLegend::isBackgroundVisible() const
}
/*!
- Returns the list of markers in legend. The list can be filtered with \a series parameter.
- If \a series is given, only markers related to that series are returned.
+ Returns the list of markers in the legend. The list can be filtered by specifying
+ the \a series for which the markers are returned.
*/
QList<QLegendMarker*> QLegend::markers(QAbstractSeries *series) const
{
@@ -514,7 +520,7 @@ void QLegend::setReverseMarkers(bool reverseMarkers)
}
/*!
- Returns whether the tooltips are shown or not for the legend labels
+ Returns whether the tooltips are shown for the legend labels
when they are elided.
*/
@@ -524,9 +530,9 @@ bool QLegend::showToolTips() const
}
/*!
- When \a show is true, the legend labels will show a tooltip when
+ When \a show is \c true, the legend labels will show a tooltip when
the mouse hovers over them if the label itself is shown elided.
- This is false by default.
+ This is \c false by default.
*/
void QLegend::setShowToolTips(bool show)
@@ -556,7 +562,8 @@ void QLegend::setMarkerShape(QLegend::MarkerShape shape)
}
/*!
- \internal \a event see QGraphicsWidget for details
+ \internal
+ \a event, see QGraphicsWidget for details.
*/
void QLegend::hideEvent(QHideEvent *event)
{
@@ -565,7 +572,8 @@ void QLegend::hideEvent(QHideEvent *event)
QGraphicsWidget::hideEvent(event);
}
/*!
- \internal \a event see QGraphicsWidget for details
+ \internal
+ \a event, see QGraphicsWidget for details.
*/
void QLegend::showEvent(QShowEvent *event)
{
diff --git a/src/charts/legend/qlegendmarker.cpp b/src/charts/legend/qlegendmarker.cpp
index 6ec29cd9..eb5530c4 100644
--- a/src/charts/legend/qlegendmarker.cpp
+++ b/src/charts/legend/qlegendmarker.cpp
@@ -42,12 +42,13 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QLegendMarker
\inmodule Qt Charts
- \brief LegendMarker object.
+ \brief The QLegendMarker class is an abstract object that can be used to access
+ markers within a legend.
- QLegendMarker is abstract object that can be used to access markers inside QLegend. Legend marker consists of two
- items: The colored box, which reflects the color of series and label, which is the name of series (or label of slice/barset
- in case of pie or bar series)
- The QLegendMarker is always related to one series.
+ A legend marker consists of an icon and a label. The icon color corresponds to the color
+ used to draw a series and the label displays the name of the series (or the label of the
+ slice for a pie series or bar set for a bar series). A legend marker is always related to
+ one series, slice, or bar set.
\image examples_percentbarchart_legend.png
@@ -55,37 +56,47 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
\enum QLegendMarker::LegendMarkerType
+ \since 5.8
- The type of the legendmarker object.
+ The type of the legend marker object.
\value LegendMarkerTypeArea
+ A legend marker for an area series.
\value LegendMarkerTypeBar
+ A legend marker for a bar set.
\value LegendMarkerTypePie
+ A legend marker for a pie slice.
\value LegendMarkerTypeXY
+ A legend marker for a line, spline, or scatter series.
\value LegendMarkerTypeBoxPlot
+ A legend marker for a box plot series.
\value LegendMarkerTypeCandlestick
+ A legend marker for a candlestick series.
*/
/*!
\fn virtual LegendMarkerType QLegendMarker::type() = 0;
- Returns the type of legendmarker. Type depends of the related series. LegendMarkerTypeXY is used for all QXYSeries derived
- classes.
+ Returns the type of the legend marker for the related series, pie slice, or bar set.
+
+ \sa LegendMarkerType
*/
/*!
\fn virtual QAbstractSeries* QLegendMarker::series() = 0;
- Returns pointer to series, which is related to this marker. Marker is always related to some series.
+ Returns a pointer to the series that is related to this legend marker. A legend marker
+ is always related to a series.
*/
/*!
\fn void QLegendMarker::clicked();
- This signal is emitted, when marker is clicked with mouse.
+ This signal is emitted when the legend marker is clicked.
*/
/*!
\fn void QLegendMarker::hovered(bool status);
- This signal is emitted, when mouse is hovered over marker. \a status is true, when mouse enters the marker
- and false when it leaves the marker.
+ This signal is emitted when a mouse is hovered over the legend marker.
+ When the mouse moves over the marker, \a status turns \c true, and when
+ the mouse moves away again, it turns \c false.
*/
/*!
@@ -120,32 +131,34 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QLegendMarker::label
- Label of the marker. This is the text that is shown in legend.
+ \brief The text shown in the legend for a legend marker.
*/
/*!
\property QLegendMarker::labelBrush
- Brush of the label
+ \brief The brush of the label.
*/
/*!
\property QLegendMarker::font
- Font of the label
+ \brief The font of the label.
*/
/*!
\property QLegendMarker::pen
- Pen of the marker. This is the outline of the colored square.
+ \brief The pen used to draw the outline of the icon.
*/
/*!
\property QLegendMarker::brush
- Brush of the marker. This is the inside of the colored square.
+ \brief The brush used to fill the icon.
*/
/*!
\property QLegendMarker::visible
- Visibility of the legend marker. Affects label and the colored square.
+ \brief The visibility of the legend marker.
+
+ The visibility affects both the legend marker label and the icon.
*/
/*!
@@ -166,7 +179,7 @@ QLegendMarker::QLegendMarker(QLegendMarkerPrivate &d, QObject *parent) :
}
/*!
- Destructor of marker
+ Removes the legend marker.
*/
QLegendMarker::~QLegendMarker()
{
@@ -181,7 +194,9 @@ QString QLegendMarker::label() const
}
/*!
- Sets the \a label of marker. Note that changing name of series will also change label of its marker.
+ Sets the label of the marker to \a label.
+
+ \note Changing the name of a series also changes the label of its marker.
*/
void QLegendMarker::setLabel(const QString &label)
{
@@ -193,7 +208,7 @@ void QLegendMarker::setLabel(const QString &label)
}
}
/*!
- Returns the brush which is used to draw label.
+ Returns the brush that is used to draw the label.
*/
QBrush QLegendMarker::labelBrush() const
{
@@ -201,7 +216,7 @@ QBrush QLegendMarker::labelBrush() const
}
/*!
- Sets the \a brush of label
+ Sets the the brush used to draw to label to \a brush.
*/
void QLegendMarker::setLabelBrush(const QBrush &brush)
{
@@ -209,7 +224,7 @@ void QLegendMarker::setLabelBrush(const QBrush &brush)
}
/*!
- Retuns the font of label
+ Retuns the font of the label.
*/
QFont QLegendMarker::font() const
{
@@ -217,7 +232,7 @@ QFont QLegendMarker::font() const
}
/*!
- Sets the \a font of label
+ Sets the font of the label to \a font.
*/
void QLegendMarker::setFont(const QFont &font)
{
@@ -225,7 +240,7 @@ void QLegendMarker::setFont(const QFont &font)
}
/*!
- Returns the pen of marker item
+ Returns the pen used to draw the outline of the icon.
*/
QPen QLegendMarker::pen() const
{
@@ -233,7 +248,7 @@ QPen QLegendMarker::pen() const
}
/*!
- Sets the \a pen of marker item
+ Sets the \a pen used to draw the outline of the icon to \a pen.
*/
void QLegendMarker::setPen(const QPen &pen)
{
@@ -246,7 +261,7 @@ void QLegendMarker::setPen(const QPen &pen)
}
/*!
- Returns the brush of marker item
+ Returns the brush used to fill the icon.
*/
QBrush QLegendMarker::brush() const
{
@@ -254,7 +269,9 @@ QBrush QLegendMarker::brush() const
}
/*!
- Sets the \a brush of marker item. Note that changing color of the series also changes this.
+ Sets the brush used to fill the icon to \a brush.
+
+ \note Changing the color of the series also changes the color of the icon.
*/
void QLegendMarker::setBrush(const QBrush &brush)
{
@@ -267,7 +284,7 @@ void QLegendMarker::setBrush(const QBrush &brush)
}
/*!
- Returns visibility of the marker
+ Returns the visibility of the marker.
*/
bool QLegendMarker::isVisible() const
{
@@ -275,7 +292,7 @@ bool QLegendMarker::isVisible() const
}
/*!
- Sets markers visibility to \a visible
+ Sets the marker's visibility to \a visible.
*/
void QLegendMarker::setVisible(bool visible)
{
diff --git a/src/charts/legend/qpielegendmarker.cpp b/src/charts/legend/qpielegendmarker.cpp
index 14c0b087..0d374d45 100644
--- a/src/charts/legend/qpielegendmarker.cpp
+++ b/src/charts/legend/qpielegendmarker.cpp
@@ -37,16 +37,17 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QPieLegendMarker
\inmodule Qt Charts
- \brief QLegendMarker subclass for pie series.
+ \brief The QPieLegendMarker class is a legend marker for a pie series.
- QPieLegendMarker is related to QPieSeries. With QPieSeries, each slice of pie is related to one marker in QLegend.
+ A pie legend marker is related to QPieSeries. With a pie series, each slice of the pie
+ is related to one marker in the legend.
\sa QLegend, QPieSeries, QPieSlice
*/
/*!
\fn virtual LegendMarkerType QPieLegendMarker::type()
- Returns QLegendMarker::LegendMarkerTypePie
+ \reimp
*/
/*!
@@ -59,7 +60,7 @@ QPieLegendMarker::QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend
}
/*!
- Destructor
+ Removes the legend marker for a pie series.
*/
QPieLegendMarker::~QPieLegendMarker()
{
@@ -74,7 +75,7 @@ QPieLegendMarker::QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent)
}
/*!
- Returns the related series of marker.
+ \reimp
*/
QPieSeries* QPieLegendMarker::series()
{
@@ -83,7 +84,7 @@ QPieSeries* QPieLegendMarker::series()
}
/*!
- Returns the related slice of marker.
+ Returns the slice of the pie related to the marker.
*/
QPieSlice* QPieLegendMarker::slice()
{
diff --git a/src/charts/legend/qxylegendmarker.cpp b/src/charts/legend/qxylegendmarker.cpp
index 3ade52e9..5f1859c4 100644
--- a/src/charts/legend/qxylegendmarker.cpp
+++ b/src/charts/legend/qxylegendmarker.cpp
@@ -38,16 +38,17 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QXYLegendMarker
\inmodule Qt Charts
- \brief QLegendMarker subclass for QXYSeries.
+ \brief The QXYLegendMarker class is a legend marker for a line, spline, or scatter series.
- QXYLegendMarker is related to QXYSeries derived classes. Each marker is related to one series.
+ An XY legend marker is related to QXYSeries derived classes: QLineSeries, QSplineSeries,
+ and QScatterSeries. Each marker is related to one series.
\sa QLegend, QXYSeries, QSplineSeries, QScatterSeries, QLineSeries
*/
/*!
\fn virtual LegendMarkerType QXYLegendMarker::type()
- Returns QLegendMarker::LegendMarkerTypeXY
+ \reimp
*/
/*!
@@ -60,7 +61,7 @@ QXYLegendMarker::QXYLegendMarker(QXYSeries *series, QLegend *legend, QObject *pa
}
/*!
- Destructor
+ Removes the legend marker for a line, spline, or scatter series.
*/
QXYLegendMarker::~QXYLegendMarker()
{
@@ -75,7 +76,7 @@ QXYLegendMarker::QXYLegendMarker(QXYLegendMarkerPrivate &d, QObject *parent) :
}
/*!
- Returns the related series
+ \reimp
*/
QXYSeries* QXYLegendMarker::series()
{
diff --git a/src/charts/linechart/qlineseries.cpp b/src/charts/linechart/qlineseries.cpp
index 77017b56..b055a896 100644
--- a/src/charts/linechart/qlineseries.cpp
+++ b/src/charts/linechart/qlineseries.cpp
@@ -38,14 +38,14 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QLineSeries
\inmodule Qt Charts
- \brief The QLineSeries class is used for making line charts.
+ \brief The QLineSeries class presents data in line charts.
A line chart is used to show information as a series of data points
connected by straight lines.
\image examples_linechart.png
- Creating basic line chart is simple:
+ Creating a basic line chart is simple:
\code
QLineSeries* series = new QLineSeries();
series->append(0, 6);
@@ -61,9 +61,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits XYSeries
- \brief The LineSeries type is used for making line charts.
+ \brief Presents data in line charts.
- The following QML shows how to create a simple line chart:
+ A line chart is used to show information as a series of data points
+ connected by straight lines.
+
+ The following QML example shows how to create a simple line chart:
\snippet qmlchart/qml/qmlchart/View2.qml 1
\beginfloatleft
\image examples_qmlchart2.png
@@ -72,32 +75,34 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \fn virtual SeriesType QLineSeries::type() const
- \brief Returns type of series.
- \sa QAbstractSeries, SeriesType
-*/
-
-/*!
\qmlproperty real LineSeries::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 LineSeries::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 LineSeries::capStyle
- Controls the cap style of the line. Set to one of Qt.FlatCap, Qt.SquareCap or Qt.RoundCap. By
+ 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
*/
/*!
- Constructs empty series object which is a child of \a parent.
- When series object is added to QChartView or QChart instance ownerships is transferred.
+ Constructs an empty series object that is a child of \a parent.
+ When the series object is added to a QChartView or QChart instance, the ownership
+ is transferred.
*/
QLineSeries::QLineSeries(QObject *parent)
: QXYSeries(*new QLineSeriesPrivate(this), parent)
@@ -114,8 +119,8 @@ QLineSeries::QLineSeries(QLineSeriesPrivate &d, QObject *parent)
}
/*!
- Destroys the object. Series added to QChartView or QChart instances are owned by those,
- and are deleted when mentioned object are destroyed.
+ Destroys the object. Series added to QChartView or QChart instances are owned by the
+ instances and deleted when the instances are destroyed.
*/
QLineSeries::~QLineSeries()
{
@@ -124,6 +129,9 @@ QLineSeries::~QLineSeries()
d->m_chart->removeSeries(this);
}
+/*!
+ \reimp
+*/
QAbstractSeries::SeriesType QLineSeries::type() const
{
return QAbstractSeries::SeriesTypeLine;
diff --git a/src/charts/piechart/qhpiemodelmapper.cpp b/src/charts/piechart/qhpiemodelmapper.cpp
index aced7355..d7ba19c1 100644
--- a/src/charts/piechart/qhpiemodelmapper.cpp
+++ b/src/charts/piechart/qhpiemodelmapper.cpp
@@ -34,12 +34,15 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHPieModelMapper
\inmodule Qt Charts
- \brief Horizontal model mapper for pie series.
+ \brief The QHPieModelMapper is a horizontal model mapper for pie series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A horizontal model mapper is used to create a connection
+ between a data model and QPieSeries, so that each column in the data model defines a
+ pie slice and each row maps to the label or the value of the pie slice.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Horizontal model mapper is used to create a connection between QPieSeries and QAbstractItemModel derived model object that keeps the consecutive pie slices data in rows.
- It is possible to use both QAbstractItemModel and QPieSeries model API. QHPieModelMapper makes sure that Pie and the model are kept in sync.
- \note Used model has to support adding/removing rows/columns and modifying the data of the cells.
+ Both model and pie series properties can be used to manipulate the data. The model
+ mapper keeps the pie series and the data model in sync.
*/
/*!
\qmltype HPieModelMapper
@@ -48,12 +51,16 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief Horizontal model mapper for pie series.
- HPieModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as
- a data source for a pie series. It is possible to use both QAbstractItemModel and PieSeries data
- API to manipulate data. HPieModelMapper keeps the Pie and the model in sync.
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A horizontal model mapper is used to create a connection
+ between a data model and PieSeries, so that each column in the data model defines a
+ pie slice and each row maps to the label or the value of the pie slice.
- The following QML example would create a pie series with four slices (assuming the model has
- at least five columns). Each slice would contain a label from row 1 and a value from row 2.
+ Both model and pie series properties can be used to manipulate the data. The model
+ mapper keeps the pie series and the data model in sync.
+
+ The following QML example creates a pie series with four slices (assuming the model has
+ at least five columns). Each slice gets a label from row 1 and a value from row 2.
\code
HPieModelMapper {
series: pieSeries
@@ -68,109 +75,111 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QHPieModelMapper::series
- \brief Defines the QPieSeries object that is used by the mapper.
+ \brief The pie series that is used by the mapper.
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it preserves its data).
*/
/*!
\qmlproperty PieSeries HPieModelMapper::series
- Defines the PieSeries object that is used by the mapper. If you define the mapper element as a child for a
+ The PieSeries object that is used by the mapper. If you define the mapper element as a child for a
PieSeries, leave this property undefined. All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data).
+ When a new series is specified, the old series is disconnected (but it preserves its data).
*/
/*!
\property QHPieModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel HPieModelMapper::model
The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and modifying
+ the data in the cells.
*/
/*!
\property QHPieModelMapper::valuesRow
- \brief Defines which row of the model is kept in sync with the values of the pie's slices.
+ \brief The row of the model that is kept in sync with the values of the pie's slices.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HPieModelMapper::valuesRow
- Defines which row of the model is kept in sync with the values of the pie's slices. Default value is: -1 (invalid
- mapping).
+ The row of the model that is kept in sync with the values of the pie's slices.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QHPieModelMapper::labelsRow
- \brief Defines which row of the model is kept in sync with the labels of the pie's slices.
+ \brief The row of the model that is kept in sync with the labels of the pie's slices.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HPieModelMapper::labelsRow
- Defines which row of the model is kept in sync with the labels of the pie's slices
- Default value is: -1 (invalid mapping)
+ The row of the model that is kept in sync with the labels of the pie's slices.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QHPieModelMapper::firstColumn
- \brief Defines which column of the model contains the first slice value.
+ \brief The column of the model that contains the first slice value.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int HPieModelMapper::firstColumn
- Defines which column of the model contains the first slice value.
+ The column of the model that contains the first slice value.
The default value is 0.
*/
/*!
\property QHPieModelMapper::columnCount
- \brief Defines the number of columns of the model that are mapped as the data for QPieSeries.
+ \brief The number of columns of the model that are mapped as the data for the pie series.
- Minimal and default value is: -1 (count limited by the number of columns in the model)
+ The minimum and default value is -1 (number limited to the number of columns in the model).
*/
/*!
\qmlproperty int HPieModelMapper::columnCount
- Defines the number of columns of the model that are mapped as the data for QPieSeries. The default value is
- -1 (count limited by the number of columns in the model)
+ The number of columns of the model that are mapped as the data for the pie series.
+ The default value is -1 (number limited by the number of columns in the model).
*/
/*!
\fn void QHPieModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to changes.
*/
/*!
\fn void QHPieModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to changes.
*/
/*!
\fn void QHPieModelMapper::valuesRowChanged()
- Emitted when the valuesRow has changed.
+ This signal is emitted when the values row changes.
*/
/*!
\fn void QHPieModelMapper::labelsRowChanged()
- Emitted when the labelsRow has changed.
+ This signal is emitted when the labels row changes.
*/
/*!
\fn void QHPieModelMapper::firstColumnChanged()
- Emitted when the firstColumn has changed.
+ This signal is emitted when the first column changes.
*/
/*!
\fn void QHPieModelMapper::columnCountChanged()
- Emitted when the columnCount has changed.
+ This signal is emitted when the number of columns changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QHPieModelMapper::QHPieModelMapper(QObject *parent) :
QPieModelMapper(parent)
@@ -205,7 +214,7 @@ void QHPieModelMapper::setSeries(QPieSeries *series)
}
/*!
- Returns which row of the model is kept in sync with the values of the pie's slices
+ Returns the row of the model that is kept in sync with the values of the pie's slices.
*/
int QHPieModelMapper::valuesRow() const
{
@@ -213,8 +222,7 @@ int QHPieModelMapper::valuesRow() const
}
/*!
- Sets the model row that is kept in sync with the pie slices values.
- Parameter \a valuesRow specifies the row of the model.
+ Sets the model row that is kept in sync with the pie slices' values to \a valuesRow.
*/
void QHPieModelMapper::setValuesRow(int valuesRow)
{
@@ -225,7 +233,7 @@ void QHPieModelMapper::setValuesRow(int valuesRow)
}
/*!
- Returns which row of the model is kept in sync with the labels of the pie's slices
+ Returns the row of the model that is kept in sync with the labels of the pie's slices.
*/
int QHPieModelMapper::labelsRow() const
{
@@ -233,8 +241,7 @@ int QHPieModelMapper::labelsRow() const
}
/*!
- Sets the model row that is kept in sync with the pie's slices labels.
- Parameter \a labelsRow specifies the row of the model.
+ Sets the model row that is kept in sync with the pie slices' labels to \a labelsRow.
*/
void QHPieModelMapper::setLabelsRow(int labelsRow)
{
diff --git a/src/charts/piechart/qpieseries.cpp b/src/charts/piechart/qpieseries.cpp
index e25480cc..012e2511 100644
--- a/src/charts/piechart/qpieseries.cpp
+++ b/src/charts/piechart/qpieseries.cpp
@@ -45,22 +45,26 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QPieSeries
\inmodule Qt Charts
- \brief Pie series API for Qt Charts.
+ \brief The QPieSeries class presents data in pie charts.
- The pie series defines a pie chart which consists of pie slices which are defined as QPieSlice objects.
- The slices can have any values as the QPieSeries will calculate its relative value to the sum of all slices.
- The actual slice size is determined by that relative value.
+ A pie series consists of slices that are defined as QPieSlice objects.
+ The slices can have any values as the QPieSeries object calculates
+ the percentage of a slice compared with the sum of all slices in the series
+ to determine the actual size of the slice in the chart.
- Pie size and position on the chart is controlled by using relative values which range from 0.0 to 1.0.
+ Pie size and position on the chart are controlled by using relative values
+ that range from 0.0 to 1.0.
These relate to the actual chart rectangle.
- By default the pie is defined as a full pie but it can also be a partial pie.
- This can be done by setting a starting angle and angle span to the series.
- Full pie is 360 degrees where 0 is at 12 a'clock.
+ By default, the pie is defined as a full pie. A partial pie can be created
+ by setting a starting angle and angle span for the series.
+ A full pie is 360 degrees, where 0 is at 12 a'clock.
See the \l {PieChart Example} {pie chart example} or \l {DonutChart Example} {donut chart example} to learn how to use QPieSeries.
\image examples_piechart.png
\image examples_donutchart.png
+
+ \sa QPieSlice, QChart
*/
/*!
\qmltype PieSeries
@@ -69,9 +73,22 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractSeries
- \brief The PieSeries type is used for making pie charts.
+ \brief Presents data in pie charts.
+
+ A pie series consists of slices that are defined using the PieSlice type.
+ The slices can have any values as the PieSeries type calculates
+ the percentage of a slice compared with the sum of all slices in the series
+ to determine the actual size of the slice in the chart.
+
+ Pie size and position on the chart are controlled by using relative values
+ that range from 0.0 to 1.0.
+ These relate to the actual chart rectangle.
+
+ By default, the pie is defined as a full pie. A partial pie can be created
+ by setting a starting angle and angle span for the series.
+ A full pie is 360 degrees, where 0 is at 12 a'clock.
- The following QML shows how to create a simple pie chart.
+ The following QML example shows how to create a simple pie chart.
\snippet qmlchart/qml/qmlchart/View1.qml 1
@@ -79,318 +96,345 @@ QT_CHARTS_BEGIN_NAMESPACE
\image examples_qmlchart1.png
\endfloat
\clearfloat
+
+ \sa PieSlice, ChartView
*/
/*!
\property QPieSeries::horizontalPosition
- \brief Defines the horizontal position of the pie.
+ \brief The horizontal position of the pie.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the absolute left.
\li 1.0 is the absolute right.
\endlist
- Default value is 0.5 (center).
+ The default value is 0.5 (center).
\sa verticalPosition
*/
/*!
\qmlproperty real PieSeries::horizontalPosition
- Defines the horizontal position of the pie.
+ The horizontal position of the pie.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the absolute left.
\li 1.0 is the absolute right.
\endlist
- Default value is 0.5 (center).
+ The default value is 0.5 (center).
\sa verticalPosition
*/
/*!
\property QPieSeries::verticalPosition
- \brief Defines the vertical position of the pie.
+ \brief The vertical position of the pie.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the absolute top.
\li 1.0 is the absolute bottom.
\endlist
- Default value is 0.5 (center).
+ The default value is 0.5 (center).
\sa horizontalPosition
*/
/*!
\qmlproperty real PieSeries::verticalPosition
- Defines the vertical position of the pie.
+ The vertical position of the pie.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the absolute top.
\li 1.0 is the absolute bottom.
\endlist
- Default value is 0.5 (center).
+ The default value is 0.5 (center).
\sa horizontalPosition
*/
/*!
\property QPieSeries::size
- \brief Defines the pie size.
+ \brief The pie size.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the minimum size (pie not drawn).
\li 1.0 is the maximum size that can fit the chart.
\endlist
- When setting this property the holeSize property is adjusted if necessary, to ensure that the hole size is not greater than the outer size.
+ When setting this property, the holeSize property is adjusted if necessary,
+ to ensure that the hole size is not greater than the pie size.
- Default value is 0.7.
+ The default value is 0.7.
*/
/*!
\qmlproperty real PieSeries::size
- Defines the pie size.
+ The pie size.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
\li 0.0 is the minimum size (pie not drawn).
\li 1.0 is the maximum size that can fit the chart.
\endlist
- Default value is 0.7.
+ When setting this property, the holeSize property is adjusted if necessary,
+ to ensure that the hole size is not greater than the pie size.
+
+ The default value is 0.7.
*/
/*!
\property QPieSeries::holeSize
- \brief Defines the donut hole size.
+ \brief The donut hole size.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
- \li 0.0 is the minimum size (full pie drawn, without any hole inside).
- \li 1.0 is the maximum size that can fit the chart. (donut has no width)
+ \li 0.0 is the minimum size (full pie drawn without a hole).
+ \li 1.0 is the maximum size that can fit the chart (the donut has no width).
\endlist
- The value is never greater then size property.
- Default value is 0.0.
+ When setting this property, the \l size property is adjusted if necessary,
+ to ensure that the hole size is not greater than the pie size.
+
+ The default value is 0.0.
*/
/*!
\qmlproperty real PieSeries::holeSize
- Defines the donut hole size.
+ The donut hole size.
- The value is a relative value to the chart rectangle where:
+ The value is relative to the chart rectangle, so that:
\list
- \li 0.0 is the minimum size (full pie drawn, without any hole inside).
- \li 1.0 is the maximum size that can fit the chart. (donut has no width)
+ \li 0.0 is the minimum size (full pie drawn without a hole).
+ \li 1.0 is the maximum size that can fit the chart (the donut has no width).
\endlist
- When setting this property the size property is adjusted if necessary, to ensure that the inner size is not greater than the outer size.
+ When setting this property, the \l size property is adjusted if necessary,
+ to ensure that the hole size is not greater than the pie size.
- Default value is 0.0.
+ The default value is 0.0.
*/
/*!
\property QPieSeries::startAngle
- \brief Defines the starting angle of the pie.
+ \brief The starting angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
- Default is value is 0.
+ The default value is 0.
*/
/*!
\qmlproperty real PieSeries::startAngle
- Defines the starting angle of the pie.
+ The starting angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
- Default is value is 0.
+ The default value is 0.
*/
/*!
\property QPieSeries::endAngle
- \brief Defines the ending angle of the pie.
+ \brief The ending angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
- Default is value is 360.
+ The default value is 360.
*/
/*!
\qmlproperty real PieSeries::endAngle
- Defines the ending angle of the pie.
+ The ending angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
- Default is value is 360.
+ The default value is 360.
*/
/*!
\property QPieSeries::count
- Number of slices in the series.
+ \brief The number of slices in the series.
*/
/*!
\qmlproperty int PieSeries::count
- Number of slices in the series.
+ The number of slices in the series.
*/
/*!
\fn void QPieSeries::countChanged()
- Emitted when the slice count has changed.
+ This signal is emitted when the slice count changes.
\sa count
*/
-/*!
- \qmlsignal PieSeries::onCountChanged()
- Emitted when the slice count has changed.
-*/
/*!
\property QPieSeries::sum
- Sum of all slices.
+ \brief The sum of all slices.
- The series keeps track of the sum of all slices it holds.
+ The series keeps track of the sum of all the slices it holds.
*/
/*!
\qmlproperty real PieSeries::sum
- Sum of all slices.
+ The sum of all slices.
- The series keeps track of the sum of all slices it holds.
+ The series keeps track of the sum of all the slices it holds.
*/
/*!
\fn void QPieSeries::sumChanged()
- Emitted when the sum of all slices has changed.
+ This signal is emitted when the sum of all slices changes.
\sa sum
*/
-/*!
- \qmlsignal PieSeries::onSumChanged()
- Emitted when the sum of all slices has changed. This may happen for example if you add or remove slices, or if you
- change value of a slice.
-*/
/*!
\fn void QPieSeries::added(QList<QPieSlice*> slices)
- This signal is emitted when \a slices have been added to the series.
+ This signal is emitted when the slices specified by \a slices are added to the series.
\sa append(), insert()
*/
/*!
- \qmlsignal PieSeries::onAdded(list<PieSlice> slices)
- Emitted when \a slices have been added to the series.
+ \qmlsignal PieSeries::added(list<PieSlice> slices)
+ This signal is emitted when the slices specified by \a slices are added to the series.
+
+ The corresponding signal handler is \c onAdded.
*/
/*!
\fn void QPieSeries::removed(QList<QPieSlice*> slices)
- This signal is emitted when \a slices have been removed from the series.
+ This signal is emitted when the slices specified by \a slices are removed from the series.
\sa remove()
*/
/*!
- \qmlsignal PieSeries::onRemoved(list<PieSlice> slices)
- Emitted when \a slices have been removed from the series.
+ \qmlsignal PieSeries::removed(list<PieSlice> slices)
+ This signal is emitted when the slices specified by \a slices are removed from the series.
+
+ The corresponding signal handler is \c onRemoved.
*/
/*!
- \qmlsignal PieSeries::onSliceAdded(PieSlice slice)
- Emitted when \a slice has been added to the series.
+ \qmlsignal PieSeries::sliceAdded(PieSlice slice)
+ This signal is emitted when the slice specified by \a slice is added to the series.
+
+ The corresponding signal handler is \c onSliceAdded.
*/
/*!
- \qmlsignal PieSeries::onSliceRemoved(PieSlice slice)
- Emitted when \a slice has been removed from the series.
+ \qmlsignal PieSeries::sliceRemoved(PieSlice slice)
+ This signal is emitted when the slice specified by \a slice is removed from the series.
+
+ The corresponding signal handler is \c onSliceRemoved.
*/
/*!
\fn void QPieSeries::clicked(QPieSlice *slice)
- This signal is emitted when a \a slice has been clicked.
+ This signal is emitted when the slice specified by \a slice is clicked.
\sa QPieSlice::clicked()
*/
/*!
- \qmlsignal PieSeries::onClicked(PieSlice slice)
- This signal is emitted when a \a slice has been clicked.
+ \qmlsignal PieSeries::clicked(PieSlice slice)
+ This signal is emitted when the slice specified by \a slice is clicked.
+
+ The corresponding signal handler is \c onClicked.
*/
/*!
\fn void QPieSeries::pressed(QPieSlice *slice)
- This signal is emitted when a \a slice has been pressed.
+ This signal is emitted when the user clicks the slice specified by \a slice
+ and holds down the mouse button.
\sa QPieSlice::pressed()
*/
/*!
- \qmlsignal PieSeries::onPressed(PieSlice slice)
- This signal is emitted when a \a slice has been pressed.
+ \qmlsignal PieSeries::pressed(PieSlice slice)
+ This signal is emitted when the user clicks the slice specified by \a slice
+ and holds down the mouse button.
+
+ The corresponding signal handler is \c onPressed.
*/
/*!
\fn void QPieSeries::released(QPieSlice *slice)
- This signal is emitted when a \a slice has been released.
+ This signal is emitted when the user releases the mouse press on the slice
+ specified by \a slice.
\sa QPieSlice::released()
*/
/*!
- \qmlsignal PieSeries::onReleased(PieSlice slice)
- This signal is emitted when a \a slice has been released.
+ \qmlsignal PieSeries::released(PieSlice slice)
+ This signal is emitted when the user releases the mouse press on the slice
+ specified by \a slice.
+
+ The corresponding signal handler is \c onReleased.
*/
/*!
\fn void QPieSeries::doubleClicked(QPieSlice *slice)
- This signal is emitted when a \a slice has been doubleClicked.
+ This signal is emitted when the slice specified by \a slice is double-clicked.
\sa QPieSlice::doubleClicked()
*/
/*!
- \qmlsignal PieSeries::onDoubleClicked(PieSlice slice)
- This signal is emitted when a \a slice has been doubleClicked.
+ \qmlsignal PieSeries::doubleClicked(PieSlice slice)
+ This signal is emitted when the slice specified by \a slice is double-clicked.
+
+ The corresponding signal handler is \c onDoubleClicked.
*/
/*!
\fn void QPieSeries::hovered(QPieSlice* slice, bool state)
- This signal is emitted when user has hovered over or away from the \a slice.
- \a state is true when user has hovered over the slice and false when hover has moved away from the slice.
+ This signal is emitted when a mouse is hovered over the slice specified by
+ \a slice. When the mouse moves over the slice, \a state turns \c true, and
+ when the mouse moves away again, it turns \c false.
\sa QPieSlice::hovered()
*/
/*!
- \qmlsignal PieSeries::onHovered(PieSlice slice, bool state)
- This signal is emitted when user has hovered over or away from the \a slice. \a state is true when user has hovered
- over the slice and false when hover has moved away from the slice.
+ \qmlsignal PieSeries::hovered(PieSlice slice, bool state)
+ This signal is emitted when a mouse is hovered over the slice specified by
+ \a slice. When the mouse moves over the slice, \a state turns \c true, and
+ when the mouse moves away again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered.
*/
/*!
\qmlmethod PieSlice PieSeries::at(int index)
- Returns slice at \a index. Returns null if the index is not valid.
+ Returns the slice at the position specified by \a index. Returns null if the
+ index is not valid.
*/
/*!
\qmlmethod PieSlice PieSeries::find(string label)
- Returns the first slice with \a label. Returns null if the index is not valid.
+ Returns the first slice that has the label \a label. Returns null if the label
+ is not found.
*/
/*!
\qmlmethod PieSlice PieSeries::append(string label, real value)
- Adds a new slice with \a label and \a value to the pie.
+ Adds a new slice with the label \a label and the value \a value to the pie.
*/
/*!
\qmlmethod bool PieSeries::remove(PieSlice slice)
- Removes the \a slice from the pie. Returns true if the removal was successful, false otherwise.
+ Removes the slice specified by \a slice from the pie. Returns \c true if the
+ removal was successful, \c false otherwise.
*/
/*!
@@ -399,7 +443,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs a series object which is a child of \a parent.
+ Constructs a series object that is a child of \a parent.
*/
QPieSeries::QPieSeries(QObject *parent)
: QAbstractSeries(*new QPieSeriesPrivate(this), parent)
@@ -409,7 +453,7 @@ QPieSeries::QPieSeries(QObject *parent)
}
/*!
- Destroys the series and its slices.
+ Removes the pie series and its slices.
*/
QPieSeries::~QPieSeries()
{
@@ -418,7 +462,9 @@ QPieSeries::~QPieSeries()
}
/*!
- Returns QAbstractSeries::SeriesTypePie.
+ \reimp
+
+ Returns the type of the series.
*/
QAbstractSeries::SeriesType QPieSeries::type() const
{
@@ -426,10 +472,10 @@ QAbstractSeries::SeriesType QPieSeries::type() const
}
/*!
- Appends a single \a slice to the series.
+ Appends the slice specified by \a slice to the series.
Slice ownership is passed to the series.
- Returns true if append was succesfull.
+ Returns \c true if appending succeeds.
*/
bool QPieSeries::append(QPieSlice *slice)
{
@@ -437,10 +483,10 @@ bool QPieSeries::append(QPieSlice *slice)
}
/*!
- Appends an array of \a slices to the series.
+ Appends the array of slices specified by \a slices to the series.
Slice ownership is passed to the series.
- Returns true if append was successful.
+ Returns \c true if appending succeeds.
*/
bool QPieSeries::append(QList<QPieSlice *> slices)
{
@@ -482,7 +528,7 @@ bool QPieSeries::append(QList<QPieSlice *> slices)
}
/*!
- Appends a single \a slice to the series and returns a reference to the series.
+ Appends the slice specified by \a slice to the series and returns a reference to the series.
Slice ownership is passed to the series.
*/
QPieSeries &QPieSeries::operator << (QPieSlice *slice)
@@ -493,9 +539,10 @@ QPieSeries &QPieSeries::operator << (QPieSlice *slice)
/*!
- Appends a single slice to the series with give \a value and \a label.
+ Appends a single slice with the specified \a value and \a label to the series.
Slice ownership is passed to the series.
- Returns NULL if value is NaN, Inf or -Inf and no slice is added to the series.
+ Returns null if \a value is \c NaN, \c Inf, or \c -Inf and adds nothing to the
+ series.
*/
QPieSlice *QPieSeries::append(QString label, qreal value)
{
@@ -509,10 +556,11 @@ QPieSlice *QPieSeries::append(QString label, qreal value)
}
/*!
- Inserts a single \a slice to the series before the slice at \a index position.
+ Inserts the slice specified by \a slice to the series before the slice at
+ the position specified by \a index.
Slice ownership is passed to the series.
- Returns true if insert was successful.
+ Returns \c true if inserting succeeds.
*/
bool QPieSeries::insert(int index, QPieSlice *slice)
{
@@ -550,11 +598,12 @@ bool QPieSeries::insert(int index, QPieSlice *slice)
}
/*!
- Removes a single \a slice from the series and deletes the slice.
+ Removes a single slice, specified by \a slice, from the series and deletes it
+ permanently.
- Do not reference the pointer after this call.
+ The pointer cannot be referenced after this call.
- Returns true if remove was successful.
+ Returns \c true if the removal succeeds.
*/
bool QPieSeries::remove(QPieSlice *slice)
{
@@ -575,12 +624,13 @@ bool QPieSeries::remove(QPieSlice *slice)
}
/*!
- Takes a single \a slice from the series. Does not destroy the slice object.
+ Takes a single slice, specified by \a slice, from the series. Does not delete
+ the slice object.
- \note The series remains as the slice's parent object. You must set the
+ \note The series remains the slice's parent object. You must set the
parent object to take full ownership.
- Returns true if take was successful.
+ Returns \c true if the take operation was successful.
*/
bool QPieSeries::take(QPieSlice *slice)
{
@@ -632,7 +682,7 @@ QList<QPieSlice *> QPieSeries::slices() const
}
/*!
- returns the number of the slices in this series.
+ Returns the number of the slices in this series.
*/
int QPieSeries::count() const
{
@@ -641,7 +691,7 @@ int QPieSeries::count() const
}
/*!
- Returns true is the series is empty.
+ Returns \c true if the series is empty.
*/
bool QPieSeries::isEmpty() const
{
@@ -749,9 +799,9 @@ qreal QPieSeries::pieStartAngle() const
/*!
Sets the end angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
- \a angle must be greater than start angle.
+ \a angle must be greater than the start angle.
\sa pieEndAngle(), pieStartAngle(), setPieStartAngle()
*/
@@ -768,7 +818,7 @@ void QPieSeries::setPieEndAngle(qreal angle)
/*!
Returns the end angle of the pie.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
\sa setPieEndAngle(), pieStartAngle(), setPieStartAngle()
*/
@@ -779,10 +829,10 @@ qreal QPieSeries::pieEndAngle() const
}
/*!
- Sets the all the slice labels \a visible or invisible.
+ Sets the visibility of all slice labels to \a visible.
- Note that this affects only the current slices in the series.
- If user adds a new slice the default label visibility is false.
+ \note This function affects only the current slices in the series.
+ If a new slice is added, the default label visibility is \c false.
\sa QPieSlice::isLabelVisible(), QPieSlice::setLabelVisible()
*/
@@ -794,10 +844,10 @@ void QPieSeries::setLabelsVisible(bool visible)
}
/*!
- Sets the all the slice labels \a position
+ Sets the position of all the slice labels to \a position.
- Note that this affects only the current slices in the series.
- If user adds a new slice the default label position is LabelOutside
+ \note This function affects only the current slices in the series.
+ If a new slice is added, the default label position is QPieSlice::LabelOutside.
\sa QPieSlice::labelPosition(), QPieSlice::setLabelPosition()
*/
diff --git a/src/charts/piechart/qpieslice.cpp b/src/charts/piechart/qpieslice.cpp
index fd63badd..501b25f1 100644
--- a/src/charts/piechart/qpieslice.cpp
+++ b/src/charts/piechart/qpieslice.cpp
@@ -35,17 +35,24 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QPieSlice
\inmodule Qt Charts
- \brief Defines a slice in pie series.
+ \brief The QPieSlice class represents a single slice in a pie series.
- This object defines the properties of a single slice in a QPieSeries.
+ A pie slice has a value and a label. When the slice is added to a pie series, the
+ QPieSeries object calculates the percentage of the slice compared with the sum of
+ all slices in the series to determine the actual size of the slice in the chart.
- In addition to the obvious value and label properties the user can also control
- the visual appearance of a slice. By modifying the visual appearance also means that
- the user is overriding the default appearance set by the theme.
+ By default, the label is hidden. If it is visible, it can be either located outside
+ the slice and connected to it with an arm or centered inside the slice either
+ horizontally or in parallel with the tangential or normal of the slice's arc.
- Note that if the user has customized slices and theme is changed all customizations will be lost.
+ By default, the visual appearance of the slice is set by a theme, but the theme can be
+ overridden by specifying slice properties. However, if the theme is changed after the
+ slices are customized, all customization will be lost.
- To enable user interaction with the pie some basic signals are provided about clicking and hovering.
+ To enable user interaction with the pie chart, some basic signals are emitted when
+ users click pie slices or hover the mouse over them.
+
+ \sa QPieSeries
*/
/*!
@@ -53,18 +60,29 @@ QT_CHARTS_BEGIN_NAMESPACE
\instantiates QPieSlice
\inqmlmodule QtCharts
- \brief Defines a slice in pie series.
+ \brief Represents a single slice in a pie series.
+
+ A pie slice has a value and a label. When the slice is added to a pie series, the
+ PieSeries type calculates the percentage of the slice compared with the sum of
+ all slices in the series to determine the actual size of the slice in the chart.
+
+ By default, the label is hidden. If it is visible, it can be either located outside
+ the slice and connected to it with an arm or centered inside the slice either
+ horizontally or in parallel with the tangential or normal of the slice's arc.
- PieSlice defines the properties of a single slice in a PieSeries. The element should be used
- as a child for a PieSeries. For example:
+ By default, the visual appearance of the slice is set by a theme, but the theme can be
+ overridden by specifying slice properties. However, if the theme is changed after the
+ slices are customized, all customization will be lost.
+
+ The PieSlice type should be used as a child of a PieSeries type. For example:
\snippet qmlpiechart/qml/qmlpiechart/main.qml 2
- An alternative (dynamic) method for adding slices to a PieSeries is using PieSeries.append
- method.
+ Alternatively, slices can be added to a pie series by using the \l{PieSeries::append()}
+ {PieSeries.append()} method.
\snippet qmlpiechart/qml/qmlpiechart/main.qml 4
- In that case you may want to use PieSeries.at or PieSeries.find to access the properties of
- an individual PieSlice instance.
+ In that case, \l{PieSeries::at()}{PieSeries.at()} or \l {PieSeries::find}
+ {PieSeries.find} can be used to access the properties of an individual PieSlice instance.
\snippet qmlpiechart/qml/qmlpiechart/main.qml 5
\sa PieSeries
*/
@@ -74,42 +92,46 @@ QT_CHARTS_BEGIN_NAMESPACE
This enum describes the position of the slice label.
- \value LabelOutside Label is outside the slice with an arm.
- \value LabelInsideHorizontal Label is centered inside the slice and laid out horizontally.
- \value LabelInsideTangential Label is centered inside the slice and rotated to be parallel to the tangential of the slice's arc.
- \value LabelInsideNormal Label is centered inside the slice rotated to be parallel to the normal of the slice's arc.
+ \value LabelOutside
+ The label is located outside the slice connected to it with an arm.
+ This is the default value.
+ \value LabelInsideHorizontal
+ The label is centered within the slice and laid out horizontally.
+ \value LabelInsideTangential
+ The label is centered within the slice and rotated to be parallel with
+ the tangential of the slice's arc.
+ \value LabelInsideNormal
+ The label is centered within the slice and rotated to be parallel with
+ the normal of the slice's arc.
*/
/*!
\property QPieSlice::label
- Label of the slice.
+ \brief The label of the slice.
\sa labelVisible, labelBrush, labelFont, labelArmLengthFactor
*/
/*!
\qmlproperty string PieSlice::label
- Label (text) of the slice.
+ The label of the slice.
*/
/*!
\fn void QPieSlice::labelChanged()
- This signal emitted when the slice label has been changed.
- \sa label
-*/
-/*!
- \qmlsignal PieSlice::onLabelChanged()
- This signal emitted when the slice label has been changed.
+ This signal is emitted when the slice label changes.
\sa label
*/
/*!
\property QPieSlice::value
- Value of the slice.
- Note that if users sets a negative value it is converted to a positive value.
+ \brief The value of the slice.
+ \note A negative value is converted to a positive value.
\sa percentage(), QPieSeries::sum()
*/
/*!
\qmlproperty real PieSlice::value
- Value of the slice. Note that if users sets a negative value it is converted to a positive value.
+ The value of the slice.
+
+ \note A negative value is converted to a positive value.
*/
/*!
@@ -117,373 +139,361 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when the slice value changes.
\sa value
*/
-/*!
- \qmlsignal PieSlice::onValueChanged()
- This signal is emitted when the slice value changes.
- \sa value
-*/
/*!
\property QPieSlice::labelVisible
- Defines the visibility of slice label. By default the label is not visible.
+ \brief The visibility of the slice label. By default, the label is not visible.
\sa label, labelBrush, labelFont, labelArmLengthFactor
*/
/*!
\qmlproperty bool PieSlice::labelVisible
- Defines the visibility of slice label. By default the label is not visible.
+ The visibility of the slice label. By default, the label is not visible.
*/
/*!
\fn void QPieSlice::labelVisibleChanged()
- This signal emitted when visibility of the slice label has changed.
- \sa labelVisible
-*/
-/*!
- \qmlsignal PieSlice::onLabelVisibleChanged()
- This signal emitted when visibility of the slice label has changed.
+ This signal is emitted when the visibility of the slice label changes.
\sa labelVisible
*/
/*!
\property QPieSlice::exploded
- If set to true the slice is "exploded" away from the pie.
+ \brief Whether the slice is separated from the pie.
\sa explodeDistanceFactor
*/
/*!
\qmlproperty bool PieSlice::exploded
- If set to true the slice is "exploded" away from the pie.
+ Whether the slice is separated from the pie.
\sa explodeDistanceFactor
*/
/*!
\property QPieSlice::pen
- Pen used to draw the slice border.
+ \brief The pen used to draw the slice border.
*/
/*!
\fn void QPieSlice::penChanged()
- This signal is emitted when the pen of the slice has changed.
+ This signal is emitted when the pen used to draw the slice border changes.
\sa pen
*/
/*!
\property QPieSlice::borderColor
- Color used to draw the slice border.
+ \brief The color used to draw the slice border.
This is a convenience property for modifying the slice pen.
\sa pen, borderWidth
*/
/*!
\qmlproperty color PieSlice::borderColor
- Color used to draw the slice border (pen color).
+ The color used to draw the slice border (pen color).
\sa borderWidth
*/
/*!
\fn void QPieSlice::borderColorChanged()
- This signal is emitted when slice border color changes.
+ This signal is emitted when the slice border color changes.
\sa pen, borderColor
*/
-/*!
- \qmlsignal PieSlice::onBorderColorChanged()
- This signal is emitted when slice border color changes.
- \sa borderColor
-*/
/*!
\property QPieSlice::borderWidth
- Width of the slice border.
+ \brief The width of the slice border.
This is a convenience property for modifying the slice pen.
\sa pen, borderColor
*/
/*!
\qmlproperty int PieSlice::borderWidth
- Width of the slice border.
+ The width of the slice border.
This is a convenience property for modifying the slice pen.
\sa borderColor
*/
/*!
\fn void QPieSlice::borderWidthChanged()
- This signal is emitted when slice border width changes.
+ This signal is emitted when the slice border width changes.
\sa pen, borderWidth
*/
-/*!
- \qmlsignal PieSlice::onBorderWidthChanged()
- This signal is emitted when slice border width changes.
- \sa borderWidth
-*/
/*!
\property QPieSlice::brush
- Brush used to draw the slice.
+ \brief The brush used to fill the slice.
*/
/*!
\fn void QPieSlice::brushChanged()
- This signal is emitted when the brush of the slice has changed.
+ This signal is emitted when the brush used to fill the slice changes.
\sa brush
*/
/*!
- \qmlproperty QString PieSlice::brushFilename
+ \qmlproperty string PieSlice::brushFilename
The name of the file used as a brush for the slice.
*/
/*!
\property QPieSlice::color
- Fill (brush) color of the slice.
+ \brief The fill (brush) color of the slice.
This is a convenience property for modifying the slice brush.
\sa brush
*/
/*!
\qmlproperty color PieSlice::color
- Fill (brush) color of the slice.
+ The fill (brush) color of the slice.
*/
/*!
\fn void QPieSlice::colorChanged()
- This signal is emitted when slice color changes.
+ This signal is emitted when the slice color changes.
\sa brush
*/
-/*!
- \qmlsignal PieSlice::onColorChanged()
- This signal is emitted when slice color changes.
-*/
/*!
\property QPieSlice::labelBrush
- Brush used to draw label and label arm of the slice.
+ \brief The brush used to draw the label and label arm of the slice.
\sa label, labelVisible, labelFont, labelArmLengthFactor
*/
/*!
\fn void QPieSlice::labelBrushChanged()
- This signal is emitted when the label brush of the slice has changed.
+ This signal is emitted when the label brush of the slice changes.
\sa labelBrush
*/
/*!
\property QPieSlice::labelColor
- Color used to draw the slice label.
+ \brief The color used to draw the slice label.
This is a convenience property for modifying the slice label brush.
\sa labelBrush
*/
/*!
\qmlproperty color PieSlice::labelColor
- Color used to draw the slice label.
+ The color used to draw the slice label.
*/
/*!
\fn void QPieSlice::labelColorChanged()
- This signal is emitted when slice label color changes.
- \sa labelColor
-*/
-/*!
- \qmlsignal PieSlice::onLabelColorChanged()
- This signal is emitted when slice label color changes.
+ This signal is emitted when the slice label color changes.
\sa labelColor
*/
/*!
\property QPieSlice::labelFont
- Font used for drawing label text.
+ \brief The font used for drawing the label text.
\sa label, labelVisible, labelArmLengthFactor
*/
/*!
\fn void QPieSlice::labelFontChanged()
- This signal is emitted when the label font of the slice has changed.
+ This signal is emitted when the label font of the slice changes.
\sa labelFont
*/
/*!
- \qmlproperty Font PieSlice::labelFont
+ \qmlproperty font PieSlice::labelFont
- Defines the font used for slice label.
+ The font used for the slice label.
- See the Qt documentation for more details of Font.
+ For more information, see \l [QML]{font}.
\sa labelVisible, labelPosition
*/
/*!
\property QPieSlice::labelPosition
- Position of the slice label.
+ \brief The position of the slice label.
\sa label, labelVisible
*/
/*!
- \qmlproperty LabelPosition PieSlice::labelPosition
- Position of the slice label. One of PieSlice.LabelOutside, PieSlice.LabelInsideHorizontal,
- PieSlice.LabelInsideTangential or PieSlice.LabelInsideNormal. By default the position is
- PieSlice.LabelOutside.
+ \qmlproperty enumeration PieSlice::labelPosition
+
+ Describes the position of the slice label.
+
+ \value PieSlice.LabelOutside
+ The label is located outside the slice connected to it with an arm.
+ This is the default value.
+ \value PieSlice.LabelInsideHorizontal
+ The label is centered within the slice and laid out horizontally.
+ \value PieSlice.LabelInsideTangential
+ The label is centered within the slice and rotated to be parallel with
+ the tangential of the slice's arc.
+ \value PieSlice.LabelInsideNormal
+ The label is centered within the slice and rotated to be parallel with
+ the normal of the slice's arc.
+
\sa labelVisible
*/
/*!
\property QPieSlice::labelArmLengthFactor
- Defines the length of the label arm.
- The factor is relative to pie radius. For example:
- 1.0 means the length is the same as the radius.
- 0.5 means the length is half of the radius.
- By default the arm length is 0.15
+ \brief The length of the label arm.
+ The factor is relative to the pie radius. For example:
+ \list
+ \li 1.0 means that the length is the same as the radius.
+ \li 0.5 means that the length is half of the radius.
+ \endlist
+ By default, the arm length is 0.15
\sa label, labelVisible, labelBrush, labelFont
*/
/*!
\qmlproperty real PieSlice::labelArmLengthFactor
- Defines the length of the label arm.
- The factor is relative to pie radius. For example:
- 1.0 means the length is the same as the radius.
- 0.5 means the length is half of the radius.
- By default the arm length is 0.15
+ The length of the label arm.
+ The factor is relative to the pie radius. For example:
+ \list
+ \li 1.0 means that the length is the same as the radius.
+ \li 0.5 means that the length is half of the radius.
+ \endlist
+ By default, the arm length is 0.15
+
\sa labelVisible
*/
/*!
\property QPieSlice::explodeDistanceFactor
- When the slice is exploded this factor defines how far the slice is exploded away from the pie.
- The factor is relative to pie radius. For example:
- 1.0 means the distance is the same as the radius.
- 0.5 means the distance is half of the radius.
- By default the distance is is 0.15
+ \brief Determines how far away from the pie the slice is exploded.
+ \list
+ \li 1.0 means that the distance is the same as the radius.
+ \li 0.5 means that the distance is half of the radius.
+ \endlist
+ By default, the distance is 0.15
\sa exploded
*/
/*!
\qmlproperty real PieSlice::explodeDistanceFactor
- When the slice is exploded this factor defines how far the slice is exploded away from the pie.
- The factor is relative to pie radius. For example:
- 1.0 means the distance is the same as the radius.
- 0.5 means the distance is half of the radius.
- By default the distance is is 0.15
+ Determines how far away from the pie the slice is exploded.
+ \list
+ \li 1.0 means that the distance is the same as the radius.
+ \li 0.5 means that the distance is half of the radius.
+ \endlist
+ By default, the distance is 0.15
+
\sa exploded
*/
/*!
\property QPieSlice::percentage
- Percentage of the slice compared to the sum of all slices in the series.
+ \brief The percentage of the slice compared to the sum of all slices in the series.
The actual value ranges from 0.0 to 1.0.
Updated automatically once the slice is added to the series.
\sa value, QPieSeries::sum
*/
/*!
\qmlproperty real PieSlice::percentage
- Percentage of the slice compared to the sum of all slices in the series.
+ The percentage of the slice compared to the sum of all slices in the series.
The actual value ranges from 0.0 to 1.0.
Updated automatically once the slice is added to the series.
*/
/*!
\fn void QPieSlice::percentageChanged()
- This signal is emitted when the percentage of the slice has changed.
- \sa percentage
-*/
-/*!
- \qmlsignal void PieSlice::onPercentageChanged()
- This signal is emitted when the percentage of the slice has changed.
+ This signal is emitted when the percentage of the slice changes.
\sa percentage
*/
/*!
\property QPieSlice::startAngle
- Defines the starting angle of this slice in the series it belongs to.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ \brief The starting angle of this slice in the series it belongs to.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
Updated automatically once the slice is added to the series.
*/
/*!
\qmlproperty real PieSlice::startAngle
- Defines the starting angle of this slice in the series it belongs to.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ The starting angle of this slice in the series it belongs to.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
Updated automatically once the slice is added to the series.
*/
/*!
\fn void QPieSlice::startAngleChanged()
- This signal is emitted when the starting angle f the slice has changed.
- \sa startAngle
-*/
-/*!
- \qmlsignal PieSlice::onStartAngleChanged()
- This signal is emitted when the starting angle f the slice has changed.
+ This signal is emitted when the starting angle of the slice changes.
\sa startAngle
*/
/*!
\property QPieSlice::angleSpan
- Span of the slice in degrees.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ \brief The span of the slice in degrees.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
Updated automatically once the slice is added to the series.
*/
/*!
\qmlproperty real PieSlice::angleSpan
- Span of the slice in degrees.
- Full pie is 360 degrees where 0 degrees is at 12 a'clock.
+ The span of the slice in degrees.
+ A full pie is 360 degrees, where 0 degrees is at 12 a'clock.
Updated automatically once the slice is added to the series.
*/
/*!
\fn void QPieSlice::angleSpanChanged()
- This signal is emitted when the angle span of the slice has changed.
- \sa angleSpan
-*/
-/*!
- \qmlsignal PieSlice::onAngleSpanChanged()
- This signal is emitted when the angle span of the slice has changed.
+ This signal is emitted when the angle span of the slice changes.
\sa angleSpan
*/
/*!
\fn void QPieSlice::clicked()
- This signal is emitted when user has clicked the slice.
+ This signal is emitted when the slice is clicked.
\sa QPieSeries::clicked()
*/
/*!
- \qmlsignal PieSlice::onClicked()
- This signal is emitted when user has clicked the slice.
+ \qmlsignal PieSlice::clicked()
+ This signal is emitted when the slice is clicked.
+
+ The corresponding signal handler is \c onClicked().
*/
/*!
\fn void QPieSlice::pressed()
- This signal is emitted when user has pressed the slice.
+ This signal is emitted when the user clicks the slice and holds down the mouse button.
\sa QPieSeries::pressed()
*/
/*!
- \qmlsignal PieSlice::onPressed()
- This signal is emitted when user has pressed the slice.
+ \qmlsignal PieSlice::pressed()
+ This signal is emitted when user clicks the slice and holds down the mouse button.
+
+ The corresponding signal handler is \c onPressed().
*/
/*!
\fn void QPieSlice::released()
- This signal is emitted when user has released the slice.
+ This signal is emitted when the user releases the mouse press on the slice.
\sa QPieSeries::released()
*/
/*!
- \qmlsignal PieSlice::onReleased()
- This signal is emitted when user has released the slice.
+ \qmlsignal PieSlice::released()
+ This signal is emitted when the user releases the mouse press on the slice.
+
+ The corresponding signal handler is \c onReleased().
*/
/*!
\fn void QPieSlice::doubleClicked()
- This signal is emitted when user has doubleclicked the slice.
+ This signal is emitted when user double-clicks the slice.
\sa QPieSeries::doubleClicked()
*/
/*!
- \qmlsignal PieSlice::onDoubleClicked()
- This signal is emitted when user has doubleclicked the slice.
+ \qmlsignal PieSlice::doubleClicked()
+ This signal is emitted when user double-clicks the slice.
+
+ The corresponding signal handler is \c onDoubleClicked().
*/
/*!
\fn void QPieSlice::hovered(bool state)
- This signal is emitted when user has hovered over or away from the slice.
- \a state is true when user has hovered over the slice and false when hover has moved away from the slice.
+ This signal is emitted when a mouse is hovered over the slice. When the mouse
+ moves over the slice, \a state turns \c true, and when the mouse moves away
+ again, it turns \c false.
\sa QPieSeries::hovered()
*/
/*!
- \qmlsignal PieSlice::onHovered(bool state)
- This signal is emitted when user has hovered over or away from the slice.
- \a state is true when user has hovered over the slice and false when hover has moved away from the slice.
+ \qmlsignal PieSlice::hovered(bool state)
+ This signal is emitted when a mouse is hovered over the slice. When the mouse
+ moves over the slice, \a state turns \c true, and when the mouse moves away
+ again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered().
*/
/*!
- Constructs an empty slice with a \a parent.
+ Constructs an empty slice with the parent \a parent.
\sa QPieSeries::append(), QPieSeries::insert()
*/
QPieSlice::QPieSlice(QObject *parent)
@@ -494,7 +504,7 @@ QPieSlice::QPieSlice(QObject *parent)
}
/*!
- Constructs an empty slice with given \a value, \a label and a \a parent.
+ Constructs an empty slice with the specified \a value, \a label, and \a parent.
\sa QPieSeries::append(), QPieSeries::insert()
*/
QPieSlice::QPieSlice(QString label, qreal value, QObject *parent)
@@ -506,8 +516,7 @@ QPieSlice::QPieSlice(QString label, qreal value, QObject *parent)
}
/*!
- Destroys the slice.
- User should not delete the slice if it has been added to the series.
+ Removes the slice. The slice should not be removed if it has been added to a series.
*/
QPieSlice::~QPieSlice()
{
diff --git a/src/charts/piechart/qvpiemodelmapper.cpp b/src/charts/piechart/qvpiemodelmapper.cpp
index 21ba4966..9c0d8443 100644
--- a/src/charts/piechart/qvpiemodelmapper.cpp
+++ b/src/charts/piechart/qvpiemodelmapper.cpp
@@ -34,12 +34,15 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QVPieModelMapper
\inmodule Qt Charts
- \brief Vertical model mapper for pie series.
+ \brief The QVPieModelMapper is a vertical model mapper for pie series.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and QPieSeries, so that each row in the data model defines a
+ pie slice and each column maps to the label or the value of the pie slice.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Vertical model mapper is used to create a connection between QPieSeries and QAbstractItemModel derived model object that keeps the consecutive pie slices data in columns.
- It is possible to use both QAbstractItemModel and QPieSeries model API. QVPieModelMapper makes sure that Pie and the model are kept in sync.
- \note Used model has to support adding/removing rows/columns and modifying the data of the cells.
+ Both model and pie series properties can be used to manipulate the data. The model
+ mapper keeps the pie series and the data model in sync.
*/
/*!
\qmltype VPieModelMapper
@@ -48,12 +51,16 @@ QT_CHARTS_BEGIN_NAMESPACE
\brief Vertical model mapper for pie series.
- VPieModelMapper allows you to use your own QAbstractItemModel derived model with data in columns
- as a data source for a pie series. It is possible to use both QAbstractItemModel and PieSeries
- data API to manipulate data. VPieModelMapper keeps the Pie and the model in sync.
+ Model mappers enable using a data model derived from the QAbstractItemModel class
+ as a data source for a chart. A vertical model mapper is used to create a connection
+ between a data model and PieSeries, so that each row in the data model defines a
+ pie slice and each column maps to the label or the value of the pie slice.
+
+ Both model and pie series properties can be used to manipulate the data. The model
+ mapper keeps the pie series and the data model in sync.
- The following QML example would create a pie series with four slices (assuming the model has at
- least five rows). Each slice would contain a label from column 1 and a value from column 2.
+ The following QML example creates a pie series with four slices (assuming the model has at
+ least five rows). Each slice gets a label from column 1 and a value from column 2.
\code
VPieModelMapper {
series: pieSeries
@@ -68,112 +75,115 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QVPieModelMapper::series
- \brief Defines the QPieSeries object that is used by the mapper.
+ \brief The pie series that is used by the mapper.
+
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it preserves its data).
*/
/*!
\qmlproperty PieSeries VPieModelMapper::series
- Defines the PieSeries object that is used by the mapper. If you define the mapper element as a child for a
+ The pie series that is used by the mapper. If you define the mapper element as a child for a
PieSeries, leave this property undefined. All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data).
+ When new series is specified the old series is disconnected (but it preserves its data).
*/
/*!
\property QVPieModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel VPieModelMapper::model
The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and modifying
+ the data in the cells.
*/
/*!
\property QVPieModelMapper::valuesColumn
- \brief Defines which column of the model is kept in sync with the values of the pie's slices.
+ \brief The column of the model that is kept in sync with the values of the pie's slices.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VPieModelMapper::valuesColumn
- Defines which column of the model is kept in sync with the values of the pie's slices. Default value is -1 (invalid
- mapping).
+ The column of the model that is kept in sync with the values of the pie's slices.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QVPieModelMapper::labelsColumn
- \brief Defines which column of the model is kept in sync with the labels of the pie's slices.
+ \brief The column of the model that is kept in sync with the labels of the pie's slices.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VPieModelMapper::labelsColumn
- Defines which column of the model is kept in sync with the labels of the pie's slices. Default value is -1 (invalid
- mapping).
+ The column of the model that is kept in sync with the labels of the pie's slices.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QVPieModelMapper::firstRow
- \brief Defines which row of the model contains the first slice value.
+ \brief The row of the model that contains the first slice value.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int VPieModelMapper::firstRow
- Defines which row of the model contains the first slice value.
+ The row of the model that contains the first slice value.
The default value is 0.
*/
/*!
\property QVPieModelMapper::rowCount
- \brief Defines the number of rows of the model that are mapped as the data for QPieSeries.
+ \brief The number of rows of the model that are mapped as the data for a pie series.
- Minimal and default value is: -1 (count limited by the number of rows in the model)
+ The minimum and default value is -1 (number limited by the number of rows in the model).
*/
/*!
\qmlproperty int VPieModelMapper::columnCount
- Defines the number of rows of the model that are mapped as the data for QPieSeries. The default value is
- -1 (count limited by the number of rows in the model)
+ The number of rows of the model that are mapped as the data for a pie series.
+ The default value is -1 (number limited by the number of rows in the model).
*/
/*!
\fn void QVPieModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to changes.
*/
/*!
\fn void QVPieModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to changes.
*/
/*!
\fn void QVPieModelMapper::valuesColumnChanged()
- Emitted when the valuesColumn has changed.
+ This signal is emitted when the values column changes.
*/
/*!
\fn void QVPieModelMapper::labelsColumnChanged()
- Emitted when the labelsColumn has changed.
+ This signal is emitted when the labels column changes.
*/
/*!
\fn void QVPieModelMapper::firstRowChanged()
- Emitted when the firstRow has changed.
+ This signal is emitted when the first row changes.
*/
/*!
\fn void QVPieModelMapper::rowCountChanged()
- Emitted when the rowCount has changed.
+ This signal is emitted when the number of rows changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QVPieModelMapper::QVPieModelMapper(QObject *parent) :
QPieModelMapper(parent)
@@ -208,7 +218,7 @@ void QVPieModelMapper::setSeries(QPieSeries *series)
}
/*!
- Returns which column of the model is kept in sync with the values of the pie's slices
+ Returns the column of the model that is kept in sync with the values of the pie's slices.
*/
int QVPieModelMapper::valuesColumn() const
{
@@ -216,8 +226,7 @@ int QVPieModelMapper::valuesColumn() const
}
/*!
- Sets the model column that is kept in sync with the pie slices values.
- Parameter \a valuesColumn specifies the row of the model.
+ Sets the model column that is kept in sync with the pie slices' values to \a valuesColumn.
*/
void QVPieModelMapper::setValuesColumn(int valuesColumn)
{
@@ -228,7 +237,7 @@ void QVPieModelMapper::setValuesColumn(int valuesColumn)
}
/*!
- Returns which column of the model is kept in sync with the labels of the pie's slices
+ Returns the column of the model that is kept in sync with the labels of the pie's slices.
*/
int QVPieModelMapper::labelsColumn() const
{
@@ -236,8 +245,7 @@ int QVPieModelMapper::labelsColumn() const
}
/*!
- Sets the model column that is kept in sync with the pie's slices labels.
- Parameter \a labelsColumn specifies the row of the model.
+ Sets the model column that is kept in sync with the pies slices' labels to \a labelsColumn.
*/
void QVPieModelMapper::setLabelsColumn(int labelsColumn)
{
diff --git a/src/charts/qabstractseries.cpp b/src/charts/qabstractseries.cpp
index 39ec2aa9..5bfe9c15 100644
--- a/src/charts/qabstractseries.cpp
+++ b/src/charts/qabstractseries.cpp
@@ -124,10 +124,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractSeries::nameChanged()
This signal is emitted when the series name changes.
*/
-/*!
- \qmlsignal AbstractSeries::onNameChanged()
- This signal is emitted when the series name changes.
-*/
/*!
\property QAbstractSeries::visible
@@ -144,10 +140,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractSeries::visibleChanged()
This signal is emitted when the series visibility changes.
*/
-/*!
- \qmlsignal AbstractSeries::onVisibleChanged()
- This signal is emitted when the series visibility changes.
-*/
/*!
\property QAbstractSeries::opacity
@@ -165,10 +157,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\fn void QAbstractSeries::opacityChanged()
This signal is emitted when the opacity of the series changes.
*/
-/*!
- \qmlsignal AbstractSeries::onOpacityChanged()
- This signal is emitted when the opacity of the series changes.
-*/
/*!
\property QAbstractSeries::useOpenGL
@@ -264,11 +252,6 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when accelerating the drawing of the series by using OpenGL
is enabled or disabled.
*/
-/*!
- \qmlsignal AbstractSeries::onUseOpenGLChanged()
- This signal is emitted when accelerating the drawing of the series by using OpenGL
- is enabled or disabled.
-*/
/*!
\internal
diff --git a/src/charts/qchart.cpp b/src/charts/qchart.cpp
index 67af761d..3f8c3b49 100644
--- a/src/charts/qchart.cpp
+++ b/src/charts/qchart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -47,25 +47,45 @@ QT_CHARTS_BEGIN_NAMESPACE
This enum describes the theme used by the chart.
- \value ChartThemeLight The default theme
+ A theme is a built-in collection of UI style related settings applied to all
+ the visual elements of a chart, such as colors, pens, brushes, and fonts of
+ series, as well as axes, title, and legend. The \l {Chart themes example}
+ illustrates how to use themes.
+
+ \note Changing the theme will overwrite all customizations previously applied
+ to the series.
+
+ \value ChartThemeLight
+ The light theme, which is the default theme.
\value ChartThemeBlueCerulean
+ The cerulean blue theme.
\value ChartThemeDark
+ The dark theme.
\value ChartThemeBrownSand
+ The sand brown theme.
\value ChartThemeBlueNcs
+ The natural color system (NCS) blue theme.
\value ChartThemeHighContrast
+ The high contrast theme.
\value ChartThemeBlueIcy
+ The icy blue theme.
\value ChartThemeQt
+ The Qt theme.
*/
/*!
\enum QChart::AnimationOption
- For enabling/disabling animations. Defaults to NoAnimation.
+ This enum describes the animations enabled in the chart.
\value NoAnimation
+ Animation is disabled in the chart. This is the default value.
\value GridAxisAnimations
+ Grid axis animation is enabled in the chart.
\value SeriesAnimations
+ Series animation is enabled in the chart.
\value AllAnimations
+ All animation types are enabled in the chart.
*/
/*!
@@ -74,95 +94,114 @@ QT_CHARTS_BEGIN_NAMESPACE
This enum describes the chart type.
\value ChartTypeUndefined
+ The chart type is not defined.
\value ChartTypeCartesian
+ A cartesian chart.
\value ChartTypePolar
+ A polar chart.
*/
/*!
\class QChart
\inmodule Qt Charts
- \brief Main chart API for Qt Charts.
+ \brief The QChart class manages the graphical representation of the chart's
+ series, legends, and axes.
QChart is a QGraphicsWidget that you can show in a QGraphicsScene. It manages the graphical
representation of different types of series and other chart related objects like legend and
- axes. If you simply want to show a chart in a layout, you can use the
- convenience class QChartView instead of QChart.
+ axes. To simply show a chart in a layout, the convenience class QChartView can be used
+ instead of QChart. In addition, line, spline, area, and scatter series can be presented as
+ polar charts by using the QPolarChart class.
+
\sa QChartView, QPolarChart
*/
/*!
\property QChart::animationOptions
- The animation \a options for the chart. Animations are enabled/disabled based on this setting.
+ \brief The animation options for the chart.
+
+ Animations are enabled or disabled based on this setting.
*/
/*!
\property QChart::animationDuration
- The duration of the animation for the chart.
+ \brief The duration of the animation for the chart.
*/
/*!
\property QChart::animationEasingCurve
- The easing curve of the animation for the chart.
+ \brief The easing curve of the animation for the chart.
*/
/*!
\property QChart::backgroundVisible
- Specifies whether the chart background is visible or not.
+ \brief Whether the chart background is visible.
\sa setBackgroundBrush(), setBackgroundPen(), plotAreaBackgroundVisible
*/
/*!
\property QChart::dropShadowEnabled
- If set to true, the background drop shadow effect is enabled. If set to false, it is disabled. Note that the drop
- shadow effect depends on theme, which means the setting may be changed if you switch to another theme.
+ \brief Whether the background drop shadow effect is enabled.
+
+ If set to \c true, the background drop shadow effect is enabled. If set to \c false, it
+ is disabled.
+
+ \note The drop shadow effect depends on the theme, and therefore the setting may
+ change if the theme is changed.
*/
/*!
\property QChart::backgroundRoundness
- The diameter of the rounding circle at the corners of the chart background.
+ \brief The diameter of the rounding circle at the corners of the chart background.
*/
/*!
\property QChart::margins
- Margins between the plot area (axes) and the edge of the chart widget.
+ \brief The minimum margins allowed between the edge of the chart rectangle and
+ the plot area.
+
+ The margins are used for drawing the title, axes, and legend.
*/
/*!
\property QChart::theme
- Theme is a built-in collection of UI style related settings applied for all visual elements of a chart, like colors,
- pens, brushes, and fonts of series, axes, title, and legend. \l {Chart themes example} shows an example with a few
- different themes.
- \note Changing the theme will overwrite all customizations previously applied to the series.
+ \brief The theme used for the chart.
*/
/*!
\property QChart::title
- Title is the name (label) of a chart. It is shown as a headline on top of the chart. Chart title supports html formatting.
+ \brief The title of the chart.
+
+ The title is shown as a headline on top of the chart. Chart titles support HTML formatting.
*/
/*!
\property QChart::chartType
- Chart type indicates if the chart is a cartesian chart or a polar chart.
+ \brief Whether the chart is a cartesian chart or a polar chart.
+
This property is set internally and it is read only.
\sa QPolarChart
*/
/*!
\property QChart::plotAreaBackgroundVisible
- Specifies whether the chart plot area background is visible or not.
- \note By default the plot area background is not visible and the plot area uses
+ \brief Whether the chart plot area background is visible.
+
+ \note By default, the plot area background is invisible and the plot area uses
the general chart background.
\sa setPlotAreaBackgroundBrush(), setPlotAreaBackgroundPen(), backgroundVisible
*/
/*!
\property QChart::localizeNumbers
- \since QtCharts 2.0
+ \brief Whether numbers are localized.
+
When \c{true}, all generated numbers appearing in various series and axis labels will be
- localized using the QLocale set with the locale property.
- When \c{false}, the "C" locale is always used.
+ localized using the QLocale set with the \l locale property.
+ When \c{false}, the \e C locale is always used.
Defaults to \c{false}.
- \note This property doesn't affect QDateTimeAxis labels, which always use the QLocale set with
+
+ \note This property does not affect QDateTimeAxis labels, which always use the QLocale set with
the locale property.
\sa locale
@@ -170,25 +209,27 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QChart::locale
- \since QtCharts 2.0
- Sets the locale used to format various chart labels when localizeNumbers is \c{true}.
- This also determines the locale used to format QDateTimeAxis labels regardless of
- localizeNumbers property.
- Defaults to application default locale at the time the chart is constructed.
+ \brief The locale used to format various chart labels.
+
+ Labels are localized only when \l localizeNumbers is \c true, except for QDateTimeAxis
+ labels, which always use the QLocale set with this property.
+
+ Defaults to the application default locale at the time when the chart is constructed.
\sa localizeNumbers
*/
/*!
\property QChart::plotArea
- Holds the rectangle within which the drawing of the chart is done.
- It does not include the area defined by margins.
+ \brief The rectangle within which the chart is drawn.
+
+ The plot area does not include the area defined by margins.
*/
/*!
\internal
- Constructs a chart object of \a type which is a child of a \a parent.
- Parameter \a wFlags is passed to the QGraphicsWidget constructor.
+ Constructs a chart object of \a type that is a child of \a parent.
+ The properties specified by \a wFlags are passed to the QGraphicsWidget constructor.
This constructor is called only by subclasses.
*/
QChart::QChart(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wFlags)
@@ -199,8 +240,8 @@ QChart::QChart(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wF
}
/*!
- Constructs a chart object which is a child of a \a parent.
- Parameter \a wFlags is passed to the QGraphicsWidget constructor.
+ Constructs a chart object that is a child of \a parent.
+ The properties specified by \a wFlags are passed to the QGraphicsWidget constructor.
*/
QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags)
: QGraphicsWidget(parent, wFlags),
@@ -210,7 +251,7 @@ QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags)
}
/*!
- Destroys the chart object and its children, like series and axis objects added to it.
+ Deletes the chart object and its children, such as the series and axis objects added to it.
*/
QChart::~QChart()
{
@@ -220,9 +261,10 @@ QChart::~QChart()
}
/*!
- Adds the \a series onto the chart and takes the ownership of it.
+ Adds the series \a series to the chart and takes ownership of it.
- \note A newly added series is attached to no axes by default, including any axes that were created for the chart
+ \note A newly added series is not attached to any axes by default, not even those that
+ might have been created for the chart
using createDefaultAxes() before the series was added to the chart. If no axes are attached to
the newly added series before the chart is shown, the series will get drawn as if it had axes with ranges
that exactly fit the series to the plot area of the chart. This can be confusing if the same chart also displays other
@@ -238,8 +280,8 @@ void QChart::addSeries(QAbstractSeries *series)
}
/*!
- Removes the \a series from the chart.
- The chart releases its ownership of the specified \a series object.
+ Removes the series \a series from the chart.
+ The chart releases the ownership of the specified \a series object.
\sa addSeries(), removeAllSeries()
*/
@@ -263,7 +305,7 @@ void QChart::removeAllSeries()
}
/*!
- Sets the \a brush that is used for painting the background of the chart area.
+ Sets the brush that is used for painting the background of the chart area to \a brush.
*/
void QChart::setBackgroundBrush(const QBrush &brush)
{
@@ -279,7 +321,7 @@ QBrush QChart::backgroundBrush() const
}
/*!
- Sets the \a pen that is used for painting the background of the chart area.
+ Sets the pen that is used for painting the background of the chart area to \a pen.
*/
void QChart::setBackgroundPen(const QPen &pen)
{
@@ -305,7 +347,7 @@ QString QChart::title() const
}
/*!
- Sets the \a font that is used for drawing the chart title.
+ Sets the font that is used for drawing the chart title to \a font.
*/
void QChart::setTitleFont(const QFont &font)
{
@@ -321,7 +363,7 @@ QFont QChart::titleFont() const
}
/*!
- Sets the \a brush used for drawing the title text.
+ Sets the brush used for drawing the title text to \a brush.
*/
void QChart::setTitleBrush(const QBrush &brush)
{
@@ -347,7 +389,7 @@ QChart::ChartTheme QChart::theme() const
}
/*!
- Zooms in the view by a factor of two.
+ Zooms into the view by a factor of two.
*/
void QChart::zoomIn()
{
@@ -355,7 +397,8 @@ void QChart::zoomIn()
}
/*!
- Zooms in the view to a maximum level at which \a rect is still fully visible.
+ Zooms into the view to a maximum level at which the rectangle \a rect is still
+ fully visible.
\note This is not supported for polar charts.
*/
void QChart::zoomIn(const QRectF &rect)
@@ -366,7 +409,7 @@ void QChart::zoomIn(const QRectF &rect)
}
/*!
- Zooms out the view by a factor of two.
+ Zooms out of the view by a factor of two.
*/
void QChart::zoomOut()
{
@@ -374,9 +417,10 @@ void QChart::zoomOut()
}
/*!
- Zooms in the view by a custom \a factor.
+ Zooms into the view by the custom factor \a factor.
- A factor over 1.0 zooms the view in and factor between 0.0 and 1.0 zooms out.
+ A factor over 1.0 zooms into the view and a factor between 0.0 and 1.0 zooms
+ out of it.
*/
void QChart::zoom(qreal factor)
{
@@ -398,9 +442,10 @@ void QChart::zoom(qreal factor)
/*!
Resets the series domains to what they were before any zoom method was called.
- Note that this will also reset any scrolls and explicit axis range settings done between
+
+ \note This will also reset scrolling and explicit axis range settings specified between
the first zoom operation and calling this method. If no zoom operation has been
- done, this method does nothing.
+ performed, this method does nothing.
*/
void QChart::zoomReset()
{
@@ -408,7 +453,7 @@ void QChart::zoomReset()
}
/*!
- Returns true if any series has a zoomed domain.
+ Returns \c true if any series has a zoomed domain.
*/
bool QChart::isZoomed()
{
@@ -417,7 +462,7 @@ bool QChart::isZoomed()
/*!
Returns a pointer to the horizontal axis attached to the specified \a series.
- If no \a series is specified, the first horizontal axis added to the chart is returned.
+ If no series is specified, the first horizontal axis added to the chart is returned.
\sa addAxis(), QAbstractSeries::attachAxis()
*/
@@ -431,7 +476,7 @@ QAbstractAxis *QChart::axisX(QAbstractSeries *series) const
/*!
Returns a pointer to the vertical axis attached to the specified \a series.
- If no \a series is specified, the first vertical axis added to the chart is returned.
+ If no series is specified, the first vertical axis added to the chart is returned.
\sa addAxis(), QAbstractSeries::attachAxis()
*/
@@ -444,8 +489,9 @@ QAbstractAxis *QChart::axisY(QAbstractSeries *series) const
}
/*!
- Returns the axes attached to the \a series with \a orientation. If no \a series is provided,
- then all axes added to the chart with the specified orientation are returned.
+ Returns the axes attached to the series \a series with the orientation specified
+ by \a orientation. If no series is specified, all axes added to the chart with
+ the specified orientation are returned.
\sa addAxis(), createDefaultAxes()
*/
QList<QAbstractAxis *> QChart::axes(Qt::Orientations orientation, QAbstractSeries *series) const
@@ -498,7 +544,8 @@ QList<QAbstractAxis *> QChart::axes(Qt::Orientations orientation, QAbstractSerie
If there are several QXYSeries derived series added to the chart and no series of other types have been added, then only one pair of axes is created.
If there are several series of different types added to the chart, then each series gets its own axes pair.
- The axes specific to the series can be later obtained from the chart by providing the series as the parameter for axes() function call.
+ The axes specific to the series can be later obtained from the chart by providing the series
+ as the parameter for the axes() function call.
QPieSeries does not create any axes.
\sa axisX(), axisY(), axes(), setAxisX(), setAxisY(), QAbstractSeries::attachAxis()
@@ -537,7 +584,7 @@ QRectF QChart::plotArea() const
}
/*!
- Sets the \a brush for the background of the plot area of the chart.
+ Sets the brush used to fill the background of the plot area of the chart to \a brush.
\sa plotArea(), plotAreaBackgroundVisible, setPlotAreaBackgroundPen(), plotAreaBackgroundBrush()
*/
@@ -547,7 +594,7 @@ void QChart::setPlotAreaBackgroundBrush(const QBrush &brush)
}
/*!
- Returns the brush for the background of the plot area of the chart.
+ Returns the brush used to fill the background of the plot area of the chart.
\sa plotArea(), plotAreaBackgroundVisible, plotAreaBackgroundPen(), setPlotAreaBackgroundBrush()
*/
@@ -557,7 +604,7 @@ QBrush QChart::plotAreaBackgroundBrush() const
}
/*!
- Sets the \a pen for the background of the plot area of the chart.
+ Sets the pen used to draw the background of the plot area of the chart to \a pen.
\sa plotArea(), plotAreaBackgroundVisible, setPlotAreaBackgroundBrush(), plotAreaBackgroundPen()
*/
@@ -567,7 +614,7 @@ void QChart::setPlotAreaBackgroundPen(const QPen &pen)
}
/*!
- Returns the pen for the background of the plot area of the chart.
+ Returns the pen used to draw the background of the plot area of the chart.
\sa plotArea(), plotAreaBackgroundVisible, plotAreaBackgroundBrush(), setPlotAreaBackgroundPen()
*/
@@ -637,9 +684,9 @@ QEasingCurve QChart::animationEasingCurve() const
}
/*!
- Scrolls the visible area of the chart by the distance defined in the \a dx and \a dy.
+ Scrolls the visible area of the chart by the distance specified by \a dx and \a dy.
- For polar charts, \a dx indicates the angle along angular axis instead of distance.
+ For polar charts, \a dx indicates the angle along the angular axis instead of distance.
*/
void QChart::scroll(qreal dx, qreal dy)
{
@@ -687,9 +734,10 @@ QList<QAbstractSeries *> QChart::series() const
}
/*!
- Adds the \a axis to the chart and attaches it to the \a series as a bottom-aligned horizontal axis.
- The chart takes ownership of both the \a axis and the \a series.
- Any horizontal axes previously attached to the \a series are deleted.
+ Adds the axis \a axis to the chart and attaches it to the series \a series as a
+ bottom-aligned horizontal axis.
+ The chart takes ownership of both the axis and the series.
+ Any horizontal axes previously attached to the series are deleted.
\sa axisX(), axisY(), setAxisY(), createDefaultAxes(), QAbstractSeries::attachAxis()
*/
@@ -708,9 +756,10 @@ void QChart::setAxisX(QAbstractAxis *axis ,QAbstractSeries *series)
}
/*!
- Adds the \a axis to the chart and attaches it to the \a series as a left-aligned vertical axis.
- The chart takes ownership of both the \a axis and the \a series.
- Any vertical axes previously attached to the \a series are deleted.
+ Adds the axis \a axis to the chart and attaches it to the series \a series as a
+ left-aligned vertical axis.
+ The chart takes ownership of both the axis and the series.
+ Any vertical axes previously attached to the series are deleted.
\sa axisX(), axisY(), setAxisX(), createDefaultAxes(), QAbstractSeries::attachAxis()
*/
@@ -729,7 +778,8 @@ void QChart::setAxisY(QAbstractAxis *axis ,QAbstractSeries *series)
}
/*!
- Adds the \a axis to the chart with \a alignment. The chart takes the ownership of the axis.
+ Adds the axis \a axis to the chart aligned as specified by \a alignment.
+ The chart takes the ownership of the axis.
\sa removeAxis(), createDefaultAxes(), QAbstractSeries::attachAxis()
*/
@@ -739,8 +789,8 @@ void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment)
}
/*!
- Removes the \a axis from the chart.
- The chart releases its ownership of the specified \a axis object.
+ Removes the axis \a axis from the chart.
+ The chart releases the ownership of the specified \a axis object.
\sa addAxis(), createDefaultAxes(), QAbstractSeries::detachAxis()
*/
@@ -750,7 +800,8 @@ void QChart::removeAxis(QAbstractAxis *axis)
}
/*!
- Returns the value in the \a series domain that corresponds to the \a position relative to chart widget.
+ Returns the value in the series specified by \a series at the position
+ specified by \a position in a chart.
*/
QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series)
{
@@ -758,7 +809,8 @@ QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series)
}
/*!
- Returns the position on the chart widget that corresponds to the \a value in the \a series domain.
+ Returns the position on the chart that corresponds to the value \a value in the
+ series specified by \a series.
*/
QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series)
{
diff --git a/src/charts/qchartview.cpp b/src/charts/qchartview.cpp
index fe16dabc..31fb6286 100644
--- a/src/charts/qchartview.cpp
+++ b/src/charts/qchartview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -36,22 +36,30 @@
/*!
\enum QChartView::RubberBand
- This enum describes the different types of rubber bands that can be used for zoom rect selection
+ This enum describes the different types of rubber band effects that can
+ be applied to the rectangular zooming area.
\value NoRubberBand
+ No zooming area is specified, and therefore zooming is not enabled.
\value VerticalRubberBand
+ The rubber band is locked to the size of the chart horizontally
+ and can be pulled vertically to specify the zooming area.
\value HorizontalRubberBand
+ The rubber band is locked to the size of the chart vertically
+ and can be pulled horizontally to specify the zooming area.
\value RectangleRubberBand
+ The rubber band is fixed to the point that was clicked and can be
+ pulled both vertically and horizontally.
*/
/*!
\class QChartView
\inmodule Qt Charts
- \brief Standalone charting widget.
+ \brief The QChartView is a standalone widget that can display charts.
- QChartView is a standalone widget that can display charts. It does not require separate
- QGraphicsScene to work. If you want to display a chart in your existing QGraphicsScene,
- you need to use the QChart (or QPolarChart) class instead.
+ A chart view does not require a QGraphicsScene object to work. To display
+ a chart in an existing QGraphicsScene, the QChart or QPolarChart class should
+ be used instead.
\sa QChart, QPolarChart
*/
@@ -59,7 +67,7 @@
QT_CHARTS_BEGIN_NAMESPACE
/*!
- Constructs a chartView object with parent \a parent.
+ Constructs a chart view object with the parent \a parent.
*/
QChartView::QChartView(QWidget *parent)
@@ -70,8 +78,8 @@ QChartView::QChartView(QWidget *parent)
}
/*!
- Constructs a chartview object with parent \a parent to display a \a chart.
- Ownership of the \a chart is passed to chartview.
+ Constructs a chart view object with the parent \a parent to display the
+ chart \a chart. The ownership of the chart is passed to the chart view.
*/
QChartView::QChartView(QChart *chart, QWidget *parent)
@@ -83,7 +91,7 @@ QChartView::QChartView(QChart *chart, QWidget *parent)
/*!
- Destroys the chartview object and the associated chart.
+ Deletes the chart view object and the associated chart.
*/
QChartView::~QChartView()
{
@@ -98,10 +106,10 @@ QChart *QChartView::chart() const
}
/*!
- Sets the current chart to \a chart. Ownership of the new chart is passed to chartview
- and ownership of the previous chart is released.
+ Sets the current chart to \a chart. The ownership of the new chart is passed to
+ the chart view and the ownership of the previous chart is released.
- To avoid memory leaks users need to make sure the previous chart is deleted.
+ To avoid memory leaks, the previous chart must be deleted.
*/
void QChartView::setChart(QChart *chart)
@@ -111,7 +119,7 @@ void QChartView::setChart(QChart *chart)
/*!
Sets the rubber band flags to \a rubberBand.
- Selected flags determine the way zooming is performed.
+ The selected flags determine the way zooming is performed.
\note Rubber band zooming is not supported for polar charts.
*/
@@ -137,7 +145,7 @@ void QChartView::setRubberBand(const RubberBands &rubberBand)
}
/*!
- Returns the rubber band flags that are currently being used by the widget.
+ Returns the rubber band flags that are currently being used by the chart view.
*/
QChartView::RubberBands QChartView::rubberBand() const
{
@@ -145,8 +153,12 @@ QChartView::RubberBands QChartView::rubberBand() const
}
/*!
- If Left mouse button is pressed and the rubber band is enabled the \a event is accepted and the rubber band is displayed on the screen allowing the user to select the zoom area.
- If different mouse button is pressed and/or the rubber band is disabled then the \a event is passed to QGraphicsView::mousePressEvent() implementation.
+ If the left mouse button is pressed and the rubber band is enabled, the event
+ \a event is accepted and the rubber band is displayed on the screen. This
+ enables the user to select the zoom area.
+
+ If some other mouse button is pressed or the rubber band is disabled, the event
+ is passed to QGraphicsView::mousePressEvent().
*/
void QChartView::mousePressEvent(QMouseEvent *event)
{
@@ -167,8 +179,9 @@ void QChartView::mousePressEvent(QMouseEvent *event)
}
/*!
- If the rubber band rectange has been displayed in pressEvent then \a event data is used to update the rubber band geometry.
- Otherwise the default QGraphicsView::mouseMoveEvent implementation is called.
+ If the rubber band rectangle is displayed in the press event specified by
+ \a event, the event data is used to update the rubber band geometry.
+ Otherwise, the default QGraphicsView::mouseMoveEvent() implementation is called.
*/
void QChartView::mouseMoveEvent(QMouseEvent *event)
{
@@ -195,9 +208,10 @@ void QChartView::mouseMoveEvent(QMouseEvent *event)
}
/*!
- If left mouse button is released and the rubber band is enabled then \a event is accepted and
- the view is zoomed into the rect specified by the rubber band.
- If it is a right mouse button \a event then the view is zoomed out.
+ If the left mouse button is released and the rubber band is enabled, the
+ event \a event is accepted and the view is zoomed into the rectangle
+ specified by the rubber band. If releasing the right mouse button triggered
+ the event, the view is zoomed out.
*/
void QChartView::mouseReleaseEvent(QMouseEvent *event)
{
@@ -248,7 +262,7 @@ void QChartView::mouseReleaseEvent(QMouseEvent *event)
}
/*!
- Resizes and updates the chart area using the \a event data
+ Resizes and updates the chart area using the data specified by \a event.
*/
void QChartView::resizeEvent(QResizeEvent *event)
{
diff --git a/src/charts/qpolarchart.cpp b/src/charts/qpolarchart.cpp
index aaa5092a..b9e6ea1f 100644
--- a/src/charts/qpolarchart.cpp
+++ b/src/charts/qpolarchart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -35,41 +35,47 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\enum QPolarChart::PolarOrientation
- This type is used to specify the polar orientation of an axis.
+ This enum type specifies the polar orientation of an axis.
\value PolarOrientationRadial
+ A radial axis, where the values are placed along the radius of the
+ chart, starting at the pole.
\value PolarOrientationAngular
+ An angular axis, where the values are placed around the chart.
*/
/*!
\class QPolarChart
\inmodule Qt Charts
- \brief Polar chart API for Qt Charts.
+ \brief The QPolarChart presents data in polar charts.
- QPolarChart is a specialization of QChart to show a polar chart.
+ Polar charts present data in a circular graph, where the placement of data
+ is based on the angle and distance from the center of the graph, the \e pole.
- Polar charts support line, spline, area, and scatter series, and all axis types
- supported by those series.
+ \image examples_polarchart.png
- \note When setting ticks to an angular QValueAxis, keep in mind that the first and last tick
- are co-located at 0/360 degree angle.
+ A polar chart is a specialization of QChart that supports line, spline, area,
+ and scatter series, and all axis types supported by them. Each axis can be used
+ either as a radial or an angular axis.
- \note If the angular distance between two consecutive points in a series is more than 180 degrees,
- any line connecting the two points becomes meaningless, so choose the axis ranges accordingly
- when displaying line, spline, or area series. In such case series don't draw a direct line between
- the two points, but instead draw a line to and from the center of the chart.
+ The first and last tick mark on an angular QValueAxis are co-located at a 0/360 degree angle.
- \note Polar charts draw all axes of same orientation in the same position, so using multiple
- axes of same orientation can be confusing, unless the extra axes are only used to customize the
- grid (e.g. you can display a highlighted range with a secondary shaded QCategoryAxis or provide
- unlabeled subticks with a secondary QValueAxis that has its labels hidden).
+ If the angular distance between two consecutive points in a series is more than 180 degrees,
+ any direct line connecting the two points becomes meaningless, and will not be drawn. Instead,
+ a line will be drawn to and from the center of the chart. Therefore, the axis ranges must be
+ chosen accordingly when displaying line, spline, or area series.
+
+ Polar charts draw all axes of the same orientation in the same position, so using multiple
+ axes of the same orientation can be confusing, unless the extra axes are only used to customize the
+ grid. For example, you can display a highlighted range with a secondary shaded QCategoryAxis
+ or provide unlabeled subticks with a secondary QValueAxis thas has hidden labels.
\sa QChart
*/
/*!
- Constructs a polar chart as a child of the \a parent.
- Parameter \a wFlags is passed to the QChart constructor.
+ Constructs a polar chart as a child of \a parent.
+ The properties specified by \a wFlags are passed to the QChart constructor.
*/
QPolarChart::QPolarChart(QGraphicsItem *parent, Qt::WindowFlags wFlags)
: QChart(QChart::ChartTypePolar, parent, wFlags)
@@ -77,14 +83,15 @@ QPolarChart::QPolarChart(QGraphicsItem *parent, Qt::WindowFlags wFlags)
}
/*!
- Destroys the polar chart object and its children, like series and axis objects added to it.
+ Deletes the polar chart object and its children, such as the series and axis objects added to it.
*/
QPolarChart::~QPolarChart()
{
}
/*!
- Returns the axes added for the \a series with \a polarOrientation. If no series is provided, then any axis with the
+ Returns the axes added for the series \a series with the polar orientation
+ \a polarOrientation. If no series is provided, any axis with the
specified polar orientation is returned.
\sa addAxis()
@@ -101,12 +108,13 @@ QList<QAbstractAxis *> QPolarChart::axes(PolarOrientations polarOrientation, QAb
}
/*!
- This convenience method adds \a axis to the polar chart with \a polarOrientation.
+ This convenience method adds the axis \a axis to the polar chart with the polar
+ orientation \a polarOrientation.
The chart takes the ownership of the axis.
- \note Axes can be added to a polar chart also with QChart::addAxis() instead of this method.
- The specified alignment determines the polar orientation: horizontal alignments indicate angular
- axis and vertical alignments indicate radial axis.
+ \note Axes can be added to a polar chart also with QChart::addAxis().
+ The specified alignment determines the polar orientation: horizontal alignments indicate
+ an angular axis and vertical alignments indicate a radial axis.
\sa QChart::removeAxis(), QChart::createDefaultAxes(), QAbstractSeries::attachAxis(), QChart::addAxis()
*/
@@ -123,10 +131,10 @@ void QPolarChart::addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation
}
/*!
- Angular axes of a polar chart report horizontal orientation and radial axes report
+ The angular axes of a polar chart report horizontal orientation and the radial axes report
vertical orientation.
- This function is a convenience function for converting the orientation of an \a axis to
- corresponding polar orientation. If the \a axis is NULL or not added to a polar chart,
+ This function is a convenience function for converting the orientation of the axis \a axis to
+ the corresponding polar orientation. If the \a axis is null or not added to a polar chart,
the return value is meaningless.
*/
QPolarChart::PolarOrientation QPolarChart::axisPolarOrientation(QAbstractAxis *axis)
diff --git a/src/charts/scatterchart/qscatterseries.cpp b/src/charts/scatterchart/qscatterseries.cpp
index 767bd137..52855ac5 100644
--- a/src/charts/scatterchart/qscatterseries.cpp
+++ b/src/charts/scatterchart/qscatterseries.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -38,14 +38,15 @@
/*!
\class QScatterSeries
\inmodule Qt Charts
- \brief The QScatterSeries class is used for making scatter charts.
+ \brief The QScatterSeries class presents data in scatter charts.
- The scatter data is displayed as a collection of points on the chart. Each point determines the position on the horizontal axis
- and the vertical axis.
+ The scatter data is displayed as a collection of points on the chart. For
+ each point, two values are specified that determine its position on the
+ horizontal axis and the vertical axis.
\image examples_scatterchart.png
- Creating basic scatter chart is simple:
+ The following code snippet illustrates how to create a basic scatter chart:
\code
QScatterSeries* series = new QScatterSeries();
series->append(0, 6);
@@ -53,6 +54,9 @@
...
chart->addSeries(series);
\endcode
+
+ For more information, see \l{ScatterChart Example} and
+ \l {Scatter Interactions Example}.
*/
/*!
\qmltype ScatterSeries
@@ -61,122 +65,125 @@
\inherits XYSeries
- \brief The ScatterSeries type is used for making scatter charts.
+ \brief The ScatterSeries type presents data in scatter charts.
- The following QML shows how to create a chart with two simple scatter series:
- \snippet qmlchart/qml/qmlchart/View5.qml 1
+ The scatter data is displayed as a collection of points on the chart. For
+ each point, two values are specified that determine its position on the
+ horizontal axis and the vertical axis.
- \beginfloatleft
\image examples_qmlchart5.png
- \endfloat
- \clearfloat
+
+ The following QML code shows how to create a chart with two simple scatter
+ series:
+ \snippet qmlchart/qml/qmlchart/View5.qml 1
+
+ For more information, see \l{Qml Charts Example}.
*/
/*!
\enum QScatterSeries::MarkerShape
- This enum describes the shape used when rendering marker items.
+ This enum value describes the shape used when rendering marker items.
\value MarkerShapeCircle
+ The marker is a circle. This is the default value.
\value MarkerShapeRectangle
+ The marker is a rectangle.
*/
/*!
\property QScatterSeries::brush
- Brush used to draw the series.
+ \brief The brush used to draw the scatter series markers.
+
+ The brush can be an image that can be created using QPainterPath,
+ for example.
*/
/*!
\property QScatterSeries::color
- Fill (brush) color of the series. This is a convenience property for modifying the color of brush.
+ \brief The color used to fill the series markers.
+
+ This is a convenience property for modifying the color of the brush.
\sa QScatterSeries::brush()
*/
/*!
\property QScatterSeries::borderColor
- Line (pen) color of the series. This is a convenience property for modifying the color of pen.
+ \brief The color used to draw the marker borders.
+
+ This is a convenience property for modifying the color of the pen.
\sa QScatterSeries::pen()
*/
/*!
\qmlproperty color ScatterSeries::borderColor
- Border (pen) color of the series.
+ The color used to draw the marker borders.
*/
/*!
\qmlproperty real ScatterSeries::borderWidth
- The width of the border line. By default the width is 2.0.
+ The width of the border line. By default, the width is 2.0.
*/
/*!
\property QScatterSeries::markerShape
- Defines the shape of the marker used to draw the points in the series. The default shape is MarkerShapeCircle.
+ \brief The shape of the marker used to render the points in the series.
+
+ The default shape is MarkerShapeCircle.
+
+ \sa MarkerShape
*/
/*!
- \qmlproperty MarkerShape ScatterSeries::markerShape
- Defines the shape of the marker used to draw the points in the series. One of ScatterSeries
- ScatterSeries.MarkerShapeCircle or ScatterSeries.MarkerShapeRectangle.
- The default shape is ScatterSeries.MarkerShapeCircle.
+ \qmlproperty enumeration ScatterSeries::markerShape
+
+ The shape used when rendering marker items:
+
+ \value ScatterSeries.MarkerShapeCircle
+ The marker is a circle. This is the default value.
+ \value ScatterSeries.MarkerShapeRectangle
+ The marker is a rectangle.
*/
/*!
\property QScatterSeries::markerSize
- Defines the size of the marker used to draw the points in the series. The default size is 15.0.
+ \brief The size of the marker used to render the points in the series.
+
+ The default size is 15.0.
*/
/*!
\qmlproperty real ScatterSeries::markerSize
- Defines the size of the marker used to draw the points in the series. The default size is 15.0.
+ The size of the marker used to render the points in the series.
+ The default size is 15.0.
*/
/*!
- \qmlproperty QString ScatterSeries::brushFilename
+ \qmlproperty string ScatterSeries::brushFilename
The name of the file used as a brush for the series.
*/
/*!
\fn void QScatterSeries::colorChanged(QColor color)
- Signal is emitted when the fill (brush) color has changed to \a color.
-*/
-/*!
- \qmlsignal ScatterSeries::onColorChanged(color color)
- Signal is emitted when the fill (brush) color has changed to \a color.
+ This signal is emitted when the fill (brush) color changes to \a color.
*/
/*!
\fn void QScatterSeries::borderColorChanged(QColor color)
- Signal is emitted when the line (pen) color has changed to \a color.
-*/
-/*!
- \qmlsignal ScatterSeries::onBorderColorChanged(color color)
- Signal is emitted when the line (pen) color has changed to \a color.
-*/
-
-/*!
- \fn QAbstractSeries::SeriesType QScatterSeries::type() const
- Returns QAbstractSeries::SeriesTypeScatter.
- \sa QAbstractSeries, SeriesType
+ This signal is emitted when the line (pen) color changes to \a color.
*/
/*!
\fn void QScatterSeries::markerShapeChanged(MarkerShape shape)
- Signal is emitted when the marker shape has changed to \a shape.
-*/
-/*!
- \qmlsignal ScatterSeries::onMarkerShapeChanged(MarkerShape shape)
- Signal is emitted when the marker shape has changed to \a shape.
+ This signal is emitted when the marker shape changes to \a shape.
*/
+
/*!
\fn void QScatterSeries::markerSizeChanged(qreal size)
- Signal is emitted when the marker size has changed to \a size.
-*/
-/*!
- \qmlsignal ScatterSeries::onMarkerSizeChanged(real size)
- Signal is emitted when the marker size has changed to \a size.
+ This signal is emitted when the marker size changes to \a size.
*/
QT_CHARTS_BEGIN_NAMESPACE
/*!
- Constructs a series object which is a child of \a parent.
+ Constructs a series object that is a child of \a parent.
*/
QScatterSeries::QScatterSeries(QObject *parent)
: QXYSeries(*new QScatterSeriesPrivate(this), parent)
@@ -184,7 +191,9 @@ QScatterSeries::QScatterSeries(QObject *parent)
}
/*!
- Destroys the object. Note that adding series to QChart transfers the ownership to the chart.
+ Deletes the scatter series.
+
+ \note Adding the series to QChart transfers the ownership to the chart.
*/
QScatterSeries::~QScatterSeries()
{
@@ -193,15 +202,16 @@ QScatterSeries::~QScatterSeries()
d->m_chart->removeSeries(this);
}
+/*!
+ \reimp
+*/
QAbstractSeries::SeriesType QScatterSeries::type() const
{
return QAbstractSeries::SeriesTypeScatter;
}
/*!
- Sets \a pen used for drawing points' border on the chart. If the pen is not defined, the
- pen from chart theme is used.
- \sa QChart::setTheme()
+ \reimp
*/
void QScatterSeries::setPen(const QPen &pen)
{
@@ -216,9 +226,7 @@ void QScatterSeries::setPen(const QPen &pen)
}
/*!
- Sets \a brush used for drawing points on the chart. If the brush is not defined, brush
- from chart theme setting is used.
- \sa QChart::setTheme()
+ \reimp
*/
void QScatterSeries::setBrush(const QBrush &brush)
{
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;
diff --git a/src/charts/xychart/qhxymodelmapper.cpp b/src/charts/xychart/qhxymodelmapper.cpp
index e18f6e76..4863b69c 100644
--- a/src/charts/xychart/qhxymodelmapper.cpp
+++ b/src/charts/xychart/qhxymodelmapper.cpp
@@ -34,133 +34,158 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHXYModelMapper
\inmodule Qt Charts
- \brief Horizontal model mapper for QXYSeries.
+ \brief The QHXYModelMapper class is a horizontal model mapper for line,
+ spline, and scatter series.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Horizontal model mapper is used to create a connection between QXYSeries and QAbstractItemModel derived model object.
- It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync.
- Note: used model has to support adding/removing rows/columns and modifying the data of the cells.
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A horizontal model mapper is used to
+ create a connection between a line, spline, or scatter series and the data
+ model that holds the consecutive data point coordinates on rows.
+
+ Both model and series properties can be used to manipulate the data. The
+ model mapper keeps the series and the data model in sync.
+
+ \sa QVXYModelMapper, QXYSeries
*/
/*!
\qmltype HXYModelMapper
\instantiates QHXYModelMapper
\inqmlmodule QtCharts
- \brief Horizontal model mapper for QXYSeries
+ \brief A horizontal model mapper for XYSeries.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A horizontal model mapper is used to
+ create a connection between a line, spline, or scatter series and the data
+ model that holds the consecutive data point coordinates on rows.
- HXYModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as
- a data source for XYSeries based series. It is possible to use both QAbstractItemModel and
- XYSeries data API to manipulate data. HXYModelMapper keeps the series and the model in sync.
+ Both model and series properties can be used to manipulate the data. The
+ model mapper keeps the series and the data model in sync.
+
+ \sa VXYModelMapper, XYSeries
*/
/*!
\property QHXYModelMapper::series
- \brief Defines the QXYSeries object that is used by the mapper.
+ \brief The series that is used by the mapper.
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it
+ preserves its data).
*/
/*!
\qmlproperty XYSeries HXYModelMapper::series
- Defines the XYSeries object that is used by the mapper. All the data in the series is discarded when it is set to
- the mapper. When new series is specified the old series is disconnected (it preserves its data).
+ The series that is used by the mapper. All the data in the series is
+ discarded when it is set to the mapper. When a new series is specified, the
+ old series is disconnected (but it preserves its data).
*/
/*!
\property QHXYModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel HXYModelMapper::model
- The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ The data model that is used by the mapper. You need to implement the model
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and
+ modifying the data in the cells.
*/
/*!
\property QHXYModelMapper::xRow
- \brief Defines which row of the model is kept in sync with the x values of the QXYSeries.
+ \brief The row of the model that contains the x-coordinates of the data
+ points.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HXYModelMapper::xRow
- Defines which row of the model is kept in sync with the x values of the series. Default value is -1 (invalid
- mapping).
+ The row of the model that contains the x-coordinates of the data points.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QHXYModelMapper::yRow
- \brief Defines which row of the model is kept in sync with the y values of the QXYSeries.
+ \brief The row of the model that contains the y-coordinates of the data
+ points.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int HXYModelMapper::yRow
- Defines which row of the model is kept in sync with the y values of the series. Default value is -1
- (invalid mapping).
+ The row of the model that contains the y-coordinates of the data points.
+
+ The default value is -1 (invalid mapping).
*/
/*!
\property QHXYModelMapper::firstColumn
- \brief Defines which column of the model contains the data for the first point of the series.
+ \brief The column of the model that contains the data for the first point of the series.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int HXYModelMapper::firstColumn
- Defines which column of the model contains the data for the first point of the series.
+ The column of the model that contains the data for the first point of the series.
The default value is 0.
*/
/*!
\property QHXYModelMapper::columnCount
- \brief Defines the number of columns of the model that are mapped as the data for series.
+ \brief The number of columns of the model that are mapped as the data for series.
- Minimal and default value is: -1 (count limited by the number of columns in the model)
+ The minimum and default value is -1 (the number is limited by the number of
+ columns in the model).
*/
/*!
\qmlproperty int HXYModelMapper::columnCount
- Defines the number of columns of the model that are mapped as the data for series. The default value is
- -1 (count limited by the number of columns in the model)
+ The number of columns of the model that are mapped as the data for series.
+ The default value is -1 (the number is limited by the number of columns in
+ the model).
*/
/*!
\fn void QHXYModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to
+ changes.
*/
/*!
\fn void QHXYModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to
+ changes.
*/
/*!
\fn void QHXYModelMapper::xRowChanged()
- Emitted when the xRow has changed.
+ This signal is emitted when the row that contains the x-coordinates of data
+ points changes.
*/
/*!
\fn void QHXYModelMapper::yRowChanged()
- Emitted when the yRow has changed.
+ This signal is emitted when the row that contains the y-coordinates of data
+ points changes.
*/
/*!
\fn void QHXYModelMapper::firstColumnChanged()
- Emitted when the firstColumn has changed.
+ This signal is emitted when the first column changes.
*/
/*!
\fn void QHXYModelMapper::columnCountChanged()
- Emitted when the columnCount has changed.
+ This signal is emitted when the number of columns changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QHXYModelMapper::QHXYModelMapper(QObject *parent) :
QXYModelMapper(parent)
diff --git a/src/charts/xychart/qvxymodelmapper.cpp b/src/charts/xychart/qvxymodelmapper.cpp
index 3b68d809..3633e6d8 100644
--- a/src/charts/xychart/qvxymodelmapper.cpp
+++ b/src/charts/xychart/qvxymodelmapper.cpp
@@ -34,133 +34,155 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QVXYModelMapper
\inmodule Qt Charts
- \brief Vertical model mapper for QXYSeries.
+ \brief The QVXYModelMapper class is a vertical model mapper for line,
+ spline, and scatter series.
- Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series.
- Vertical model mapper is used to create a connection between QXYSeries and QAbstractItemModel derived model object.
- It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync.
- Note: used model has to support adding/removing rows/columns and modifying the data of the cells.
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A vertical model mapper is used to
+ create a connection between a line, spline, or scatter series and the data
+ model that holds the consecutive data point coordinates in columns.
+
+ Both model and series properties can be used to manipulate the data. The
+ model mapper keeps the series and the data model in sync.
+
+ \sa QHXYModelMapper, QXYSeries
*/
/*!
\qmltype VXYModelMapper
\instantiates QVXYModelMapper
\inqmlmodule QtCharts
- \brief Vertical model mapper for QXYSeries.
+ \brief A vertical model mapper for XYSeries.
+
+ Model mappers enable using a data model derived from the QAbstractItemModel
+ class as a data source for a chart. A vertical model mapper is used to
+ create a connection between a line, spline, or scatter series and the data
+ model that holds the consecutive data point coordinates in columns.
- VXYModelMapper allows you to use your own QAbstractItemModel derived model with data in columns
- as a data source for XYSeries based series. It is possible to use both QAbstractItemModel and
- XYSeries data API to manipulate data. VXYModelMapper keeps the series and the model in sync.
+ Both model and series properties can be used to manipulate the data. The
+ model mapper keeps the series and the data model in sync.
+
+ \sa HXYModelMapper, XYSeries
*/
/*!
\property QVXYModelMapper::series
- \brief Defines the QXYSeries object that is used by the mapper.
+ \brief The series that is used by the mapper.
All the data in the series is discarded when it is set to the mapper.
- When new series is specified the old series is disconnected (it preserves its data)
+ When a new series is specified, the old series is disconnected (but it
+ preserves its data).
*/
/*!
\qmlproperty XYSeries VXYModelMapper::series
- Defines the XYSeries object that is used by the mapper. All the data in the series is discarded when it is set to
- the mapper. When new series is specified the old series is disconnected (it preserves its data).
+ The series that is used by the mapper. All the data in the series is
+ discarded when it is set to the mapper. When a new series is specified, the
+ old series is disconnected (but it preserves its data).
*/
/*!
\property QVXYModelMapper::model
- \brief Defines the model that is used by the mapper.
+ \brief The model that is used by the mapper.
*/
/*!
\qmlproperty SomeModel VXYModelMapper::model
- The QAbstractItemModel based model that is used by the mapper. You need to implement the model
- and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying
- the data of the cells.
+ The data model that is used by the mapper. You need to implement the model
+ and expose it to QML.
+
+ \note The model has to support adding and removing rows or columns and
+ modifying the data in the cells.
*/
/*!
\property QVXYModelMapper::xColumn
- \brief Defines which column of the model is kept in sync with the x values of QXYSeries.
+ \brief The column of the model that contains the x-coordinates of data
+ points.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VXYModelMapper::xColumn
- Defines which column of the model is kept in sync with the x values of the series. Default value is -1 (invalid
- mapping).
+ The column of the model that contains the x-coordinates of data points.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QVXYModelMapper::yColumn
- \brief Defines which column of the model is kept in sync with the y values of QXYSeries.
+ \brief The column of the model that contains the y-coordinates of data
+ points.
- Default value is: -1 (invalid mapping)
+ The default value is -1 (invalid mapping).
*/
/*!
\qmlproperty int VXYModelMapper::yColumn
- Defines which column of the model is kept in sync with the y values of the series. Default value is -1 (invalid
- mapping).
+ The column of the model that contains the y-coordinates of data points.
+ The default value is -1 (invalid mapping).
*/
/*!
\property QVXYModelMapper::firstRow
- \brief Defines which row of the model contains the data for the first point of the series.
+ \brief The row of the model that contains the data for the first point
+ of the series.
- Minimal and default value is: 0
+ The minimum and default value is 0.
*/
/*!
\qmlproperty int VXYModelMapper::firstRow
- Defines which row of the model contains the data for the first point of the series.
+ The row of the model that contains the data for the first point of the series.
The default value is 0.
*/
/*!
\property QVXYModelMapper::rowCount
- \brief Defines the number of rows of the model that are mapped as the data for series.
+ \brief The number of rows of the model that are mapped as the data for series.
- Minimal and default value is: -1 (count limited by the number of rows in the model)
+ The minimum and default value is -1 (the number is limited by the number of
+ rows in the model).
*/
/*!
\qmlproperty int VXYModelMapper::rowCount
- Defines the number of rows of the model that are mapped as the data for series. The default value is
- -1 (count limited by the number of rows in the model).
+ The number of rows of the model that are mapped as the data for series. The default value is
+ -1 (the number is limited by the number of rows in the model).
*/
/*!
\fn void QVXYModelMapper::seriesReplaced()
- Emitted when the series to which mapper is connected to has changed.
+ This signal is emitted when the series that the mapper is connected to changes.
*/
/*!
\fn void QVXYModelMapper::modelReplaced()
- Emitted when the model to which mapper is connected to has changed.
+ This signal is emitted when the model that the mapper is connected to changes.
*/
/*!
\fn void QVXYModelMapper::xColumnChanged()
- Emitted when the xColumn has changed.
+ This signal is emitted when the column that contains the x-coordinates of
+ data points changes.
*/
/*!
\fn void QVXYModelMapper::yColumnChanged()
- Emitted when the yColumn has changed.
+ This signal is emitted when the column that contains the y-coordinates of
+ data points changes.
*/
/*!
\fn void QVXYModelMapper::firstRowChanged()
- Emitted when the firstRow has changed.
+ This signal is emitted when the first row changes.
*/
/*!
\fn void QVXYModelMapper::rowCountChanged()
- Emitted when the rowCount has changed.
+ This signal is emitted when the number of rows changes.
*/
/*!
- Constructs a mapper object which is a child of \a parent.
+ Constructs a mapper object that is a child of \a parent.
*/
QVXYModelMapper::QVXYModelMapper(QObject *parent) :
QXYModelMapper(parent)
diff --git a/src/charts/xychart/qxyseries.cpp b/src/charts/xychart/qxyseries.cpp
index fd8562a1..9a6ea20c 100644
--- a/src/charts/xychart/qxyseries.cpp
+++ b/src/charts/xychart/qxyseries.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -42,7 +42,8 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QXYSeries
\inmodule Qt Charts
- \brief The QXYSeries class is a base class for line, spline and scatter series.
+ \brief The QXYSeries class is a base class for line, spline, and scatter
+ series.
*/
/*!
\qmltype XYSeries
@@ -51,37 +52,36 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractSeries
- \brief The XYSeries type is a base type for line, spline and scatter series.
-
- The XYSeries class is a base class for line, spline and scatter series.
- The class cannot be instantiated directly.
+ \brief A base type for line, spline, and scatter series.
*/
/*!
\qmlproperty AbstractAxis XYSeries::axisX
- The x axis used for the series. If you leave both axisX and axisXTop undefined, a ValueAxis is created for
- the series.
- \sa axisXTop
+ The x-axis used for the series. If you leave both axisX and axisXTop
+ undefined, a value axis is created for the series.
+ \sa axisXTop, QValueAxis
*/
/*!
\qmlproperty AbstractAxis XYSeries::axisY
- The y axis used for the series. If you leave both axisY and axisYRight undefined, a ValueAxis is created for
- the series.
- \sa axisYRight
+ The y-axis used for the series. If you leave both axisY and axisYRight
+ undefined, a value axis is created for the series.
+ \sa axisYRight, ValueAxis
*/
/*!
\qmlproperty AbstractAxis XYSeries::axisXTop
- The x axis used for the series, drawn on top of the chart view. Note that you can only provide either axisX or
- axisXTop, but not both.
+ The x-axis used for the series, drawn on top of the chart view.
+
+ \note You can only provide either axisX or axisXTop, not both.
\sa axisX
*/
/*!
\qmlproperty AbstractAxis XYSeries::axisYRight
- The y axis used for the series, drawn to the right on the chart view. Note that you can only provide either axisY
- or axisYRight, but not both.
+ The y-axis used for the series, drawn to the right on the chart view.
+
+ \note You can only provide either axisY or axisYRight, not both.
\sa axisY
*/
@@ -99,174 +99,169 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\property QXYSeries::pointsVisible
- Controls if the data points are visible and should be drawn.
+ \brief Whether the data points are visible and should be drawn.
*/
/*!
\qmlproperty bool XYSeries::pointsVisible
- Controls if the data points are visible and should be drawn.
+ Whether the data points are visible and should be drawn.
*/
/*!
\fn QPen QXYSeries::pen() const
- \brief Returns pen used to draw points for series.
+ Returns the pen used to draw the outline of the data points for the series.
\sa setPen()
*/
/*!
\fn QBrush QXYSeries::brush() const
- \brief Returns brush used to draw points for series.
+ Returns the brush used to fill the data points for the series.
\sa setBrush()
*/
/*!
\property QXYSeries::color
- The color of the series. This is line (pen) color in case of QLineSeries or QSplineSeries and
+ \brief The color of the series.
+
+ This is the line (pen) color in case of QLineSeries or QSplineSeries and the
fill (brush) color in case of QScatterSeries or QAreaSeries.
\sa pen(), brush()
*/
/*!
\qmlproperty color XYSeries::color
- The color of the series. This is line (pen) color in case of LineSeries or SplineSeries and
- fill (brush) color in case of ScatterSeries or AreaSeries.
+ The color of the series. This is the line (pen) color in case of LineSeries
+ or SplineSeries and the fill (brush) color in case of ScatterSeries or
+ AreaSeries.
*/
/*!
\property QXYSeries::pointLabelsFormat
- The \a format used for showing labels with series points.
+ \brief The format used for showing labels with data points.
QXYSeries supports the following format tags:
\table
\row
- \li @xPoint \li The x value of the data point
+ \li @xPoint \li The x-coordinate of the data point.
\row
- \li @yPoint \li The y value of the data point
+ \li @yPoint \li The y-coordinate of the data point.
\endtable
- For example, the following usage of the format tags would produce labels that have the data
- point (x, y) shown inside brackets separated by a comma:
+ For example, the following usage of the format tags would produce labels
+ that display the data point shown inside brackets separated by a comma
+ (x, y):
+
\code
series->setPointLabelsFormat("(@xPoint, @yPoint)");
\endcode
- By default, the labels format is set to '@xPoint, @yPoint'. The labels are shown on the plot
- area, labels on the edge of the plot area are cut. If the points are close to each other the
- labels may overlap.
+ By default, the labels' format is set to \c {@xPoint, @yPoint}. The labels
+ are shown on the plot area, and the labels on the edge of the plot area are
+ cut. If the points are close to each other, the labels may overlap.
\sa pointLabelsVisible, pointLabelsFont, pointLabelsColor
*/
/*!
\qmlproperty string XYSeries::pointLabelsFormat
- The \a format used for showing labels with series points.
+ The format used for showing labels with data points.
- \sa pointLabelsFormat, pointLabelsVisible, pointLabelsFont, pointLabelsColor
+ \sa pointLabelsVisible, pointLabelsFont, pointLabelsColor
*/
/*!
\fn void QXYSeries::pointLabelsFormatChanged(const QString &format)
- Signal is emitted when the \a format of data point labels is changed.
-*/
-/*!
- \qmlsignal XYSeries::onPointLabelsFormatChanged(string format)
- Signal is emitted when the \a format of data point labels is changed.
+ This signal is emitted when the format of data point labels changes to
+ \a format.
*/
/*!
\property QXYSeries::pointLabelsVisible
- Defines the visibility for data point labels. False by default.
+ \brief The visibility of data point labels.
+
+ This property is \c false by default.
\sa pointLabelsFormat, pointLabelsClipping
*/
/*!
\qmlproperty bool XYSeries::pointLabelsVisible
- Defines the visibility for data point labels.
+ The visibility of data point labels. This property is \c false by default.
\sa pointLabelsFormat, pointLabelsClipping
*/
/*!
\fn void QXYSeries::pointLabelsVisibilityChanged(bool visible)
- The visibility of the data point labels is changed to \a visible.
-*/
-/*!
- \qmlsignal XYSeries::onPointLabelsVisibilityChanged(bool visible)
- The visibility of the data point labels is changed to \a visible.
+ This signal is emitted when the visibility of the data point labels
+ changes to \a visible.
*/
/*!
\property QXYSeries::pointLabelsFont
- Defines the font used for data point labels.
+ \brief The font used for data point labels.
\sa pointLabelsFormat
*/
/*!
\qmlproperty font XYSeries::pointLabelsFont
- Defines the font used for data point labels.
+ The font used for data point labels.
\sa pointLabelsFormat
*/
/*!
\fn void QXYSeries::pointLabelsFontChanged(const QFont &font);
- The font used for data point labels is changed to \a font.
-*/
-/*!
- \qmlsignal XYSeries::onPointLabelsFontChanged(Font font)
- The font used for data point labels is changed to \a font.
+ This signal is emitted when the font used for data point labels changes to
+ \a font.
*/
/*!
\property QXYSeries::pointLabelsColor
- Defines the color used for data point labels. By default, the color is the color of the brush
+ \brief The color used for data point labels. By default, the color is the color of the brush
defined in theme for labels.
\sa pointLabelsFormat
*/
/*!
\qmlproperty font XYSeries::pointLabelsColor
- Defines the color used for data point labels. By default, the color is the color of the brush
+ The color used for data point labels. By default, the color is the color of the brush
defined in theme for labels.
\sa pointLabelsFormat
*/
/*!
\fn void QXYSeries::pointLabelsColorChanged(const QColor &color);
- The color used for data point labels is changed to \a color.
-*/
-/*!
- \qmlsignal XYSeries::onPointLabelsColorChanged(Color color)
- The color used for data point labels is changed to \a color.
+ This signal is emitted when the color used for data point labels changes to
+ \a color.
*/
/*!
\property QXYSeries::pointLabelsClipping
- Defines the clipping for data point labels. True by default. The labels on the edge of the plot
- area are cut when clipping is enabled.
+ \brief The clipping for data point labels.
+
+ This property is \c true by default. The labels on the edge of the plot area
+ are cut when clipping is enabled.
\sa pointLabelsVisible
*/
/*!
\qmlproperty bool XYSeries::pointLabelsClipping
- Defines the clipping for data point labels. True by default. The labels on the edge of the plot
- area are cut when clipping is enabled.
+ The clipping for data point labels. This property is \c true by default. The
+ labels on the edge of the plot area are cut when clipping is enabled.
\sa pointLabelsVisible
*/
/*!
\fn void QXYSeries::pointLabelsClippingChanged(bool clipping)
- The clipping of the data point labels is changed to \a clipping.
-*/
-/*!
- \qmlsignal XYSeries::onPointLabelsClippingChanged(bool clipping)
- The clipping of the data point labels is changed to \a clipping.
+ This signal is emitted when the clipping of the data point labels changes to
+ \a clipping.
*/
/*!
\fn void QXYSeries::clicked(const QPointF& point)
- \brief Signal is emitted when user clicks the \a point on chart. The \a point is the point
- where the press was triggered.
- \sa pressed, released, doubleClicked
+ This signal is emitted when the user triggers a mouse event by
+ clicking the point \a point in the chart.
+
+ \sa pressed(), released(), doubleClicked()
*/
/*!
- \qmlsignal XYSeries::onClicked(QPointF point)
- Signal is emitted when user clicks the \a point on chart. The \a point is the point where the
- press was triggered. For example:
+ \qmlsignal XYSeries::clicked(point point)
+ This signal is emitted when the user triggers a mouse event by clicking the
+ point \a point in the chart. For example:
\code
LineSeries {
XYPoint { x: 0; y: 0 }
@@ -274,30 +269,38 @@ QT_CHARTS_BEGIN_NAMESPACE
onClicked: console.log("onClicked: " + point.x + ", " + point.y);
}
\endcode
- \sa onPressed, onReleased, onDoubleClicked
+
+ The corresponding signal handler is \c onClicked().
+
+ \sa pressed(), released(), doubleClicked()
*/
/*!
\fn void QXYSeries::hovered(const QPointF &point, bool state)
- This signal is emitted when user has hovered over or away from the series. \a point shows the origin (coordinate)
- of the hover event. \a state is true when user has hovered over the series and false when hover has moved away from
- the series.
+ This signal is emitted when a mouse is hovered over the point \a point in
+ the chart. When the mouse moves over the point, \a state turns \c true,
+ and when the mouse moves away again, it turns \c false.
*/
/*!
- \qmlsignal XYSeries::onHovered(point point, bool state)
- This signal is emitted when user has hovered over or away from the series. \a point shows the origin (coordinate)
- of the hover event. \a state is true when user has hovered over the series and false when hover has moved away from
- the series.
+ \qmlsignal XYSeries::hovered(point point, bool state)
+ This signal is emitted when a mouse is hovered over the point \a point in
+ the chart. When the mouse moves over the point, \a state turns \c true,
+ and when the mouse moves away again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered().
*/
/*!
\fn void QXYSeries::pressed(const QPointF& point)
- \brief Signal is emitted when user presses the \a point on chart.
- \sa clicked, released, doubleClicked
+ This signal is emitted when the user presses the data point \a point in the
+ chart and holds down the mouse button.
+
+ \sa clicked(), released(), doubleClicked()
*/
/*!
- \qmlsignal XYSeries::onPressed(QPointF point)
- Signal is emitted when user presses the \a point on chart. For example:
+ \qmlsignal XYSeries::pressed(point point)
+ This signal is emitted when the user presses the data point \a point in the
+ chart and holds down the mouse button. For example:
\code
LineSeries {
XYPoint { x: 0; y: 0 }
@@ -305,17 +308,22 @@ QT_CHARTS_BEGIN_NAMESPACE
onPressed: console.log("onPressed: " + point.x + ", " + point.y);
}
\endcode
- \sa onClicked, onReleased, onDoubleClicked
+
+ The corresponding signal handler is \c onPressed().
+
+ \sa clicked(), released(), doubleClicked()
*/
/*!
\fn void QXYSeries::released(const QPointF& point)
- \brief Signal is emitted when user releases a press that was triggered on a \a point on chart.
- \sa pressed, clicked, doubleClicked
+ This signal is emitted when the user releases the mouse press on the data
+ point specified by \a point.
+ \sa pressed(), clicked(), doubleClicked()
*/
/*!
- \qmlsignal XYSeries::onReleased(QPointF point)
- Signal is emitted when user releases a press that was triggered on a \a point on chart.
+ \qmlsignal XYSeries::released(point point)
+ This signal is emitted when the user releases the mouse press on the data
+ point specified by \a point.
For example:
\code
LineSeries {
@@ -324,19 +332,23 @@ QT_CHARTS_BEGIN_NAMESPACE
onReleased: console.log("onReleased: " + point.x + ", " + point.y);
}
\endcode
- \sa onPressed, onClicked, onDoubleClicked
+
+ The corresponding signal handler is \c onReleased().
+
+ \sa pressed(), clicked(), doubleClicked()
*/
/*!
\fn void QXYSeries::doubleClicked(const QPointF& point)
- \brief Signal is emitted when user doubleclicks the \a point on chart. The \a point is the
- point where the first press was triggered.
- \sa pressed, released, clicked
+ This signal is emitted when the user double-clicks the data point \a point
+ in the chart. The \a point is the point where the first press was triggered.
+ \sa pressed(), released(), clicked()
*/
/*!
- \qmlsignal XYSeries::onDoubleClicked(QPointF point)
- Signal is emitted when user doubleclicks the \a point on chart. The \a point is the point where
- the first press was triggered. For example:
+ \qmlsignal XYSeries::doubleClicked(point point)
+ This signal is emitted when the user double-clicks the data point \a point
+ in the chart. The \a point is the point where the first press was triggered.
+ For example:
\code
LineSeries {
XYPoint { x: 0; y: 0 }
@@ -344,122 +356,146 @@ QT_CHARTS_BEGIN_NAMESPACE
onDoubleClicked: console.log("onDoubleClicked: " + point.x + ", " + point.y);
}
\endcode
- \sa onPressed, onReleased, onClicked
+
+ The corresponding signal handler is \c onDoubleClicked().
+
+ \sa pressed(), released(), clicked()
*/
/*!
\fn void QXYSeries::pointReplaced(int index)
- Signal is emitted when a point has been replaced at \a index.
+ This signal is emitted when a point is replaced at the position specified by
+ \a index.
\sa replace()
*/
/*!
- \qmlsignal XYSeries::onPointReplaced(int index)
- Signal is emitted when a point has been replaced at \a index.
+ \qmlsignal XYSeries::pointReplaced(int index)
+ This signal is emitted when a point is replaced at the position specified by
+ \a index.
+
+ The corresponding signal handler is \c onPointReplaced().
*/
/*!
\fn void QXYSeries::pointsReplaced()
- Signal is emitted when all points have been replaced with other points.
+ This signal is emitted when all points are replaced with other points.
\sa replace()
*/
/*!
- \qmlsignal XYSeries::onPointsReplaced()
- Signal is emitted when all points have been replaced with other points.
+ \qmlsignal XYSeries::pointsReplaced()
+ This signal is emitted when all points are replaced with other points.
+
+ The corresponding signal handler is \c onPointsReplaced().
*/
/*!
\fn void QXYSeries::pointAdded(int index)
- Signal is emitted when a point has been added at \a index.
+ This signal is emitted when a point is added at the position specified by
+ \a index.
\sa append(), insert()
*/
/*!
- \qmlsignal XYSeries::onPointAdded(int index)
- Signal is emitted when a point has been added at \a index.
+ \qmlsignal XYSeries::pointAdded(int index)
+ This signal is emitted when a point is added at the position specified by
+ \a index.
+
+ The corresponding signal handler is \c onPointAdded().
*/
/*!
\fn void QXYSeries::pointRemoved(int index)
- Signal is emitted when a point has been removed from \a index.
+ This signal is emitted when a point is removed from the position specified
+ by \a index.
\sa remove()
*/
/*!
- \qmlsignal XYSeries::onPointRemoved(int index)
- Signal is emitted when a point has been removed from \a index.
+ \qmlsignal XYSeries::pointRemoved(int index)
+ This signal is emitted when a point is removed from the position specified
+ by \a index.
+
+ The corresponding signal handler is \c onPointRemoved().
*/
/*!
\fn void QXYSeries::pointsRemoved(int index, int count)
- Signal is emitted when a \a count of points has been removed starting at \a index.
+ This signal is emitted when the number of points specified by \a count
+ is removed starting at the position specified by \a index.
\sa removePoints(), clear()
*/
/*!
- \qmlsignal XYSeries::onPointsRemoved(int index, int count)
- Signal is emitted when a \a count of points has been removed starting at \a index.
+ \qmlsignal XYSeries::pointsRemoved(int index, int count)
+ This signal is emitted when the number of points specified by \a count
+ is removed starting at the position specified by \a index.
+
+ The corresponding signal handler is \c onPointRemoved().
*/
/*!
\fn void QXYSeries::colorChanged(QColor color)
- \brief Signal is emitted when the line (pen) color has changed to \a color.
-*/
-/*!
- \qmlsignal XYSeries::onColorChanged(color color)
- Signal is emitted when the line (pen) color has changed to \a color.
+ This signal is emitted when the line (pen) color changes to \a color.
*/
/*!
\fn void QXYSeries::penChanged(const QPen &pen)
- \brief Signal is emitted when the line pen has changed to \a pen.
+ This signal is emitted when the pen changes to \a pen.
*/
/*!
\fn void QXYSeriesPrivate::updated()
- \brief \internal
+ \internal
*/
/*!
\qmlmethod XYSeries::append(real x, real y)
- Append point (\a x, \a y) to the series
+ Appends a point with the coordinates \a x and \a y to the series.
*/
/*!
\qmlmethod XYSeries::replace(real oldX, real oldY, real newX, real newY)
- Replaces point (\a oldX, \a oldY) with point (\a newX, \a newY). Does nothing, if point (oldX, oldY) does not
- exist.
+ Replaces the point with the coordinates \a oldX and \a oldY with the point
+ with the coordinates \a newX and \a newY. Does nothing if the old point does
+ not exist.
*/
/*!
\qmlmethod XYSeries::remove(real x, real y)
- Removes point (\a x, \a y) from the series. Does nothing, if point (x, y) does not exist.
+ Removes the point with the coordinates \a x and \a y from the series. Does
+ nothing if the point does not exist.
*/
/*!
\qmlmethod XYSeries::remove(int index)
- Removes a point from the series at \a index.
+ Removes the point at the position specified by \a index from the series.
*/
/*!
\qmlmethod XYSeries::removePoints(int index, int count)
- Removes \a count points from the series starting at \a index.
+ Removes the number of points specified by \a count from the series starting
+ at the position specified by \a index.
*/
/*!
\qmlmethod XYSeries::insert(int index, real x, real y)
- Inserts point (\a x, \a y) to the \a index. If index is 0 or smaller than 0 the point is prepended to the list of
- points. If index is the same as or bigger than count, the point is appended to the list of points.
+ Inserts a point with the coordinates \a x and \a y to the position specified
+ by \a index in the series. If the index is 0 or less than 0, the point is
+ prepended to the list of points. If the index is equal to or greater than
+ than the number of points in the series, the point is appended to the
+ list of points.
*/
/*!
\qmlmethod QPointF XYSeries::at(int index)
- Returns point at \a index. Returns (0, 0) if the index is not valid.
+ Returns the point at the position specified by \a index. Returns (0, 0) if
+ the index is not valid.
*/
/*!
\internal
- Constructs empty series object which is a child of \a parent.
- When series object is added to QChart instance ownerships is transferred.
+ Constructs an empty series object that is a child of \a parent.
+ When the series object is added to QChart, instance ownerships is transferred.
*/
QXYSeries::QXYSeries(QXYSeriesPrivate &d, QObject *parent)
: QAbstractSeries(d, parent)
@@ -467,15 +503,15 @@ QXYSeries::QXYSeries(QXYSeriesPrivate &d, QObject *parent)
}
/*!
- Destroys the object. Series added to QChart instances are owned by those,
- and are destroyed when QChart instances are destroyed.
+ Deletes the series. Series added to QChart instances are owned by them,
+ and are deleted when the QChart instances are deleted.
*/
QXYSeries::~QXYSeries()
{
}
/*!
- Adds data point (\a x, \a y) to the series.
+ Adds the data point with the coordinates \a x and \a y to the series.
*/
void QXYSeries::append(qreal x, qreal y)
{
@@ -483,8 +519,8 @@ void QXYSeries::append(qreal x, qreal y)
}
/*!
- This is an overloaded function.
- Adds data \a point to the series.
+ \overload
+ Adds the data point \a point to the series.
*/
void QXYSeries::append(const QPointF &point)
{
@@ -497,8 +533,8 @@ void QXYSeries::append(const QPointF &point)
}
/*!
- This is an overloaded function.
- Adds list of data \a points to the series.
+ \overload
+ Adds the list of data points specified by \a points to the series.
*/
void QXYSeries::append(const QList<QPointF> &points)
{
@@ -507,8 +543,11 @@ void QXYSeries::append(const QList<QPointF> &points)
}
/*!
- Replaces data point (\a oldX, \a oldY) with data point (\a newX, \a newY).
- \sa pointReplaced()
+ Replaces the point with the coordinates \a oldX and \a oldY with the point
+ with the coordinates \a newX and \a newY. Does nothing if the old point does
+ not exist.
+
+ \sa pointReplaced()
*/
void QXYSeries::replace(qreal oldX, qreal oldY, qreal newX, qreal newY)
{
@@ -516,7 +555,8 @@ void QXYSeries::replace(qreal oldX, qreal oldY, qreal newX, qreal newY)
}
/*!
- Replaces \a oldPoint with \a newPoint.
+ Replaces the point specified by \a oldPoint with the one specified by
+ \a newPoint.
\sa pointReplaced()
*/
void QXYSeries::replace(const QPointF &oldPoint, const QPointF &newPoint)
@@ -529,7 +569,8 @@ void QXYSeries::replace(const QPointF &oldPoint, const QPointF &newPoint)
}
/*!
- Replaces the point at \a index with data point (\a newX, \a newY).
+ Replaces the point at the position specified by \a index with the point that
+ has the coordinates \a newX and \a newY.
\sa pointReplaced()
*/
void QXYSeries::replace(int index, qreal newX, qreal newY)
@@ -538,7 +579,8 @@ void QXYSeries::replace(int index, qreal newX, qreal newY)
}
/*!
- Replaces the point at \a index with \a newPoint.
+ Replaces the point at the position specified by \a index with the point
+ specified by \a newPoint.
\sa pointReplaced()
*/
void QXYSeries::replace(int index, const QPointF &newPoint)
@@ -551,7 +593,7 @@ void QXYSeries::replace(int index, const QPointF &newPoint)
}
/*!
- Replaces the current points with \a points.
+ Replaces the current points with the points specified by \a points.
\note This is much faster than replacing data points one by one,
or first clearing all data, and then appending the new data. Emits QXYSeries::pointsReplaced()
when the points have been replaced. However, note that using the overload that takes
@@ -564,7 +606,7 @@ void QXYSeries::replace(QList<QPointF> points)
}
/*!
- Replaces the current points with \a points.
+ Replaces the current points with the points specified by \a points.
\note This is much faster than replacing data points one by one,
or first clearing all data, and then appending the new data. Emits QXYSeries::pointsReplaced()
when the points have been replaced.
@@ -578,7 +620,7 @@ void QXYSeries::replace(QVector<QPointF> points)
}
/*!
- Removes the point (\a x, \a y) from the series.
+ Removes the point that has the coordinates \a x and \a y from the series.
\sa pointRemoved()
*/
void QXYSeries::remove(qreal x, qreal y)
@@ -587,7 +629,7 @@ void QXYSeries::remove(qreal x, qreal y)
}
/*!
- Removes the \a point from the series.
+ Removes the data point \a point from the series.
\sa pointRemoved()
*/
void QXYSeries::remove(const QPointF &point)
@@ -600,7 +642,7 @@ void QXYSeries::remove(const QPointF &point)
}
/*!
- Removes the point at \a index from the series.
+ Removes the point at the position specified by \a index from the series.
\sa pointRemoved()
*/
void QXYSeries::remove(int index)
@@ -611,7 +653,8 @@ void QXYSeries::remove(int index)
}
/*!
- Removes \a count number of points from the series starting at \a index.
+ Removes the number of points specified by \a count from the series starting at
+ the position specified by \a index.
\sa pointsRemoved()
*/
void QXYSeries::removePoints(int index, int count)
@@ -626,7 +669,8 @@ void QXYSeries::removePoints(int index, int count)
}
/*!
- Inserts a \a point in the series at \a index position.
+ Inserts the data point \a point in the series at the position specified by
+ \a index.
\sa pointAdded()
*/
void QXYSeries::insert(int index, const QPointF &point)
@@ -651,7 +695,7 @@ void QXYSeries::clear()
/*!
Returns the points in the series as a list.
- Use QXYSeries::pointsVector() for better performance.
+ Use pointsVector() for better performance.
*/
QList<QPointF> QXYSeries::points() const
{
@@ -661,7 +705,7 @@ QList<QPointF> QXYSeries::points() const
/*!
Returns the points in the series as a vector.
- This is more efficient that calling QXYSeries::points();
+ This is more efficient than calling points().
*/
QVector<QPointF> QXYSeries::pointsVector() const
{
@@ -670,7 +714,8 @@ QVector<QPointF> QXYSeries::pointsVector() const
}
/*!
- Returns point at \a index in internal points vector.
+ Returns the data point at the position specified by \a index in the internal
+ points vector.
*/
const QPointF &QXYSeries::at(int index) const
{
@@ -679,7 +724,7 @@ const QPointF &QXYSeries::at(int index) const
}
/*!
- Returns number of data points within series.
+ Returns the number of data points in a series.
*/
int QXYSeries::count() const
{
@@ -689,8 +734,8 @@ int QXYSeries::count() const
/*!
- Sets \a pen used for drawing points on the chart. If the pen is not defined, the
- pen from chart theme is used.
+ Sets the pen used for drawing points on the chart to \a pen. If the pen is
+ not defined, the pen from the chart theme is used.
\sa QChart::setTheme()
*/
void QXYSeries::setPen(const QPen &pen)
@@ -716,8 +761,8 @@ QPen QXYSeries::pen() const
}
/*!
- Sets \a brush used for drawing points on the chart. If the brush is not defined, brush
- from chart theme setting is used.
+ Sets the brush used for drawing points on the chart to \a brush. If the
+ brush is not defined, the brush from the chart theme setting is used.
\sa QChart::setTheme()
*/
void QXYSeries::setBrush(const QBrush &brush)
@@ -846,7 +891,7 @@ bool QXYSeries::pointLabelsClipping() const
}
/*!
- Stream operator for adding a data \a point to the series.
+ Stream operator for adding the data point \a point to the series.
\sa append()
*/
QXYSeries &QXYSeries::operator<< (const QPointF &point)
@@ -857,7 +902,8 @@ QXYSeries &QXYSeries::operator<< (const QPointF &point)
/*!
- Stream operator for adding a list of \a points to the series.
+ Stream operator for adding the list of data points specified by \a points
+ to the series.
\sa append()
*/
diff --git a/src/charts/xychart/xychart.cpp b/src/charts/xychart/xychart.cpp
index 4314f6dd..a6432fd7 100644
--- a/src/charts/xychart/xychart.cpp
+++ b/src/charts/xychart/xychart.cpp
@@ -131,7 +131,8 @@ void XYChart::updateGlChart()
// Doesn't update gl geometry, but refreshes the chart
void XYChart::refreshGlChart()
{
- presenter()->updateGLWidget();
+ if (presenter())
+ presenter()->updateGLWidget();
}
//handlers
diff --git a/src/chartsqml2/declarativeboxplotseries.cpp b/src/chartsqml2/declarativeboxplotseries.cpp
index abe53f4f..bbc2316d 100644
--- a/src/chartsqml2/declarativeboxplotseries.cpp
+++ b/src/chartsqml2/declarativeboxplotseries.cpp
@@ -54,20 +54,17 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty enumeration BoxSet::ValuePositions
-
- This enum type defines the values of a box-and-whiskers item:
+ \qmlproperty list BoxSet::values
+ The values of the box-and-whiskers item. The following enumerations can be
+ used as indexes when accessing the list of values:
\value BoxSet.LowerExtreme The smallest value of the box-and-whiskers item.
\value BoxSet.LowerQuartile The median value of the lower half of the box-and-whiskers item.
\value BoxSet.Median The median value of the box-and-whiskers item.
\value BoxSet.UpperQuartile The median value of the upper half of the box-and-whiskers item.
\value BoxSet.UpperExtreme The largest value of the box-and-whiskers item.
-*/
-/*!
- \qmlproperty string BoxSet::values
- The values of the box-and-whiskers item.
+ \sa at(), setValue()
*/
/*!
\qmlproperty string BoxSet::label
@@ -77,6 +74,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmlproperty int BoxSet::count
The number of values of the box-and-whiskers item.
*/
+
+/*!
+ \qmlproperty string BoxSet::brushFilename
+ The name of the file used as a brush for the box-and-whiskers item.
+*/
+
/*!
\qmlmethod void BoxSet::at(int index)
Returns the value in the position specified by \a index.
@@ -94,48 +97,56 @@ QT_CHARTS_BEGIN_NAMESPACE
Sets the value specified by \a value in the position specified by \a index.
*/
/*!
- \qmlsignal BoxSet::onClicked()
+ \qmlsignal BoxSet::clicked()
This signal is emitted when the user clicks a box-and-whiskers item in the chart.
+
+ The corresponding signal handler is \c onClicked().
*/
/*!
- \qmlsignal BoxSet::onPressed()
+ \qmlsignal BoxSet::pressed()
This signal is emitted when the user clicks a box-and-whiskers item in the chart
and holds down the mouse button.
+
+ The corresponding signal handler is \c onPressed.
*/
/*!
- \qmlsignal BoxSet::onReleased()
+ \qmlsignal BoxSet::released()
This signal is emitted when the user releases the mouse press on a box-and-whiskers item.
+
+ The corresponding signal handler is \c onReleased().
*/
/*!
- \qmlsignal BoxSet::onDoubleClicked()
+ \qmlsignal BoxSet::doubleClicked()
This signal is emitted when the user double-clicks a box-and-whiskers item.
+
+ The corresponding signal handler is \c onDoubleClicked().
*/
/*!
- \qmlsignal BoxSet::onHovered(bool status)
+ \qmlsignal BoxSet::hovered(bool status)
This signal is emitted when a mouse is hovered over a box-and-whiskers item in a chart.
When the mouse moves over the item, \a status turns \c true, and when the mouse moves
away again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered().
*/
/*!
- \qmlsignal BoxSet::onPenChanged()
- This signal is emitted when the pen used to draw the lines of the box-and-whiskers item changes.
-*/
-/*!
- \qmlsignal BoxSet::onBrushChanged()
- This signal is emitted when the brush used to fill the box of the box-and-whiskers item changes.
-*/
-/*!
- \qmlsignal BoxSet::onChangedValues()
+ \qmlsignal BoxSet::valuesChanged()
This signal is emitted when multiple values of the box-and-whiskers item change.
+
+ The corresponding signal handler is \c onValuesChanged().
*/
/*!
- \qmlsignal BoxSet::onChangedValue(int index)
+ \qmlsignal BoxSet::valueChanged(int index)
This signal is emitted when the value of the box-and-whiskers item specified by \a index
changes.
+
+ The corresponding signal handler is \c onValueChanged().
*/
/*!
- \qmlsignal BoxSet::onCleared()
+ \qmlsignal BoxSet::cleared()
This signal is emitted when all the values of the box-and-whiskers item are set to 0.
+
+ The corresponding signal handler is \c onCleared().
*/
/*!
@@ -187,6 +198,11 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
+ \qmlmethod BoxPlotSeries::at(int index)
+ Returns the box-and-whiskers item in the position specified by \a index.
+*/
+
+/*!
\qmlmethod BoxPlotSeries::append(string label, VariantList values)
Appends a new box-and-whiskers item with the label specified by \a label and the values
specified by \a values to the series.
@@ -209,41 +225,53 @@ QT_CHARTS_BEGIN_NAMESPACE
Removes all box-and-whiskers items from the series and permanently deletes them.
*/
/*!
- \qmlsignal BoxPlotSeries::onClicked(BoxSet boxset);
+ \qmlsignal BoxPlotSeries::clicked(BoxSet boxset);
This signal is emitted when the user clicks the box-and-whiskers item specified by
\a boxset in the chart.
+
+ The corresponding signal handler is \c onClicked().
*/
/*!
- \qmlsignal BoxPlotSeries::onHovered(bool status, BoxSet boxset);
+ \qmlsignal BoxPlotSeries::hovered(bool status, BoxSet boxset);
This signal is emitted when a mouse is hovered over the box-and-whiskers item specified by
\a boxset in the chart. When the mouse moves over the item, \a status turns \c true, and
when the mouse moves away again, it turns \c false.
+
+ The corresponding signal handler is \c onHovered().
*/
/*!
- \qmlsignal BoxPlotSeries::onPressed(BoxSet boxset)
+ \qmlsignal BoxPlotSeries::pressed(BoxSet boxset)
This signal is emitted when the user presses the \a boxset on the chart.
+
+ The corresponding signal handler is \c onPressed.
*/
/*!
- \qmlsignal BoxPlotSeries::onReleased(BoxSet boxset)
+ \qmlsignal BoxPlotSeries::released(BoxSet boxset)
This signal is emitted when the user releases the mouse press on the box-and-whiskers
item specified by \a boxset in the chart.
+
+ The corresponding signal handler is \c onReleased().
*/
/*!
- \qmlsignal BoxPlotSeries::onDoubleClicked(BoxSet boxset)
+ \qmlsignal BoxPlotSeries::doubleClicked(BoxSet boxset)
This signal is emitted when the user double-clicks the box-and-whiskers item specified by
\a boxset in the chart.
+
+ The corresponding signal handler is \c onDoubleClicked().
*/
/*!
- \qmlsignal BoxPlotSeries::onCountChanged();
- This signal is emitted when the number of box-and-whiskers items in the series changes.
+ \qmlsignal BoxPlotSeries::boxsetsAdded(list sets)
+ This signal is emitted when the box-and-whiskers items specified by \a sets
+ are added to the series.
+
+ The corresponding signal handler is \c onBoxsetsAdded().
*/
/*!
- \qmlsignal BoxPlotSeries::onBoxsetsAdded()
- This signal is emitted when new box-and-whiskers items are added to the series.
- */
-/*!
- \qmlsignal BoxPlotSeries::onBoxsetsRemoved()
- This signal is emitted when box-and-whiskers items are removed from the series.
+ \qmlsignal BoxPlotSeries::boxsetsRemoved(list sets)
+ This signal is emitted when the box-and-whiskers items specified by \a sets
+ are removed from the series.
+
+ The corresponding signal handler is \c onBoxsetsRemoved().
*/
/*!
\qmlproperty AbstractAxis BoxPlotSeries::axisX
@@ -283,14 +311,6 @@ QT_CHARTS_BEGIN_NAMESPACE
width of the item within its category. The value can be between 0.0 and 1.0. Negative values
are replaced with 0.0 and values greater than 1.0 are replaced with 1.0.
*/
-/*!
- \qmlproperty Pen BoxPlotSeries::pen
- The pen used to draw the lines of the box-and-whiskers items.
-*/
-/*!
- \qmlproperty Brush BoxPlotSeries::brush
- The brush used to fill the boxes of the box-and-whiskers items.
-*/
/*!
\qmlproperty string BoxPlotSeries::brushFilename
@@ -301,40 +321,6 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmlproperty int BoxPlotSeries::count
The number of box-and-whiskers items in a box plot series.
*/
-/*!
- \qmlsignal BoxPlotSeries::onBoxOutlineVisibilityChanged()
- This signal is emitted when the box outline visibility changes.
- */
-/*!
- \qmlsignal BoxPlotSeries::onBoxWidthChanged()
- This signal is emitted when the width of the box-and-whiskers item changes.
- */
-/*!
- \qmlsignal BoxPlotSeries::onPenChanged()
- This signal is emitted when the pen used to draw the lines of the box-and-whiskers
- items changes.
-*/
-/*!
- \qmlsignal BoxPlotSeries::onBrushChanged()
- This signal is emitted when the brush used to fill the boxes of the box-and-whiskers
- items changes.
-*/
-/*!
- \qmlsignal BoxPlotSeries::onAxisXChanged(AbstractAxis axis)
- This signal is emitted when the x-axis changes to \a axis.
-*/
-/*!
- \qmlsignal BoxPlotSeries::onAxisYChanged(AbstractAxis axis)
- This signal is emitted when the y-axis changes to \a axis.
-*/
-/*!
- \qmlsignal BoxPlotSeries::onAxisXTopChanged(AbstractAxis axis)
- This signal is emitted when the top x-axis changes to \a axis.
-*/
-/*!
- \qmlsignal BoxPlotSeries::onAxisYRightChanged(AbstractAxis axis)
- This signal is emitted when the right y-axis changes to \a axis.
-*/
DeclarativeBoxSet::DeclarativeBoxSet(const QString label, QObject *parent)
diff --git a/src/chartsqml2/declarativecategoryaxis.cpp b/src/chartsqml2/declarativecategoryaxis.cpp
index 44f0a1ef..21221404 100644
--- a/src/chartsqml2/declarativecategoryaxis.cpp
+++ b/src/chartsqml2/declarativecategoryaxis.cpp
@@ -36,10 +36,25 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmltype CategoryRange
\inqmlmodule QtCharts
- \brief With CategoryRange you can define a range used by a CategoryAxis.
+ \brief Defines a range on a category axis.
+
+ The CategoryRange type is used together with the CategoryAxis type to
+ specify labeled ranges on category axes. The widths of the category ranges
+ can be specified freely.
+
\sa CategoryAxis
*/
+/*!
+ \qmlproperty int CategoryRange::endValue
+ The high end of the category.
+*/
+
+/*!
+ \qmlproperty string CategoryRange::label
+ The label of the category.
+*/
+
DeclarativeCategoryRange::DeclarativeCategoryRange(QObject *parent) :
QObject(parent),
m_endValue(0),
diff --git a/src/chartsqml2/declarativechart.cpp b/src/chartsqml2/declarativechart.cpp
index 96f1816a..672a6b07 100644
--- a/src/chartsqml2/declarativechart.cpp
+++ b/src/chartsqml2/declarativechart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -69,31 +69,66 @@ QT_CHARTS_BEGIN_NAMESPACE
\instantiates DeclarativeChart
\inqmlmodule QtCharts
- \brief Chart element.
+ \brief Manages the graphical representation of the chart's series, legends,
+ and axes.
- ChartView element is the parent that is responsible for showing different chart series types.
+ The ChartView type displays different series types as charts.
- The following QML shows how to create a simple chart with one pie series:
+ \image examples_qmlpiechart.png
+
+ The following QML code shows how to create a simple chart with one pie
+ series:
\snippet qmlpiechart/qml/qmlpiechart/main.qml 1
\snippet qmlpiechart/qml/qmlpiechart/main.qml 2
\snippet qmlpiechart/qml/qmlpiechart/main.qml 3
-
- \beginfloatleft
- \image examples_qmlpiechart.png
- \endfloat
- \clearfloat
*/
/*!
- \qmlproperty Theme ChartView::theme
- Theme defines the visual appearance of the chart, including for example colors, fonts, line
- widths and chart background.
+ \qmlproperty enumeration ChartView::theme
+
+ The theme used by the chart.
+
+ A theme is a built-in collection of UI style related settings applied to all
+ the visual elements of a chart, such as colors, pens, brushes, and fonts of
+ series, as well as axes, title, and legend. The \l {Qml Oscilloscope}
+ example illustrates how to set a theme.
+
+ \note Changing the theme will overwrite all customizations previously
+ applied to the series.
+
+ The following values are supported:
+
+ \value ChartView.ChartThemeLight
+ The light theme, which is the default theme.
+ \value ChartView.ChartThemeBlueCerulean
+ The cerulean blue theme.
+ \value ChartView.ChartThemeDark
+ The dark theme.
+ \value ChartView.ChartThemeBrownSand
+ The sand brown theme.
+ \value ChartView.ChartThemeBlueNcs
+ The natural color system (NCS) blue theme.
+ \value ChartView.ChartThemeHighContrast
+ The high contrast theme.
+ \value ChartView.ChartThemeBlueIcy
+ The icy blue theme.
+ \value ChartView.ChartThemeQt
+ The Qt theme.
*/
/*!
- \qmlproperty Animation ChartView::animationOptions
- Animation configuration of the chart. One of ChartView.NoAnimation, ChartView.GridAxisAnimations,
- ChartView.SeriesAnimations or ChartView.AllAnimations.
+ \qmlproperty enumeration ChartView::animationOptions
+
+ The animations enabled in the chart:
+
+ \value ChartView.NoAnimation
+ Animation is disabled in the chart. This is the default value.
+ \value ChartView.GridAxisAnimations
+ Grid axis animation is enabled in the chart.
+ \value ChartView.SeriesAnimations
+ Series animation is enabled in the chart.
+ \value ChartView.AllAnimations
+ All animation types are enabled in the chart.
*/
/*!
@@ -107,16 +142,18 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty Font ChartView::titleFont
+ \qmlproperty font ChartView::titleFont
The title font of the chart.
- See the Qt documentation for more details of Font.
+ For more information, see \l [QML]{font}.
*/
/*!
\qmlproperty string ChartView::title
- The title of the chart, shown on top of the chart.
- \sa ChartView::titleColor
+ The title is shown as a headline on top of the chart. Chart titles support
+ HTML formatting.
+
+ \sa titleColor
*/
/*!
@@ -126,18 +163,21 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlproperty Legend ChartView::legend
- The legend of the chart. Legend lists all the series, pie slices and bar sets added on the chart.
+ The legend of the chart. The legend lists all the series, pie slices, and bar
+ sets added to the chart.
*/
/*!
\qmlproperty int ChartView::count
- The count of series added to the chart.
+ The number of series added to the chart.
*/
/*!
\qmlproperty color ChartView::backgroundColor
- The color of the chart's background. By default background color is defined by chart theme.
- \sa ChartView::theme
+ The color of the chart's background. By default, the background color is
+ specified by the chart theme.
+
+ \sa theme
*/
/*!
@@ -147,41 +187,53 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlproperty color ChartView::plotAreaColor
- The color of the background of the chart's plot area. By default plot area background uses chart's
- background color.
- \sa ChartView::backgroundColor
+ The color of the background of the chart's plot area. By default, the plot
+ area background uses the chart's background color, which is specified by the
+ chart theme.
+
+ \sa backgroundColor, theme
*/
/*!
\qmlproperty list<AbstractAxis> ChartView::axes
- The axes of the ChartView.
+ The axes of the chart.
*/
/*!
\qmlproperty bool ChartView::dropShadowEnabled
- The chart's border drop shadow. Set to true to enable drop shadow.
+ Whether the background drop shadow effect is enabled.
+
+ If set to \c true, the background drop shadow effect is enabled. If set to
+ \c false, it is disabled.
*/
/*!
\qmlproperty rect ChartView::plotArea
- The area on the ChartView that is used for drawing series. This is the ChartView rect without the
- margins.
- \sa ChartView::margins
+ The rectangle within which the chart is drawn.
+
+ The plot area does not include the area defined by margins.
+
+ \sa margins
*/
/*!
\qmlproperty Margins ChartView::margins
- The minimum margins allowed between the outer bounds and the plotArea of the ChartView. Margins
- area of ChartView is used for drawing title, axes and legend.
+ The minimum margins allowed between the edge of the chart rectangle and the
+ plot area. The margins are used for drawing the title, axes, and legend.
*/
/*!
\qmlproperty bool ChartView::localizeNumbers
\since QtCharts 2.0
- When \c{true}, all generated numbers appearing in various series and axis labels will be
- localized using the default QLocale of the application, which defaults to the system locale.
- When \c{false}, the "C" locale is always used.
- Defaults to \c{false}.
+
+ Whether numbers are localized.
+
+ When \c true, all generated numbers appearing in various series and axis
+ labels will be localized using the QLocale set with the \l locale property.
+ When \c{false}, the \e C locale is always used. Defaults to \c{false}.
+
+ \note This property does not affect DateTimeAxis labels, which always use the
+ QLocale set with the locale property.
\sa locale
*/
@@ -189,45 +241,84 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlproperty locale ChartView::locale
\since QtCharts 2.0
- Sets the locale used to format various chart labels when localizeNumbers is \c{true}.
- This also determines the locale used to format DateTimeAxis labels regardless of
- localizeNumbers property.
- Defaults to application default locale at the time the chart is constructed.
+
+ The locale used to format various chart labels.
+
+ Labels are localized only when \l localizeNumbers is \c true, except for
+ DateTimeAxis labels, which always use the QLocale set with this property.
+
+ Defaults to the application default locale at the time when the chart is
+ constructed.
\sa localizeNumbers
*/
/*!
\qmlmethod AbstractSeries ChartView::series(int index)
- Returns the series with \a index on the chart. This allows you to loop through the series of a chart together with
- the count property of the chart.
+ Returns the series with the index \a index on the chart. Together with the
+ \l count property of the chart, this enables looping through the series of a
+ chart.
+
+ \sa count
*/
/*!
\qmlmethod AbstractSeries ChartView::series(string name)
- Returns the first series on the chart with \a name. If there is no series with that name, returns null.
+ Returns the first series in the chart with the name \a name. If there is no
+ series with that name, returns null.
*/
/*!
- \qmlmethod AbstractSeries ChartView::createSeries(SeriesType type, string name, AbstractAxis axisX, AbstractAxis axisY)
- Creates a series object of \a type to the chart with name \a name, optional axis \a axisX and
- optional axis \a axisY. For example:
+ \qmlmethod AbstractSeries ChartView::createSeries(enumeration type, string name, AbstractAxis axisX, AbstractAxis axisY)
+ Adds a series of the type \a type to the chart with the name \a name
+ and, optionally, the axes \a axisX and \a axisY. For example:
\code
- // lineSeries is a LineSeries object that has already been added to the ChartView; re-use it's axes
+ // lineSeries is a LineSeries object that has already been added to the ChartView; re-use its axes
var myAxisX = chartView.axisX(lineSeries);
var myAxisY = chartView.axisY(lineSeries);
var scatter = chartView.createSeries(ChartView.SeriesTypeScatter, "scatter series", myAxisX, myAxisY);
\endcode
+
+ The following enumeration values can be used as values of \a type:
+
+ \value ChartView.SeriesTypeLine
+ A line series.
+ \value ChartView.SeriesTypeArea
+ An area series.
+ \value ChartView.SeriesTypeBar
+ A bar series.
+ \value ChartView.SeriesTypeStackedBar
+ A stacked bar series.
+ \value ChartView.SeriesTypePercentBar
+ A percent bar series.
+ \value ChartView.SeriesTypeBoxPlot
+ A box plot series.
+ \value ChartView.SeriesTypeCandlestick
+ A candlestick series.
+ \value ChartView.SeriesTypePie
+ A pie series.
+ \value ChartView.SeriesTypeScatter
+ A scatter series.
+ \value ChartView.SeriesTypeSpline
+ A spline series.
+ \value ChartView.SeriesTypeHorizontalBar
+ A horizontal bar series.
+ \value ChartView.SeriesTypeHorizontalStackedBar
+ A horizontal stacked bar series.
+ \value ChartView.SeriesTypeHorizontalPercentBar
+ A horizontal percent bar series.
*/
/*!
\qmlmethod ChartView::removeSeries(AbstractSeries series)
- Removes the \a series from the chart. The series object is also destroyed.
+ Removes the series \a series from the chart and permanently deletes the series
+ object.
*/
/*!
\qmlmethod ChartView::removeAllSeries()
- Removes all series from the chart. All the series objects are also destroyed.
+ Removes all series from the chart and permanently deletes all the series
+ objects.
*/
/*!
@@ -237,7 +328,7 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlmethod ChartView::setAxisX(AbstractAxis axis, AbstractSeries series)
- Set the x-axis of the series.
+ Sets the x-axis of the series.
*/
/*!
@@ -247,85 +338,93 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\qmlmethod ChartView::setAxisY(AbstractAxis axis, AbstractSeries series)
- Set the y-axis of the series.
+ Sets the y-axis of the series.
*/
/*!
\qmlmethod ChartView::zoom(real factor)
- Zooms in by \a factor on the center of the chart.
+ Zooms into the chart by the custom factor \a factor.
- A factor over 1.0 zooms the view in and factor between 0.0 and 1.0 zooms out.
+ A factor over 1.0 zooms into the view in and a factor between 0.0 and 1.0
+ zooms out of it.
*/
/*!
\qmlmethod ChartView::zoomIn()
- Zooms in the view by a factor of two.
+ Zooms into the view by a factor of two.
*/
/*!
\qmlmethod ChartView::zoomIn(rect rectangle)
- Zooms in the view to a maximum level at which \a rectangle is still fully visible.
+ Zooms into the view to a maximum level at which the rectangle \a rectangle is
+ still fully visible.
\note This is not supported for polar charts.
*/
/*!
\qmlmethod ChartView::zoomOut()
- Zooms out the view by a factor of two.
+ Zooms out of the view by a factor of two.
*/
/*!
\qmlmethod ChartView::zoomReset()
Resets the series domains to what they were before any zoom method was called.
- Note that this will also reset any scrolls and explicit axis range settings done between
- the first zoom operation and calling this method. If no zoom operation has been
- done, this method does nothing.
+
+ \note This will also reset scrolling and explicit axis range settings
+ specified between the first zoom operation and calling this method. If no zoom
+ operation has been performed, this method does nothing.
*/
/*!
\qmlmethod ChartView::isZoomed()
- Returns true if any series has a zoomed domain.
+ Returns \c true if any series has a zoomed domain.
*/
/*!
\qmlmethod ChartView::scrollLeft(real pixels)
- Scrolls to left by \a pixels. This is a convenience function that suits for example for key navigation.
+ Scrolls to left by the number of pixels specified by \a pixels. This is a
+ convenience method suitable for key navigation, for example.
*/
/*!
\qmlmethod ChartView::scrollRight(real pixels)
- Scrolls to right by \a pixels. This is a convenience function that suits for example for key navigation.
+ Scrolls to right by by the number of pixels specified by \a pixels. This is a
+ convenience method suitable for key navigation, for example.
*/
/*!
\qmlmethod ChartView::scrollUp(real pixels)
- Scrolls up by \a pixels. This is a convenience function that suits for example for key navigation.
+ Scrolls up by the number of pixels specified by \a pixels. This is a
+ convenience method suitable for key navigation, for example.
*/
/*!
\qmlmethod ChartView::scrollDown(real pixels)
- Scrolls down by \a pixels. This is a convenience function that suits for example for key navigation.
+ Scrolls down by the number of pixels specified by \a pixels. This is a
+ convenience method suitable for key navigation, for example.
*/
/*!
\qmlmethod point ChartView::mapToValue(point position, AbstractSeries series)
- Returns the value in the \a series domain that corresponds to the \a position relative to the
- chart.
+ Returns the value in the series \a series located at the position \a position
+ in the chart.
*/
/*!
\qmlmethod point ChartView::mapToPosition(point value, AbstractSeries series)
- Returns the position on the chart that corresponds to the \a value in the \a series domain.
+ Returns the position in the chart of the value \a value in the series
+ \a series.
*/
/*!
\qmlsignal ChartView::seriesAdded(AbstractSeries series)
- The \a series has been added to the chart.
+ This signal is emitted when the series \a series is added to the chart.
*/
/*!
\qmlsignal ChartView::seriesRemoved(AbstractSeries series)
- The \a series has been removed from the chart. Please note that \a series is no longer a valid
- object after the signal handler has completed.
+ This signal is emitted when the series \a series is removed from the chart.
+ The series object becomes invalid when the signal handler completes.
*/
DeclarativeChart::DeclarativeChart(QQuickItem *parent)
diff --git a/src/chartsqml2/declarativemargins.cpp b/src/chartsqml2/declarativemargins.cpp
index 3eadeb08..a4284dbc 100644
--- a/src/chartsqml2/declarativemargins.cpp
+++ b/src/chartsqml2/declarativemargins.cpp
@@ -37,9 +37,13 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmltype Margins
\inqmlmodule QtCharts
- \brief Type is used to define margins.
+ \brief Defines margins between the edge of the chart rectangle and the plot
+ area.
- Uncreatable type that is used to define top, bottom, left and right margins.
+ An uncreatable type that is used to define the top, bottom, left, and right
+ margins. The margins are used for drawing the title, axes, and legend.
+
+ \sa {ChartView::margins}{ChartView.margins}
*/
/*!
diff --git a/src/chartsqml2/declarativepolarchart.cpp b/src/chartsqml2/declarativepolarchart.cpp
index 6225a645..bc366d85 100644
--- a/src/chartsqml2/declarativepolarchart.cpp
+++ b/src/chartsqml2/declarativepolarchart.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
@@ -37,28 +37,36 @@ QT_CHARTS_BEGIN_NAMESPACE
\instantiates DeclarativePolarChart
\inqmlmodule QtCharts
- \brief Polar chart element.
+ \brief Presents data in polar charts.
- PolarChartView element is the parent that is responsible for showing different chart series
- types in a polar chart.
+ Polar charts present data in a circular graph, where the placement of data
+ is based on the angle and distance from the center of the graph, the
+ \e pole.
- Polar charts support line, spline, area, and scatter series, and all axis types
- supported by those series.
+ \image examples_qmlpolarchart1.png
+
+ A polar chart is a specialization of the ChartView type. It supports line,
+ spline, area, and scatter series, and all axis types supported by them. Each
+ axis can be used either as a radial or an angular axis.
- \note When setting ticks to an angular ValueAxis, keep in mind that the first and last tick
- are co-located at 0/360 degree angle.
+ The first and last tick mark on an angular ValueAxis are co-located at a
+ 0/360 degree angle.
- \note If the angular distance between two consecutive points in a series is more than 180
- degrees, any line connecting the two points becomes meaningless, so choose the axis ranges
+ If the angular distance between two consecutive points in a series is more
+ than 180 degrees, any direct line connecting the two points becomes
+ meaningless, and will not be drawn. Instead, a line will be drawn to and
+ from the center of the chart. Therefore, the axis ranges must be chosen
accordingly when displaying line, spline, or area series.
- The following QML shows how to create a polar chart with two series:
- \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1
+ Polar charts draw all axes of the same orientation in the same position, so
+ using multiple axes of the same orientation can be confusing, unless the
+ extra axes are only used to customize the grid. For example, you can display
+ a highlighted range with a secondary shaded CategoryAxis or provide
+ unlabeled subticks with a secondary ValueAxis thas has hidden labels.
- \beginfloatleft
- \image examples_qmlpolarchart1.png
- \endfloat
- \clearfloat
+ The following QML code shows how to create a polar chart with a spline and
+ scatter series and two value axes:
+ \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1
*/
DeclarativePolarChart::DeclarativePolarChart(QQuickItem *parent)
diff --git a/src/chartsqml2/declarativexypoint.cpp b/src/chartsqml2/declarativexypoint.cpp
index 91f4eae5..91ade7c2 100644
--- a/src/chartsqml2/declarativexypoint.cpp
+++ b/src/chartsqml2/declarativexypoint.cpp
@@ -36,11 +36,13 @@ QT_CHARTS_BEGIN_NAMESPACE
\qmltype XYPoint
\inqmlmodule QtCharts
- \brief Type is used to initialize XY-series coordinate data.
+ \brief Initializes XY-series coordinate data.
- XYPoint is a convenience element for initializing XY-series with static coordinate data. To
- manipulate an XY-series dynamically, use it's data manipulation functions instead.
- \sa LineSeries, AreaSeries, ScatterSeries, SplineSeries
+ The XYPoint type is a convenience type for initializing line, spline, and
+ scatter series with static coordinate data. To manipulate a series
+ dynamically, use the data manipulation functions it inherits from the
+ XYSeries type, instead.
+ \sa XYSeries, LineSeries, AreaSeries, ScatterSeries, SplineSeries
*/
/*!