summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/charts/areachart/qareaseries.h4
-rw-r--r--src/charts/axis/barcategoryaxis/qbarcategoryaxis.h4
-rw-r--r--src/charts/axis/categoryaxis/qcategoryaxis.h4
-rw-r--r--src/charts/axis/datetimeaxis/qdatetimeaxis.h4
-rw-r--r--src/charts/axis/horizontalaxis_p.h4
-rw-r--r--src/charts/axis/logvalueaxis/qlogvalueaxis.h4
-rw-r--r--src/charts/axis/qabstractaxis.h2
-rw-r--r--src/charts/axis/valueaxis/qvalueaxis.h4
-rw-r--r--src/charts/axis/verticalaxis_p.h4
-rw-r--r--src/charts/barchart/abstractbarchartitem.cpp10
-rw-r--r--src/charts/barchart/horizontal/bar/qhorizontalbarseries.h2
-rw-r--r--src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.h2
-rw-r--r--src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.h2
-rw-r--r--src/charts/barchart/qabstractbarseries.cpp36
-rw-r--r--src/charts/barchart/qabstractbarseries.h7
-rw-r--r--src/charts/barchart/qabstractbarseries_p.h1
-rw-r--r--src/charts/barchart/qbarmodelmapper.h2
-rw-r--r--src/charts/barchart/qbarset.h2
-rw-r--r--src/charts/barchart/qhbarmodelmapper.h2
-rw-r--r--src/charts/barchart/qvbarmodelmapper.h2
-rw-r--r--src/charts/barchart/vertical/bar/qbarseries.h2
-rw-r--r--src/charts/barchart/vertical/percent/qpercentbarseries.h2
-rw-r--r--src/charts/barchart/vertical/stacked/qstackedbarseries.h2
-rw-r--r--src/charts/boxplotchart/qboxplotmodelmapper.h2
-rw-r--r--src/charts/boxplotchart/qboxplotseries.h2
-rw-r--r--src/charts/boxplotchart/qboxset.h4
-rw-r--r--src/charts/boxplotchart/qvboxplotmodelmapper.h2
-rw-r--r--src/charts/glwidget_p.h14
-rw-r--r--src/charts/legend/qarealegendmarker.h4
-rw-r--r--src/charts/legend/qbarlegendmarker.h4
-rw-r--r--src/charts/legend/qboxplotlegendmarker.h4
-rw-r--r--src/charts/legend/qlegend.h4
-rw-r--r--src/charts/legend/qlegendmarker.h2
-rw-r--r--src/charts/legend/qpielegendmarker.h4
-rw-r--r--src/charts/legend/qxylegendmarker.h4
-rw-r--r--src/charts/linechart/qlineseries.h4
-rw-r--r--src/charts/piechart/qhpiemodelmapper.h2
-rw-r--r--src/charts/piechart/qpiemodelmapper.h2
-rw-r--r--src/charts/piechart/qpieseries.h2
-rw-r--r--src/charts/piechart/qpieslice.h4
-rw-r--r--src/charts/piechart/qvpiemodelmapper.h2
-rw-r--r--src/charts/qchart.h16
-rw-r--r--src/charts/qchartview.h4
-rw-r--r--src/charts/qpolarchart.h4
-rw-r--r--src/charts/scatterchart/qscatterseries.h2
-rw-r--r--src/charts/splinechart/qsplineseries.h2
-rw-r--r--src/charts/xychart/qhxymodelmapper.h2
-rw-r--r--src/charts/xychart/qvxymodelmapper.h2
-rw-r--r--src/charts/xychart/qxymodelmapper.h2
-rw-r--r--src/charts/xychart/qxyseries.h2
-rw-r--r--tests/auto/qbarseries/tst_qbarseries.cpp14
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/BarChart.qml3
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml10
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalBarChart.qml3
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalPercentBarChart.qml3
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml3
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml3
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml3
59 files changed, 170 insertions, 84 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 0338efe0..dc68d388 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.10.1
+MODULE_VERSION = 5.11.0
diff --git a/src/charts/areachart/qareaseries.h b/src/charts/areachart/qareaseries.h
index 0d05ca5e..cd6e58b4 100644
--- a/src/charts/areachart/qareaseries.h
+++ b/src/charts/areachart/qareaseries.h
@@ -53,8 +53,8 @@ class QT_CHARTS_EXPORT QAreaSeries : public QAbstractSeries
Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged)
public:
- explicit QAreaSeries(QObject *parent = Q_NULLPTR);
- explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = Q_NULLPTR);
+ explicit QAreaSeries(QObject *parent = nullptr);
+ explicit QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = nullptr);
~QAreaSeries();
public:
diff --git a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.h b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.h
index 15ff9ee5..54763e82 100644
--- a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.h
+++ b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.h
@@ -45,11 +45,11 @@ class QT_CHARTS_EXPORT QBarCategoryAxis : public QAbstractAxis
Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
- explicit QBarCategoryAxis(QObject *parent = Q_NULLPTR);
+ explicit QBarCategoryAxis(QObject *parent = nullptr);
~QBarCategoryAxis();
protected:
- QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent = nullptr);
public:
AxisType type() const;
diff --git a/src/charts/axis/categoryaxis/qcategoryaxis.h b/src/charts/axis/categoryaxis/qcategoryaxis.h
index eac9b4c1..3400aa18 100644
--- a/src/charts/axis/categoryaxis/qcategoryaxis.h
+++ b/src/charts/axis/categoryaxis/qcategoryaxis.h
@@ -53,11 +53,11 @@ public:
AxisLabelsPositionOnValue = 0x1
};
- explicit QCategoryAxis(QObject *parent = Q_NULLPTR);
+ explicit QCategoryAxis(QObject *parent = nullptr);
~QCategoryAxis();
protected:
- QCategoryAxis(QCategoryAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ QCategoryAxis(QCategoryAxisPrivate &d, QObject *parent = nullptr);
public:
AxisType type() const;
diff --git a/src/charts/axis/datetimeaxis/qdatetimeaxis.h b/src/charts/axis/datetimeaxis/qdatetimeaxis.h
index 142ac7e0..98942949 100644
--- a/src/charts/axis/datetimeaxis/qdatetimeaxis.h
+++ b/src/charts/axis/datetimeaxis/qdatetimeaxis.h
@@ -49,11 +49,11 @@ class QT_CHARTS_EXPORT QDateTimeAxis : public QAbstractAxis
Q_PROPERTY(QString format READ format WRITE setFormat NOTIFY formatChanged)
public:
- explicit QDateTimeAxis(QObject *parent = Q_NULLPTR);
+ explicit QDateTimeAxis(QObject *parent = nullptr);
~QDateTimeAxis();
protected:
- QDateTimeAxis(QDateTimeAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ QDateTimeAxis(QDateTimeAxisPrivate &d, QObject *parent = nullptr);
public:
AxisType type() const;
diff --git a/src/charts/axis/horizontalaxis_p.h b/src/charts/axis/horizontalaxis_p.h
index 1fe0c405..e7b6ccda 100644
--- a/src/charts/axis/horizontalaxis_p.h
+++ b/src/charts/axis/horizontalaxis_p.h
@@ -49,10 +49,10 @@ public:
HorizontalAxis(QAbstractAxis *axis, QGraphicsItem *item = nullptr, bool intervalAxis = false);
~HorizontalAxis();
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
protected:
- void updateGeometry() Q_DECL_OVERRIDE;
+ void updateGeometry() override;
private:
void updateMinorTickGeometry();
diff --git a/src/charts/axis/logvalueaxis/qlogvalueaxis.h b/src/charts/axis/logvalueaxis/qlogvalueaxis.h
index 2614cff3..1ea9f2b1 100644
--- a/src/charts/axis/logvalueaxis/qlogvalueaxis.h
+++ b/src/charts/axis/logvalueaxis/qlogvalueaxis.h
@@ -51,11 +51,11 @@ class QT_CHARTS_EXPORT QLogValueAxis : public QAbstractAxis
Q_PROPERTY(int minorTickCount READ minorTickCount WRITE setMinorTickCount NOTIFY minorTickCountChanged)
public:
- explicit QLogValueAxis(QObject *parent = Q_NULLPTR);
+ explicit QLogValueAxis(QObject *parent = nullptr);
~QLogValueAxis();
protected:
- QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ QLogValueAxis(QLogValueAxisPrivate &d, QObject *parent = nullptr);
public:
AxisType type() const;
diff --git a/src/charts/axis/qabstractaxis.h b/src/charts/axis/qabstractaxis.h
index 8158f27d..4f902679 100644
--- a/src/charts/axis/qabstractaxis.h
+++ b/src/charts/axis/qabstractaxis.h
@@ -92,7 +92,7 @@ public:
Q_DECLARE_FLAGS(AxisTypes, AxisType)
protected:
- explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = nullptr);
public:
~QAbstractAxis();
diff --git a/src/charts/axis/valueaxis/qvalueaxis.h b/src/charts/axis/valueaxis/qvalueaxis.h
index 2a53df09..45f54be9 100644
--- a/src/charts/axis/valueaxis/qvalueaxis.h
+++ b/src/charts/axis/valueaxis/qvalueaxis.h
@@ -46,11 +46,11 @@ class QT_CHARTS_EXPORT QValueAxis : public QAbstractAxis
Q_PROPERTY(int minorTickCount READ minorTickCount WRITE setMinorTickCount NOTIFY minorTickCountChanged)
public:
- explicit QValueAxis(QObject *parent = Q_NULLPTR);
+ explicit QValueAxis(QObject *parent = nullptr);
~QValueAxis();
protected:
- QValueAxis(QValueAxisPrivate &d, QObject *parent = Q_NULLPTR);
+ QValueAxis(QValueAxisPrivate &d, QObject *parent = nullptr);
public:
AxisType type() const;
diff --git a/src/charts/axis/verticalaxis_p.h b/src/charts/axis/verticalaxis_p.h
index 687d03d2..1058bf8c 100644
--- a/src/charts/axis/verticalaxis_p.h
+++ b/src/charts/axis/verticalaxis_p.h
@@ -49,10 +49,10 @@ public:
VerticalAxis(QAbstractAxis *axis, QGraphicsItem *item = nullptr, bool intervalAxis = false);
~VerticalAxis();
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
protected:
- void updateGeometry() Q_DECL_OVERRIDE;
+ void updateGeometry() override;
private:
void updateMinorTickGeometry();
diff --git a/src/charts/barchart/abstractbarchartitem.cpp b/src/charts/barchart/abstractbarchartitem.cpp
index f435044e..2d0d0e25 100644
--- a/src/charts/barchart/abstractbarchartitem.cpp
+++ b/src/charts/barchart/abstractbarchartitem.cpp
@@ -75,6 +75,10 @@ AbstractBarChartItem::AbstractBarChartItem(QAbstractBarSeries *series, QGraphics
connect(series, SIGNAL(labelsPositionChanged(QAbstractBarSeries::LabelsPosition)),
this, SLOT(handleLabelsPositionChanged()));
connect(series, SIGNAL(labelsAngleChanged(qreal)), this, SLOT(positionLabels()));
+ connect(series, &QAbstractBarSeries::labelsPrecisionChanged,
+ this, &AbstractBarChartItem::handleUpdatedBars);
+ connect(series, &QAbstractBarSeries::labelsPrecisionChanged,
+ this, &AbstractBarChartItem::positionLabels);
connect(series->chart()->d_ptr->m_dataset, &ChartDataSet::seriesAdded,
this, &AbstractBarChartItem::handleSeriesAdded);
connect(series->chart()->d_ptr->m_dataset, &ChartDataSet::seriesRemoved,
@@ -552,13 +556,15 @@ QString AbstractBarChartItem::generateLabelText(int set, int category, qreal val
Q_UNUSED(set);
Q_UNUSED(category);
static const QString valueTag(QLatin1String("@value"));
+ QString valueString = presenter()->numberToString(value, 'g', m_series->labelsPrecision());
QString valueLabel;
if (m_series->labelsFormat().isEmpty()) {
- valueLabel = presenter()->numberToString(value);
+ valueLabel = valueString;
} else {
valueLabel = m_series->labelsFormat();
- valueLabel.replace(valueTag, presenter()->numberToString(value));
+ valueLabel.replace(valueTag, valueString);
}
+
return valueLabel;
}
diff --git a/src/charts/barchart/horizontal/bar/qhorizontalbarseries.h b/src/charts/barchart/horizontal/bar/qhorizontalbarseries.h
index 104093df..c3d07e0d 100644
--- a/src/charts/barchart/horizontal/bar/qhorizontalbarseries.h
+++ b/src/charts/barchart/horizontal/bar/qhorizontalbarseries.h
@@ -40,7 +40,7 @@ class QT_CHARTS_EXPORT QHorizontalBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QHorizontalBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QHorizontalBarSeries(QObject *parent = nullptr);
~QHorizontalBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.h b/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.h
index 6c2928b9..5c78b029 100644
--- a/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.h
+++ b/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.h
@@ -40,7 +40,7 @@ class QT_CHARTS_EXPORT QHorizontalPercentBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QHorizontalPercentBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QHorizontalPercentBarSeries(QObject *parent = nullptr);
~QHorizontalPercentBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.h b/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.h
index 3c2711d1..9f944262 100644
--- a/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.h
+++ b/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.h
@@ -40,7 +40,7 @@ class QT_CHARTS_EXPORT QHorizontalStackedBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QHorizontalStackedBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QHorizontalStackedBarSeries(QObject *parent = nullptr);
~QHorizontalStackedBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/barchart/qabstractbarseries.cpp b/src/charts/barchart/qabstractbarseries.cpp
index cd27cd1c..410087f2 100644
--- a/src/charts/barchart/qabstractbarseries.cpp
+++ b/src/charts/barchart/qabstractbarseries.cpp
@@ -185,7 +185,7 @@ QT_CHARTS_BEGIN_NAMESPACE
after the value. The labels are shown on the plot area, whereas labels on the edge of the plot
area are cut. If the bars are close to each other, the labels may overlap.
- \sa labelsVisible, labelsPosition
+ \sa labelsVisible, labelsPosition, labelsPrecision
*/
/*!
\qmlproperty string AbstractBarSeries::labelsFormat
@@ -250,6 +250,23 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
+ \property QAbstractBarSeries::labelsPrecision
+ \brief The maximum amount of significant digits shown in value labels.
+
+ Default value is 6.
+*/
+/*!
+ \qmlproperty real AbstractBarSeries::labelsPrecision
+ The maximum amount of significant digits shown in value labels.
+
+ Default value is 6.
+*/
+/*!
+ \fn void QAbstractBarSeries::labelsPrecisionChanged(int precision)
+ This signal is emitted when the \a precision of the value labels changes.
+*/
+
+/*!
\fn void QAbstractBarSeries::clicked(int index, QBarSet *barset)
This signal is emitted when the user clicks the bar specified by \a index
in the bar set specified by \a barset.
@@ -629,6 +646,22 @@ QAbstractBarSeries::LabelsPosition QAbstractBarSeries::labelsPosition() const
return d->m_labelsPosition;
}
+void QAbstractBarSeries::setLabelsPrecision(int precision)
+{
+ Q_D(QAbstractBarSeries);
+ if (d->m_labelsPrecision != precision) {
+ d->m_labelsPrecision = precision;
+ d->setLabelsDirty(true);
+ emit labelsPrecisionChanged(precision);
+ }
+}
+
+int QAbstractBarSeries::labelsPrecision() const
+{
+ Q_D(const QAbstractBarSeries);
+ return d->m_labelsPrecision;
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
QAbstractBarSeriesPrivate::QAbstractBarSeriesPrivate(QAbstractBarSeries *q) :
@@ -640,6 +673,7 @@ QAbstractBarSeriesPrivate::QAbstractBarSeriesPrivate(QAbstractBarSeries *q) :
m_labelsFormat(),
m_labelsPosition(QAbstractBarSeries::LabelsCenter),
m_labelsAngle(0),
+ m_labelsPrecision(6),
m_visualsDirty(true),
m_labelsDirty(true)
{
diff --git a/src/charts/barchart/qabstractbarseries.h b/src/charts/barchart/qabstractbarseries.h
index 3bff84a4..82000d34 100644
--- a/src/charts/barchart/qabstractbarseries.h
+++ b/src/charts/barchart/qabstractbarseries.h
@@ -48,6 +48,7 @@ class QT_CHARTS_EXPORT QAbstractBarSeries : public QAbstractSeries
Q_PROPERTY(QString labelsFormat READ labelsFormat WRITE setLabelsFormat NOTIFY labelsFormatChanged)
Q_PROPERTY(LabelsPosition labelsPosition READ labelsPosition WRITE setLabelsPosition NOTIFY labelsPositionChanged)
Q_PROPERTY(qreal labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
+ Q_PROPERTY(int labelsPrecision READ labelsPrecision WRITE setLabelsPrecision NOTIFY labelsPrecisionChanged)
Q_ENUMS(LabelsPosition)
public:
@@ -85,8 +86,11 @@ public:
void setLabelsPosition(QAbstractBarSeries::LabelsPosition position);
QAbstractBarSeries::LabelsPosition labelsPosition() const;
+ void setLabelsPrecision(int precision);
+ int labelsPrecision() const;
+
protected:
- explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = Q_NULLPTR);
+ explicit QAbstractBarSeries(QAbstractBarSeriesPrivate &d, QObject *parent = nullptr);
Q_SIGNALS:
void clicked(int index, QBarSet *barset);
@@ -99,6 +103,7 @@ Q_SIGNALS:
void labelsFormatChanged(const QString &format);
void labelsPositionChanged(QAbstractBarSeries::LabelsPosition position);
void labelsAngleChanged(qreal angle);
+ void labelsPrecisionChanged(int precision);
void barsetsAdded(QList<QBarSet *> sets);
void barsetsRemoved(QList<QBarSet *> sets);
diff --git a/src/charts/barchart/qabstractbarseries_p.h b/src/charts/barchart/qabstractbarseries_p.h
index 62ddb420..9b3ce6e1 100644
--- a/src/charts/barchart/qabstractbarseries_p.h
+++ b/src/charts/barchart/qabstractbarseries_p.h
@@ -133,6 +133,7 @@ protected:
QString m_labelsFormat;
QAbstractBarSeries::LabelsPosition m_labelsPosition;
qreal m_labelsAngle;
+ int m_labelsPrecision;
bool m_visualsDirty;
bool m_labelsDirty;
diff --git a/src/charts/barchart/qbarmodelmapper.h b/src/charts/barchart/qbarmodelmapper.h
index 1118fd22..6d08fb5a 100644
--- a/src/charts/barchart/qbarmodelmapper.h
+++ b/src/charts/barchart/qbarmodelmapper.h
@@ -47,7 +47,7 @@ class QT_CHARTS_EXPORT QBarModelMapper : public QObject
Q_OBJECT
protected:
- explicit QBarModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QBarModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/barchart/qbarset.h b/src/charts/barchart/qbarset.h
index 0859bff5..7edd93e0 100644
--- a/src/charts/barchart/qbarset.h
+++ b/src/charts/barchart/qbarset.h
@@ -51,7 +51,7 @@ class QT_CHARTS_EXPORT QBarSet : public QObject
Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged)
public:
- explicit QBarSet(const QString label, QObject *parent = Q_NULLPTR);
+ explicit QBarSet(const QString label, QObject *parent = nullptr);
virtual ~QBarSet();
void setLabel(const QString label);
diff --git a/src/charts/barchart/qhbarmodelmapper.h b/src/charts/barchart/qhbarmodelmapper.h
index 8063a811..23fe8e4f 100644
--- a/src/charts/barchart/qhbarmodelmapper.h
+++ b/src/charts/barchart/qhbarmodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QHBarModelMapper : public QBarModelMapper
Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
public:
- explicit QHBarModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QHBarModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/barchart/qvbarmodelmapper.h b/src/charts/barchart/qvbarmodelmapper.h
index a4e8ae39..84c7a6ea 100644
--- a/src/charts/barchart/qvbarmodelmapper.h
+++ b/src/charts/barchart/qvbarmodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QVBarModelMapper : public QBarModelMapper
Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
public:
- explicit QVBarModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QVBarModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/barchart/vertical/bar/qbarseries.h b/src/charts/barchart/vertical/bar/qbarseries.h
index 95d9ae24..5de28119 100644
--- a/src/charts/barchart/vertical/bar/qbarseries.h
+++ b/src/charts/barchart/vertical/bar/qbarseries.h
@@ -40,7 +40,7 @@ class QT_CHARTS_EXPORT QBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QBarSeries(QObject *parent = nullptr);
~QBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/barchart/vertical/percent/qpercentbarseries.h b/src/charts/barchart/vertical/percent/qpercentbarseries.h
index ee4796c4..e5545ec6 100644
--- a/src/charts/barchart/vertical/percent/qpercentbarseries.h
+++ b/src/charts/barchart/vertical/percent/qpercentbarseries.h
@@ -41,7 +41,7 @@ class QT_CHARTS_EXPORT QPercentBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QPercentBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QPercentBarSeries(QObject *parent = nullptr);
~QPercentBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/barchart/vertical/stacked/qstackedbarseries.h b/src/charts/barchart/vertical/stacked/qstackedbarseries.h
index d3efa99a..d6032350 100644
--- a/src/charts/barchart/vertical/stacked/qstackedbarseries.h
+++ b/src/charts/barchart/vertical/stacked/qstackedbarseries.h
@@ -41,7 +41,7 @@ class QT_CHARTS_EXPORT QStackedBarSeries : public QAbstractBarSeries
{
Q_OBJECT
public:
- explicit QStackedBarSeries(QObject *parent = Q_NULLPTR);
+ explicit QStackedBarSeries(QObject *parent = nullptr);
~QStackedBarSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/boxplotchart/qboxplotmodelmapper.h b/src/charts/boxplotchart/qboxplotmodelmapper.h
index a48a69a7..4b57002b 100644
--- a/src/charts/boxplotchart/qboxplotmodelmapper.h
+++ b/src/charts/boxplotchart/qboxplotmodelmapper.h
@@ -47,7 +47,7 @@ class QT_CHARTS_EXPORT QBoxPlotModelMapper : public QObject
Q_OBJECT
protected:
- explicit QBoxPlotModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QBoxPlotModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/boxplotchart/qboxplotseries.h b/src/charts/boxplotchart/qboxplotseries.h
index f86e1a87..fa736d56 100644
--- a/src/charts/boxplotchart/qboxplotseries.h
+++ b/src/charts/boxplotchart/qboxplotseries.h
@@ -47,7 +47,7 @@ class QT_CHARTS_EXPORT QBoxPlotSeries : public QAbstractSeries
Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged REVISION 1)
public:
- explicit QBoxPlotSeries(QObject *parent = Q_NULLPTR);
+ explicit QBoxPlotSeries(QObject *parent = nullptr);
~QBoxPlotSeries();
bool append(QBoxSet *box);
diff --git a/src/charts/boxplotchart/qboxset.h b/src/charts/boxplotchart/qboxset.h
index 84a4ebff..eada7690 100644
--- a/src/charts/boxplotchart/qboxset.h
+++ b/src/charts/boxplotchart/qboxset.h
@@ -54,8 +54,8 @@ public:
};
public:
- explicit QBoxSet(const QString label = QString(), QObject *parent = Q_NULLPTR);
- explicit QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = Q_NULLPTR);
+ explicit QBoxSet(const QString label = QString(), QObject *parent = nullptr);
+ explicit QBoxSet(const qreal le, const qreal lq, const qreal m, const qreal uq, const qreal ue, const QString label = QString(), QObject *parent = nullptr);
virtual ~QBoxSet();
void append(const qreal value);
diff --git a/src/charts/boxplotchart/qvboxplotmodelmapper.h b/src/charts/boxplotchart/qvboxplotmodelmapper.h
index b1508899..1f85c903 100644
--- a/src/charts/boxplotchart/qvboxplotmodelmapper.h
+++ b/src/charts/boxplotchart/qvboxplotmodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QVBoxPlotModelMapper : public QBoxPlotModelMapper
Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
public:
- explicit QVBoxPlotModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QVBoxPlotModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/glwidget_p.h b/src/charts/glwidget_p.h
index f80575bf..f2e85a34 100644
--- a/src/charts/glwidget_p.h
+++ b/src/charts/glwidget_p.h
@@ -73,13 +73,13 @@ public Q_SLOTS:
void cleanXYSeriesResources(const QXYSeries *series);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
- void resizeGL(int width, int height) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
+ void resizeGL(int width, int height) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
private:
QXYSeries *findSeriesAtEvent(QMouseEvent *event);
diff --git a/src/charts/legend/qarealegendmarker.h b/src/charts/legend/qarealegendmarker.h
index e7541587..3d88fa08 100644
--- a/src/charts/legend/qarealegendmarker.h
+++ b/src/charts/legend/qarealegendmarker.h
@@ -43,7 +43,7 @@ class QT_CHARTS_EXPORT QAreaLegendMarker : public QLegendMarker
Q_OBJECT
public:
- explicit QAreaLegendMarker(QAreaSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
+ explicit QAreaLegendMarker(QAreaSeries *series, QLegend *legend, QObject *parent = nullptr);
virtual ~QAreaLegendMarker();
virtual LegendMarkerType type() { return LegendMarkerTypeArea; }
@@ -52,7 +52,7 @@ public:
virtual QAreaSeries* series();
protected:
- QAreaLegendMarker(QAreaLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ QAreaLegendMarker(QAreaLegendMarkerPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QAreaLegendMarker)
diff --git a/src/charts/legend/qbarlegendmarker.h b/src/charts/legend/qbarlegendmarker.h
index 127d3f85..e1b3dcda 100644
--- a/src/charts/legend/qbarlegendmarker.h
+++ b/src/charts/legend/qbarlegendmarker.h
@@ -43,7 +43,7 @@ class QT_CHARTS_EXPORT QBarLegendMarker : public QLegendMarker
{
Q_OBJECT
public:
- explicit QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset, QLegend *legend, QObject *parent = Q_NULLPTR);
+ explicit QBarLegendMarker(QAbstractBarSeries *series, QBarSet *barset, QLegend *legend, QObject *parent = nullptr);
virtual ~QBarLegendMarker();
virtual LegendMarkerType type() { return LegendMarkerTypeBar; }
@@ -53,7 +53,7 @@ public:
QBarSet* barset();
protected:
- QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ QBarLegendMarker(QBarLegendMarkerPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QBarLegendMarker)
diff --git a/src/charts/legend/qboxplotlegendmarker.h b/src/charts/legend/qboxplotlegendmarker.h
index 2f977325..db6e9edd 100644
--- a/src/charts/legend/qboxplotlegendmarker.h
+++ b/src/charts/legend/qboxplotlegendmarker.h
@@ -43,7 +43,7 @@ class QT_CHARTS_EXPORT QBoxPlotLegendMarker : public QLegendMarker
Q_OBJECT
public:
- explicit QBoxPlotLegendMarker(QBoxPlotSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
+ explicit QBoxPlotLegendMarker(QBoxPlotSeries *series, QLegend *legend, QObject *parent = nullptr);
virtual ~QBoxPlotLegendMarker();
virtual LegendMarkerType type() { return LegendMarkerTypeBoxPlot; }
@@ -52,7 +52,7 @@ public:
virtual QBoxPlotSeries* series();
protected:
- QBoxPlotLegendMarker(QBoxPlotLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ QBoxPlotLegendMarker(QBoxPlotLegendMarkerPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QBoxPlotLegendMarker)
diff --git a/src/charts/legend/qlegend.h b/src/charts/legend/qlegend.h
index fa3a8258..7b5b3a2e 100644
--- a/src/charts/legend/qlegend.h
+++ b/src/charts/legend/qlegend.h
@@ -69,7 +69,7 @@ public:
~QLegend();
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR);
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
void setBrush(const QBrush &brush);
QBrush brush() const;
@@ -99,7 +99,7 @@ public:
void setBackgroundVisible(bool visible = true);
bool isBackgroundVisible() const;
- QList <QLegendMarker*> markers(QAbstractSeries *series = Q_NULLPTR) const;
+ QList <QLegendMarker*> markers(QAbstractSeries *series = nullptr) const;
bool reverseMarkers();
void setReverseMarkers(bool reverseMarkers = true);
diff --git a/src/charts/legend/qlegendmarker.h b/src/charts/legend/qlegendmarker.h
index 72ad384c..1ae65f0e 100644
--- a/src/charts/legend/qlegendmarker.h
+++ b/src/charts/legend/qlegendmarker.h
@@ -105,7 +105,7 @@ Q_SIGNALS:
void shapeChanged();
protected:
- explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = nullptr);
QScopedPointer<QLegendMarkerPrivate> d_ptr;
friend class QLegendPrivate;
diff --git a/src/charts/legend/qpielegendmarker.h b/src/charts/legend/qpielegendmarker.h
index 233f5558..a4a0463d 100644
--- a/src/charts/legend/qpielegendmarker.h
+++ b/src/charts/legend/qpielegendmarker.h
@@ -44,7 +44,7 @@ class QT_CHARTS_EXPORT QPieLegendMarker : public QLegendMarker
Q_OBJECT
public:
- explicit QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend *legend, QObject *parent = Q_NULLPTR);
+ explicit QPieLegendMarker(QPieSeries *series, QPieSlice *slice, QLegend *legend, QObject *parent = nullptr);
virtual ~QPieLegendMarker();
virtual LegendMarkerType type() { return LegendMarkerTypePie; }
@@ -54,7 +54,7 @@ public:
QPieSlice* slice();
protected:
- QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ QPieLegendMarker(QPieLegendMarkerPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QPieLegendMarker)
diff --git a/src/charts/legend/qxylegendmarker.h b/src/charts/legend/qxylegendmarker.h
index 0c452305..0a714428 100644
--- a/src/charts/legend/qxylegendmarker.h
+++ b/src/charts/legend/qxylegendmarker.h
@@ -42,7 +42,7 @@ class QT_CHARTS_EXPORT QXYLegendMarker : public QLegendMarker
{
Q_OBJECT
public:
- explicit QXYLegendMarker(QXYSeries *series, QLegend *legend, QObject *parent = Q_NULLPTR);
+ explicit QXYLegendMarker(QXYSeries *series, QLegend *legend, QObject *parent = nullptr);
virtual ~QXYLegendMarker();
virtual LegendMarkerType type() { return LegendMarkerTypeXY; }
@@ -51,7 +51,7 @@ public:
virtual QXYSeries* series();
protected:
- QXYLegendMarker(QXYLegendMarkerPrivate &d, QObject *parent = Q_NULLPTR);
+ QXYLegendMarker(QXYLegendMarkerPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QXYLegendMarker)
diff --git a/src/charts/linechart/qlineseries.h b/src/charts/linechart/qlineseries.h
index ef694244..654afac2 100644
--- a/src/charts/linechart/qlineseries.h
+++ b/src/charts/linechart/qlineseries.h
@@ -43,12 +43,12 @@ class QT_CHARTS_EXPORT QLineSeries : public QXYSeries
Q_OBJECT
public:
- explicit QLineSeries(QObject *parent = Q_NULLPTR);
+ explicit QLineSeries(QObject *parent = nullptr);
~QLineSeries();
QAbstractSeries::SeriesType type() const;
protected:
- QLineSeries(QLineSeriesPrivate &d, QObject *parent = Q_NULLPTR);
+ QLineSeries(QLineSeriesPrivate &d, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QLineSeries)
diff --git a/src/charts/piechart/qhpiemodelmapper.h b/src/charts/piechart/qhpiemodelmapper.h
index 6857e64a..8698b35e 100644
--- a/src/charts/piechart/qhpiemodelmapper.h
+++ b/src/charts/piechart/qhpiemodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QHPieModelMapper : public QPieModelMapper
Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
public:
- explicit QHPieModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QHPieModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/piechart/qpiemodelmapper.h b/src/charts/piechart/qpiemodelmapper.h
index b6d0c68b..a9b07cf4 100644
--- a/src/charts/piechart/qpiemodelmapper.h
+++ b/src/charts/piechart/qpiemodelmapper.h
@@ -47,7 +47,7 @@ class QT_CHARTS_EXPORT QPieModelMapper : public QObject
Q_OBJECT
protected:
- explicit QPieModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QPieModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/piechart/qpieseries.h b/src/charts/piechart/qpieseries.h
index 1eabb6a5..34d3b6c9 100644
--- a/src/charts/piechart/qpieseries.h
+++ b/src/charts/piechart/qpieseries.h
@@ -49,7 +49,7 @@ class QT_CHARTS_EXPORT QPieSeries : public QAbstractSeries
Q_PROPERTY(qreal holeSize READ holeSize WRITE setHoleSize)
public:
- explicit QPieSeries(QObject *parent = Q_NULLPTR);
+ explicit QPieSeries(QObject *parent = nullptr);
virtual ~QPieSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/piechart/qpieslice.h b/src/charts/piechart/qpieslice.h
index e305bd64..d508e001 100644
--- a/src/charts/piechart/qpieslice.h
+++ b/src/charts/piechart/qpieslice.h
@@ -72,8 +72,8 @@ public:
};
public:
- explicit QPieSlice(QObject *parent = Q_NULLPTR);
- QPieSlice(QString label, qreal value, QObject *parent = Q_NULLPTR);
+ explicit QPieSlice(QObject *parent = nullptr);
+ QPieSlice(QString label, qreal value, QObject *parent = nullptr);
virtual ~QPieSlice();
void setLabel(QString label);
diff --git a/src/charts/piechart/qvpiemodelmapper.h b/src/charts/piechart/qvpiemodelmapper.h
index 55329247..1f2b7b50 100644
--- a/src/charts/piechart/qvpiemodelmapper.h
+++ b/src/charts/piechart/qvpiemodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QVPieModelMapper : public QPieModelMapper
Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
public:
- explicit QVPieModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QVPieModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/qchart.h b/src/charts/qchart.h
index 225d296a..a193ba22 100644
--- a/src/charts/qchart.h
+++ b/src/charts/qchart.h
@@ -96,7 +96,7 @@ public:
Q_DECLARE_FLAGS(AnimationOptions, AnimationOption)
public:
- explicit QChart(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
+ explicit QChart(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
~QChart();
void addSeries(QAbstractSeries *series);
@@ -105,15 +105,15 @@ public:
QList<QAbstractSeries *> series() const;
// *** deprecated ***
- void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
- void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = Q_NULLPTR);
- QAbstractAxis *axisX(QAbstractSeries *series = Q_NULLPTR) const;
- QAbstractAxis *axisY(QAbstractSeries *series = Q_NULLPTR) const;
+ void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = nullptr);
+ void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = nullptr);
+ QAbstractAxis *axisX(QAbstractSeries *series = nullptr) const;
+ QAbstractAxis *axisY(QAbstractSeries *series = nullptr) const;
// ******************
void addAxis(QAbstractAxis *axis, Qt::Alignment alignment);
void removeAxis(QAbstractAxis *axis);
- QList<QAbstractAxis*> axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = Q_NULLPTR) const;
+ QList<QAbstractAxis*> axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = nullptr) const;
void createDefaultAxes();
@@ -173,8 +173,8 @@ public:
void setLocale(const QLocale &locale);
QLocale locale() const;
- QPointF mapToValue(const QPointF &position, QAbstractSeries *series = Q_NULLPTR);
- QPointF mapToPosition(const QPointF &value, QAbstractSeries *series = Q_NULLPTR);
+ QPointF mapToValue(const QPointF &position, QAbstractSeries *series = nullptr);
+ QPointF mapToPosition(const QPointF &value, QAbstractSeries *series = nullptr);
ChartType chartType() const;
diff --git a/src/charts/qchartview.h b/src/charts/qchartview.h
index 84b269fb..1cf719b3 100644
--- a/src/charts/qchartview.h
+++ b/src/charts/qchartview.h
@@ -59,8 +59,8 @@ public:
Q_DECLARE_FLAGS(RubberBands, RubberBand)
- explicit QChartView(QWidget *parent = Q_NULLPTR);
- explicit QChartView(QChart *chart, QWidget *parent = Q_NULLPTR);
+ explicit QChartView(QWidget *parent = nullptr);
+ explicit QChartView(QChart *chart, QWidget *parent = nullptr);
~QChartView();
void setRubberBand(const RubberBands &rubberBands);
diff --git a/src/charts/qpolarchart.h b/src/charts/qpolarchart.h
index 067363c2..8d3fa287 100644
--- a/src/charts/qpolarchart.h
+++ b/src/charts/qpolarchart.h
@@ -51,12 +51,12 @@ public:
Q_DECLARE_FLAGS(PolarOrientations, PolarOrientation)
public:
- explicit QPolarChart(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
+ explicit QPolarChart(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
~QPolarChart();
void addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation);
- QList<QAbstractAxis*> axes(PolarOrientations polarOrientation = PolarOrientations(PolarOrientationRadial | PolarOrientationAngular), QAbstractSeries *series = Q_NULLPTR) const;
+ QList<QAbstractAxis*> axes(PolarOrientations polarOrientation = PolarOrientations(PolarOrientationRadial | PolarOrientationAngular), QAbstractSeries *series = nullptr) const;
static PolarOrientation axisPolarOrientation(QAbstractAxis *axis);
diff --git a/src/charts/scatterchart/qscatterseries.h b/src/charts/scatterchart/qscatterseries.h
index 74e44e37..ac3e5989 100644
--- a/src/charts/scatterchart/qscatterseries.h
+++ b/src/charts/scatterchart/qscatterseries.h
@@ -54,7 +54,7 @@ public:
};
public:
- explicit QScatterSeries(QObject *parent = Q_NULLPTR);
+ explicit QScatterSeries(QObject *parent = nullptr);
~QScatterSeries();
QAbstractSeries::SeriesType type() const;
void setPen(const QPen &pen);
diff --git a/src/charts/splinechart/qsplineseries.h b/src/charts/splinechart/qsplineseries.h
index 41059e37..35ebcf31 100644
--- a/src/charts/splinechart/qsplineseries.h
+++ b/src/charts/splinechart/qsplineseries.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QSplineSeries : public QLineSeries
Q_OBJECT
public:
- explicit QSplineSeries(QObject *parent = Q_NULLPTR);
+ explicit QSplineSeries(QObject *parent = nullptr);
~QSplineSeries();
QAbstractSeries::SeriesType type() const;
diff --git a/src/charts/xychart/qhxymodelmapper.h b/src/charts/xychart/qhxymodelmapper.h
index 677517cc..c540e69b 100644
--- a/src/charts/xychart/qhxymodelmapper.h
+++ b/src/charts/xychart/qhxymodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QHXYModelMapper : public QXYModelMapper
Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
public:
- explicit QHXYModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QHXYModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/xychart/qvxymodelmapper.h b/src/charts/xychart/qvxymodelmapper.h
index 922121b5..0ab9ea4d 100644
--- a/src/charts/xychart/qvxymodelmapper.h
+++ b/src/charts/xychart/qvxymodelmapper.h
@@ -45,7 +45,7 @@ class QT_CHARTS_EXPORT QVXYModelMapper : public QXYModelMapper
Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount NOTIFY rowCountChanged)
public:
- explicit QVXYModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QVXYModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/xychart/qxymodelmapper.h b/src/charts/xychart/qxymodelmapper.h
index 64b0aeab..c7d53284 100644
--- a/src/charts/xychart/qxymodelmapper.h
+++ b/src/charts/xychart/qxymodelmapper.h
@@ -47,7 +47,7 @@ class QT_CHARTS_EXPORT QXYModelMapper : public QObject
Q_OBJECT
protected:
- explicit QXYModelMapper(QObject *parent = Q_NULLPTR);
+ explicit QXYModelMapper(QObject *parent = nullptr);
QAbstractItemModel *model() const;
void setModel(QAbstractItemModel *model);
diff --git a/src/charts/xychart/qxyseries.h b/src/charts/xychart/qxyseries.h
index 11c87b50..f81161ff 100644
--- a/src/charts/xychart/qxyseries.h
+++ b/src/charts/xychart/qxyseries.h
@@ -56,7 +56,7 @@ class QT_CHARTS_EXPORT QXYSeries : public QAbstractSeries
Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged)
protected:
- explicit QXYSeries(QXYSeriesPrivate &d, QObject *parent = Q_NULLPTR);
+ explicit QXYSeries(QXYSeriesPrivate &d, QObject *parent = nullptr);
public:
~QXYSeries();
diff --git a/tests/auto/qbarseries/tst_qbarseries.cpp b/tests/auto/qbarseries/tst_qbarseries.cpp
index 5fe2808c..ef49b1ca 100644
--- a/tests/auto/qbarseries/tst_qbarseries.cpp
+++ b/tests/auto/qbarseries/tst_qbarseries.cpp
@@ -72,6 +72,7 @@ private slots:
void setLabelsFormat();
void setLabelsPosition();
void setLabelsAngle();
+ void setLabelsPrecision();
void opacity();
void mouseclicked_data();
void mouseclicked();
@@ -430,6 +431,19 @@ void tst_QBarSeries::setLabelsAngle()
QCOMPARE(m_barseries->labelsAngle(), 55.0);
}
+void tst_QBarSeries::setLabelsPrecision()
+{
+ QSignalSpy labelsPrecisionSpy(m_barseries,
+ SIGNAL(labelsPrecisionChanged(int)));
+ QCOMPARE(m_barseries->labelsPrecision(), 6);
+
+ m_barseries->setLabelsPrecision(9);
+ TRY_COMPARE(labelsPrecisionSpy.count(), 1);
+ QList<QVariant> arguments = labelsPrecisionSpy.takeFirst();
+ QVERIFY(arguments.at(0).value<int>() == 9);
+ QCOMPARE(m_barseries->labelsPrecision(), 9);
+}
+
void tst_QBarSeries::opacity()
{
QSignalSpy opacitySpy(m_barseries, SIGNAL(opacityChanged()));
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarChart.qml
index a0d9fa92..b987d4fc 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarChart.qml
@@ -45,7 +45,7 @@ ChartView {
name: "bar"
labelsFormat: "@value";
axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
- BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6]
+ BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6.567889]
onClicked: console.log("barset.onClicked: " + index);
onHovered: console.log("barset.onHovered: " + status + " " + index);
onPenChanged: console.log("barset.onPenChanged: " + pen);
@@ -78,6 +78,7 @@ ChartView {
onCountChanged: console.log("barSeries.onCountChanged: " + count);
onLabelsFormatChanged: console.log("barSeries.onLabelsFormatChanged: " + format);
onLabelsPositionChanged: console.log("barSeries.onLabelsPositionChanged: " + series.labelsPosition);
+ onLabelsPrecisionChanged: console.log("barSeries.onLabelsPrecisionChanged: " + series.labelsPrecision);
onPressed: console.log("barSeries.onPressed: " + barset + " " + index);
onReleased: console.log("barSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("barSeries.onDoubleClicked: " + barset + " " + index);
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
index 14fd991c..8292b5c6 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
@@ -205,6 +205,16 @@ Row {
text: "labels angle -"
onClicked: series.labelsAngle = series.labelsAngle - 5;
}
+ Button {
+ text: "labels precision"
+ onClicked: {
+ if (series.labelsPrecision == 2)
+ series.labelsPrecision = 4;
+ else
+ series.labelsPrecision = 2;
+ }
+ }
+
FontEditor {
id: fontEditor
fontDescription: "label"
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalBarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalBarChart.qml
index 368ab78e..b2932a0c 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalBarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalBarChart.qml
@@ -78,6 +78,9 @@ ChartView {
+ format);
onLabelsPositionChanged: console.log("horizontalBarSeries.onLabelsPositionChanged: "
+ series.labelsPosition);
+ onLabelsPrecisionChanged: console.log(
+ "horizontalBarSeries.onLabelsPrecisionChanged: "
+ + series.labelsPrecision);
onPressed: console.log("horizontalBarSeries.onPressed: " + barset + " " + index);
onReleased: console.log("horizontalBarSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("horizontalBarSeries.onDoubleClicked: " + barset + " " + index);
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalPercentBarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalPercentBarChart.qml
index 9f230d06..6e23dba4 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalPercentBarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalPercentBarChart.qml
@@ -80,6 +80,9 @@ ChartView {
onLabelsPositionChanged: console.log(
"horizontalPercentBarSeries.onLabelsPositionChanged: "
+ series.labelsPosition);
+ onLabelsPrecisionChanged: console.log(
+ "horizontalPercentBarSeries.onLabelsPrecisionChanged: "
+ + series.labelsPrecision);
onPressed: console.log("horizontalPercentBarSeries.onPressed: " + barset + " " + index);
onReleased: console.log("horizontalPercentBarSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("horizontalPercentBarSeries.onDoubleClicked: " + barset + " " + index);
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml
index 3a728c24..00f1ff39 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/HorizontalStackedBarChart.qml
@@ -80,6 +80,9 @@ ChartView {
onLabelsPositionChanged: console.log(
"horizontalStackedBarSeries.onLabelsPositionChanged: "
+ series.labelsPosition);
+ onLabelsPrecisionChanged: console.log(
+ "horizontalPercentBarSeries.onLabelsPrecisionChanged: "
+ + series.labelsPrecision);
onPressed: console.log("horizontalStackedBarSeries.onPressed: " + barset + " " + index);
onReleased: console.log("horizontalStackedBarSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("horizontalStackedBarSeries.onDoubleClicked: " + barset + " " + index);
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml
index 2c7fb574..d9eb78dd 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml
@@ -79,6 +79,9 @@ ChartView {
+ format);
onLabelsPositionChanged: console.log("percentBarSeries.onLabelsPositionChanged: "
+ series.labelsPosition);
+ onLabelsPrecisionChanged: console.log(
+ "percentBarSeries.onLabelsPrecisionChanged: "
+ + series.labelsPrecision);
onPressed: console.log("percentBarSeries.onPressed: " + barset + " " + index);
onReleased: console.log("percentBarSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("percentBarSeries.onDoubleClicked: " + barset + " " + index);
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml
index 266d49dc..ec3595b7 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml
@@ -78,6 +78,9 @@ ChartView {
+ format);
onLabelsPositionChanged: console.log("stackedBarSeries.onLabelsPositionChanged: "
+ series.labelsPosition);
+ onLabelsPrecisionChanged: console.log(
+ "stackedBarSeries.onLabelsPrecisionChanged: "
+ + series.labelsPrecision);
onPressed: console.log("stackedBarSeries.onPressed: " + barset + " " + index);
onReleased: console.log("stackedBarSeries.onReleased: " + barset + " " + index);
onDoubleClicked: console.log("stackedBarSeries.onDoubleClicked: " + barset + " " + index);