diff --git a/src/scatterchart/qscatterseries.cpp b/src/scatterchart/qscatterseries.cpp index f127468..aa1ddd0 100644 --- a/src/scatterchart/qscatterseries.cpp +++ b/src/scatterchart/qscatterseries.cpp @@ -62,6 +62,16 @@ */ /*! + \fn void QScatterSeries::markerShapeChanged() + Emitted when marker shape is changed +*/ + +/*! + \fn void QScatterSeries::markerSizeChanged() + Emitted when marker size is changed +*/ + +/*! \property QScatterSeries::markerSize Defines the size of the marker used to draw the points in the series. @@ -116,7 +126,7 @@ void QScatterSeries::setMarkerShape(MarkerShape shape) Q_D(QScatterSeries); if (d->m_shape != shape) { d->m_shape = shape; - emit d->updated(); + emit markerShapeChanged(); } } @@ -138,7 +148,7 @@ void QScatterSeries::setMarkerSize(qreal size) if (!qFuzzyIsNull(d->m_size - size)) { d->m_size = size; - emit d->updated(); + emit markerSizeChanged(); } } diff --git a/src/scatterchart/qscatterseries.h b/src/scatterchart/qscatterseries.h index 4f319c1..ef45948 100644 --- a/src/scatterchart/qscatterseries.h +++ b/src/scatterchart/qscatterseries.h @@ -31,8 +31,8 @@ class QScatterSeriesPrivate; class QTCOMMERCIALCHART_EXPORT QScatterSeries : public QXYSeries { Q_OBJECT - Q_PROPERTY(MarkerShape markerShape READ markerShape WRITE setMarkerShape) - Q_PROPERTY(qreal markerSize READ markerSize WRITE setMarkerSize) + Q_PROPERTY(MarkerShape markerShape READ markerShape WRITE setMarkerShape NOTIFY markerShapeChanged) + Q_PROPERTY(qreal markerSize READ markerSize WRITE setMarkerSize NOTIFY markerSizeChanged) Q_ENUMS(MarkerShape) public: @@ -50,6 +50,10 @@ public: qreal markerSize() const; void setMarkerSize(qreal size); +Q_SIGNALS: + void markerShapeChanged(); + void markerSizeChanged(); + private: Q_DECLARE_PRIVATE(QScatterSeries) Q_DISABLE_COPY(QScatterSeries) diff --git a/src/scatterchart/scatterchartitem.cpp b/src/scatterchart/scatterchartitem.cpp index 40e2d80..e23ea7d 100644 --- a/src/scatterchart/scatterchartitem.cpp +++ b/src/scatterchart/scatterchartitem.cpp @@ -39,7 +39,9 @@ ScatterChartItem::ScatterChartItem(QScatterSeries *series, ChartPresenter *prese m_size(15) { QObject::connect(m_series->d_func(),SIGNAL(updated()), this, SLOT(handleUpdated())); - QObject::connect(series, SIGNAL(visibleChanged()), this, SLOT(handleUpdated())); + QObject::connect(m_series, SIGNAL(markerShapeChanged()), this, SLOT(handleUpdated())); + QObject::connect(m_series, SIGNAL(markerSizeChanged()), this, SLOT(handleUpdated())); + QObject::connect(m_series, SIGNAL(visibleChanged()), this, SLOT(handleUpdated())); setZValue(ChartPresenter::ScatterSeriesZValue); setFlags(QGraphicsItem::ItemClipsChildrenToShape);