@@ -16,7 +16,6 public: | |||||
16 |
|
16 | |||
17 | Q_SIGNALS: |
|
17 | Q_SIGNALS: | |
18 | void clicked(QString category); |
|
18 | void clicked(QString category); | |
19 | void selected(); |
|
|||
20 | void restructuredBars(); |
|
19 | void restructuredBars(); | |
21 | void updatedBars(); |
|
20 | void updatedBars(); | |
22 | void labelsVisibleChanged(bool visible); |
|
21 | void labelsVisibleChanged(bool visible); |
@@ -32,6 +32,7 | |||||
32 | #include <QPainter> |
|
32 | #include <QPainter> | |
33 | #include <QGraphicsSceneEvent> |
|
33 | #include <QGraphicsSceneEvent> | |
34 | #include <QGraphicsSimpleTextItem> |
|
34 | #include <QGraphicsSimpleTextItem> | |
|
35 | #include <QDebug> | |||
35 |
|
36 | |||
36 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
37 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
37 |
|
38 | |||
@@ -114,7 +115,7 void LegendMarker::updateLayout() | |||||
114 | void LegendMarker::mousePressEvent(QGraphicsSceneMouseEvent *event) |
|
115 | void LegendMarker::mousePressEvent(QGraphicsSceneMouseEvent *event) | |
115 | { |
|
116 | { | |
116 | QGraphicsObject::mousePressEvent(event); |
|
117 | QGraphicsObject::mousePressEvent(event); | |
117 | emit selected(); |
|
118 | qDebug()<<"Not implemented"; //TODO: selected signal removed for now | |
118 | } |
|
119 | } | |
119 |
|
120 | |||
120 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
|
121 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
@@ -122,7 +123,7 void LegendMarker::mousePressEvent(QGraphicsSceneMouseEvent *event) | |||||
122 | AreaLegendMarker::AreaLegendMarker(QAreaSeries *series,QLegend *legend) : LegendMarker(series,legend), |
|
123 | AreaLegendMarker::AreaLegendMarker(QAreaSeries *series,QLegend *legend) : LegendMarker(series,legend), | |
123 | m_series(series) |
|
124 | m_series(series) | |
124 | { |
|
125 | { | |
125 | QObject::connect(this, SIGNAL(selected()), series, SIGNAL(selected())); |
|
126 | //QObject::connect(this, SIGNAL(selected()), series, SIGNAL(selected())); | |
126 | QObject::connect(series->d_func(),SIGNAL(updated()), this, SLOT(updated())); |
|
127 | QObject::connect(series->d_func(),SIGNAL(updated()), this, SLOT(updated())); | |
127 | updated(); |
|
128 | updated(); | |
128 | } |
|
129 | } | |
@@ -138,7 +139,7 void AreaLegendMarker::updated() | |||||
138 | BarLegendMarker::BarLegendMarker(QBarSeries *barseries,QBarSet *barset, QLegend *legend) : LegendMarker(barseries,legend), |
|
139 | BarLegendMarker::BarLegendMarker(QBarSeries *barseries,QBarSet *barset, QLegend *legend) : LegendMarker(barseries,legend), | |
139 | m_barset(barset) |
|
140 | m_barset(barset) | |
140 | { |
|
141 | { | |
141 | QObject::connect(this, SIGNAL(selected()),barset->d_ptr.data(), SIGNAL(selected())); |
|
142 | //QObject::connect(this, SIGNAL(selected()),barset->d_ptr.data(), SIGNAL(selected())); | |
142 | QObject::connect(barset->d_ptr.data(), SIGNAL(updatedBars()), this, SLOT(updated())); |
|
143 | QObject::connect(barset->d_ptr.data(), SIGNAL(updatedBars()), this, SLOT(updated())); | |
143 | updated(); |
|
144 | updated(); | |
144 | } |
|
145 | } | |
@@ -154,7 +155,7 void BarLegendMarker::updated() | |||||
154 | PieLegendMarker::PieLegendMarker(QPieSeries* series,QPieSlice *pieslice, QLegend *legend) : LegendMarker(series,legend), |
|
155 | PieLegendMarker::PieLegendMarker(QPieSeries* series,QPieSlice *pieslice, QLegend *legend) : LegendMarker(series,legend), | |
155 | m_pieslice(pieslice) |
|
156 | m_pieslice(pieslice) | |
156 | { |
|
157 | { | |
157 | QObject::connect(this, SIGNAL(selected()),pieslice, SIGNAL(clicked())); |
|
158 | //QObject::connect(this, SIGNAL(selected()),pieslice, SIGNAL(clicked())); | |
158 | QObject::connect(pieslice, SIGNAL(changed()), this, SLOT(updated())); |
|
159 | QObject::connect(pieslice, SIGNAL(changed()), this, SLOT(updated())); | |
159 | updated(); |
|
160 | updated(); | |
160 | } |
|
161 | } | |
@@ -170,7 +171,7 void PieLegendMarker::updated() | |||||
170 | XYLegendMarker::XYLegendMarker(QXYSeries *series, QLegend *legend) : LegendMarker(series,legend), |
|
171 | XYLegendMarker::XYLegendMarker(QXYSeries *series, QLegend *legend) : LegendMarker(series,legend), | |
171 | m_series(series) |
|
172 | m_series(series) | |
172 | { |
|
173 | { | |
173 | QObject::connect(this, SIGNAL(selected()), series, SIGNAL(selected())); |
|
174 | //QObject::connect(this, SIGNAL(selected()), series, SIGNAL(selected())); | |
174 | QObject::connect(series->d_func(),SIGNAL(updated()), this, SLOT(updated())); |
|
175 | QObject::connect(series->d_func(),SIGNAL(updated()), this, SLOT(updated())); | |
175 | updated(); |
|
176 | updated(); | |
176 | } |
|
177 | } |
@@ -67,9 +67,6 protected: | |||||
67 | // From QGraphicsObject |
|
67 | // From QGraphicsObject | |
68 | void mousePressEvent(QGraphicsSceneMouseEvent *event); |
|
68 | void mousePressEvent(QGraphicsSceneMouseEvent *event); | |
69 |
|
69 | |||
70 | Q_SIGNALS: |
|
|||
71 | void selected(); |
|
|||
72 |
|
||||
73 | public Q_SLOTS: |
|
70 | public Q_SLOTS: | |
74 | virtual void updated() = 0; |
|
71 | virtual void updated() = 0; | |
75 |
|
72 |
@@ -48,12 +48,6 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
48 | \brief Signal is emitted when user clicks the \a point on chart. |
|
48 | \brief Signal is emitted when user clicks the \a point on chart. | |
49 | */ |
|
49 | */ | |
50 |
|
50 | |||
51 | /*! |
|
|||
52 | \fn void QXYSeries::selected() |
|
|||
53 |
|
||||
54 | The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be |
|
|||
55 | implemented by the user of QXYSeries API. |
|
|||
56 | */ |
|
|||
57 |
|
51 | |||
58 | /*! |
|
52 | /*! | |
59 | \fn void QXYSeriesPrivate::pointReplaced(int index) |
|
53 | \fn void QXYSeriesPrivate::pointReplaced(int index) |
@@ -68,12 +68,8 public: | |||||
68 | virtual void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); |
|
68 | virtual void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); | |
69 | void setModelMappingRange(int first, int count = -1); |
|
69 | void setModelMappingRange(int first, int count = -1); | |
70 |
|
70 | |||
71 | //private Q_SLOTS: |
|
|||
72 | // void modelUpdated(QModelIndex topLeft, QModelIndex bottomRight); |
|
|||
73 |
|
||||
74 | Q_SIGNALS: |
|
71 | Q_SIGNALS: | |
75 | void clicked(const QPointF &point); |
|
72 | void clicked(const QPointF &point); | |
76 | void selected(); |
|
|||
77 |
|
73 | |||
78 | private: |
|
74 | private: | |
79 | Q_DECLARE_PRIVATE(QXYSeries); |
|
75 | Q_DECLARE_PRIVATE(QXYSeries); |
General Comments 0
You need to be logged in to leave comments.
Login now