summaryrefslogtreecommitdiffstats
path: root/src/charts/qchart.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-10-21 10:25:57 +0300
committerMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-10-21 10:58:17 +0300
commitbf30bed1cefb384a38e97492d4a4c5e4f4a2b86e (patch)
tree0dced9bf29a2dff74dd1f53e5afbd11df6ea1a9c /src/charts/qchart.cpp
parent38dcfecdb5955680ae46fd9a8c9c4b1fa3fd084d (diff)
Added plotAreaChanged signal to chart.
The plotArea property was also introduced, though it was previously available via getter function. The signal with same name on QML side was linked to the new signal. Task-number: QTRD-3330 Change-Id: I8d985762194800e1b8743d0a7429ef4d0356bd98 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
Diffstat (limited to 'src/charts/qchart.cpp')
-rw-r--r--src/charts/qchart.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/charts/qchart.cpp b/src/charts/qchart.cpp
index 69584a82..a7f58941 100644
--- a/src/charts/qchart.cpp
+++ b/src/charts/qchart.cpp
@@ -169,6 +169,12 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
+ \property QChart::plotArea
+ Holds the rectangle within which the drawing of the chart is done.
+ It 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.
@@ -526,10 +532,6 @@ QChart::ChartType QChart::chartType() const
return d_ptr->m_type;
}
-/*!
- Returns the the rectangle within which the drawing of the chart is done.
- It does not include the area defined by margins.
- */
QRectF QChart::plotArea() const
{
return d_ptr->m_presenter->geometry();
@@ -762,6 +764,7 @@ QChartPrivate::QChartPrivate(QChart *q, QChart::ChartType type):
QObject::connect(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*)), m_themeManager, SLOT(handleSeriesRemoved(QAbstractSeries*)));
QObject::connect(m_dataset, SIGNAL(axisAdded(QAbstractAxis*)), m_themeManager, SLOT(handleAxisAdded(QAbstractAxis*)));
QObject::connect(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*)), m_themeManager, SLOT(handleAxisRemoved(QAbstractAxis*)));
+ QObject::connect(m_presenter, &ChartPresenter::plotAreaChanged, q, &QChart::plotAreaChanged);
}
QChartPrivate::~QChartPrivate()