##// END OF EJS Templates
legend signal fix for barchart
sauimone -
r953:4f43e4b42147
parent child
Show More
@@ -72,7 +72,7 private:
72 QScopedPointer<QBarSetPrivate> d_ptr;
72 QScopedPointer<QBarSetPrivate> d_ptr;
73 Q_DISABLE_COPY(QBarSet)
73 Q_DISABLE_COPY(QBarSet)
74 friend class QBarSeries;
74 friend class QBarSeries;
75
75 friend class BarLegendMarker;
76 };
76 };
77
77
78 QTCOMMERCIALCHART_END_NAMESPACE
78 QTCOMMERCIALCHART_END_NAMESPACE
@@ -26,6 +26,7
26 #include "qpieseries.h"
26 #include "qpieseries.h"
27 #include "qpieslice.h"
27 #include "qpieslice.h"
28 #include "qbarset.h"
28 #include "qbarset.h"
29 #include "qbarset_p.h"
29 #include "qareaseries.h"
30 #include "qareaseries.h"
30 #include "qareaseries_p.h"
31 #include "qareaseries_p.h"
31 #include <QPainter>
32 #include <QPainter>
@@ -134,11 +135,11 void AreaLegendMarker::updated()
134
135
135 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
136 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
136
137
137 BarLegendMarker::BarLegendMarker(QBarSeries *series,QBarSet *barset, QLegend *legend) : LegendMarker(series,legend),
138 BarLegendMarker::BarLegendMarker(QBarSeries *barseries,QBarSet *barset, QLegend *legend) : LegendMarker(barseries,legend),
138 m_barset(barset)
139 m_barset(barset)
139 {
140 {
140 QObject::connect(this, SIGNAL(selected()),series, SIGNAL(selected()));
141 QObject::connect(this, SIGNAL(selected()),barseries, SIGNAL(selected()));
141 QObject::connect(barset, SIGNAL(valueChanged()), this, SLOT(updated()));
142 QObject::connect(barset->d_ptr.data(), SIGNAL(valueChanged()), this, SLOT(updated()));
142 updated();
143 updated();
143 }
144 }
144
145
@@ -107,7 +107,7 private:
107 class BarLegendMarker : public LegendMarker
107 class BarLegendMarker : public LegendMarker
108 {
108 {
109 public:
109 public:
110 BarLegendMarker(QBarSeries *barseires, QBarSet *barset,QLegend *legend);
110 BarLegendMarker(QBarSeries *barseries, QBarSet *barset,QLegend *legend);
111 protected:
111 protected:
112 void updated();
112 void updated();
113 private:
113 private:
General Comments 0
You need to be logged in to leave comments. Login now