@@ -62,6 +62,16 | |||
|
62 | 62 | */ |
|
63 | 63 | |
|
64 | 64 | /*! |
|
65 | \fn void QScatterSeries::markerShapeChanged() | |
|
66 | Emitted when marker shape is changed | |
|
67 | */ | |
|
68 | ||
|
69 | /*! | |
|
70 | \fn void QScatterSeries::markerSizeChanged() | |
|
71 | Emitted when marker size is changed | |
|
72 | */ | |
|
73 | ||
|
74 | /*! | |
|
65 | 75 | \property QScatterSeries::markerSize |
|
66 | 76 | |
|
67 | 77 | Defines the size of the marker used to draw the points in the series. |
@@ -116,7 +126,7 void QScatterSeries::setMarkerShape(MarkerShape shape) | |||
|
116 | 126 | Q_D(QScatterSeries); |
|
117 | 127 | if (d->m_shape != shape) { |
|
118 | 128 | d->m_shape = shape; |
|
119 |
emit |
|
|
129 | emit markerShapeChanged(); | |
|
120 | 130 | } |
|
121 | 131 | } |
|
122 | 132 | |
@@ -138,7 +148,7 void QScatterSeries::setMarkerSize(qreal size) | |||
|
138 | 148 | |
|
139 | 149 | if (!qFuzzyIsNull(d->m_size - size)) { |
|
140 | 150 | d->m_size = size; |
|
141 |
emit |
|
|
151 | emit markerSizeChanged(); | |
|
142 | 152 | } |
|
143 | 153 | } |
|
144 | 154 |
@@ -31,8 +31,8 class QScatterSeriesPrivate; | |||
|
31 | 31 | class QTCOMMERCIALCHART_EXPORT QScatterSeries : public QXYSeries |
|
32 | 32 | { |
|
33 | 33 | Q_OBJECT |
|
34 | Q_PROPERTY(MarkerShape markerShape READ markerShape WRITE setMarkerShape) | |
|
35 | Q_PROPERTY(qreal markerSize READ markerSize WRITE setMarkerSize) | |
|
34 | Q_PROPERTY(MarkerShape markerShape READ markerShape WRITE setMarkerShape NOTIFY markerShapeChanged) | |
|
35 | Q_PROPERTY(qreal markerSize READ markerSize WRITE setMarkerSize NOTIFY markerSizeChanged) | |
|
36 | 36 | Q_ENUMS(MarkerShape) |
|
37 | 37 | |
|
38 | 38 | public: |
@@ -50,6 +50,10 public: | |||
|
50 | 50 | qreal markerSize() const; |
|
51 | 51 | void setMarkerSize(qreal size); |
|
52 | 52 | |
|
53 | Q_SIGNALS: | |
|
54 | void markerShapeChanged(); | |
|
55 | void markerSizeChanged(); | |
|
56 | ||
|
53 | 57 | private: |
|
54 | 58 | Q_DECLARE_PRIVATE(QScatterSeries) |
|
55 | 59 | Q_DISABLE_COPY(QScatterSeries) |
@@ -39,7 +39,9 ScatterChartItem::ScatterChartItem(QScatterSeries *series, ChartPresenter *prese | |||
|
39 | 39 | m_size(15) |
|
40 | 40 | { |
|
41 | 41 | QObject::connect(m_series->d_func(),SIGNAL(updated()), this, SLOT(handleUpdated())); |
|
42 |
QObject::connect(series, SIGNAL( |
|
|
42 | QObject::connect(m_series, SIGNAL(markerShapeChanged()), this, SLOT(handleUpdated())); | |
|
43 | QObject::connect(m_series, SIGNAL(markerSizeChanged()), this, SLOT(handleUpdated())); | |
|
44 | QObject::connect(m_series, SIGNAL(visibleChanged()), this, SLOT(handleUpdated())); | |
|
43 | 45 | |
|
44 | 46 | setZValue(ChartPresenter::ScatterSeriesZValue); |
|
45 | 47 | setFlags(QGraphicsItem::ItemClipsChildrenToShape); |
General Comments 0
You need to be logged in to leave comments.
Login now