##// END OF EJS Templates
Normalize signal and slot signatures
Jani Honkonen -
r1937:c4bb26622244
parent child
Show More
@@ -28,8 +28,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28 DeclarativeBarSet::DeclarativeBarSet(QObject *parent) :
28 DeclarativeBarSet::DeclarativeBarSet(QObject *parent) :
29 QBarSet("", parent)
29 QBarSet("", parent)
30 {
30 {
31 connect(this, SIGNAL(valuesAdded(int,int)), this, SLOT(handleCountChanged(int, int)));
31 connect(this, SIGNAL(valuesAdded(int,int)), this, SLOT(handleCountChanged(int,int)));
32 connect(this, SIGNAL(valuesRemoved(int,int)), this, SLOT(handleCountChanged(int, int)));
32 connect(this, SIGNAL(valuesRemoved(int,int)), this, SLOT(handleCountChanged(int,int)));
33 }
33 }
34
34
35 void DeclarativeBarSet::handleCountChanged(int index, int count)
35 void DeclarativeBarSet::handleCountChanged(int index, int count)
@@ -237,10 +237,10 DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent)
237 {
237 {
238 setFlag(QGraphicsItem::ItemHasNoContents, false);
238 setFlag(QGraphicsItem::ItemHasNoContents, false);
239 m_minMargins = new DeclarativeMargins(this);
239 m_minMargins = new DeclarativeMargins(this);
240 connect(m_minMargins, SIGNAL(topChanged(int, int, int, int)), this, SLOT(changeMinimumMargins(int, int, int, int)));
240 connect(m_minMargins, SIGNAL(topChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int)));
241 connect(m_minMargins, SIGNAL(bottomChanged(int, int, int, int)), this, SLOT(changeMinimumMargins(int, int, int, int)));
241 connect(m_minMargins, SIGNAL(bottomChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int)));
242 connect(m_minMargins, SIGNAL(leftChanged(int, int, int, int)), this, SLOT(changeMinimumMargins(int, int, int, int)));
242 connect(m_minMargins, SIGNAL(leftChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int)));
243 connect(m_minMargins, SIGNAL(rightChanged(int, int, int, int)), this, SLOT(changeMinimumMargins(int, int, int, int)));
243 connect(m_minMargins, SIGNAL(rightChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int)));
244 // TODO: connect to plotAreaChanged signal from m_chart
244 // TODO: connect to plotAreaChanged signal from m_chart
245 }
245 }
246
246
@@ -275,62 +275,62 void DeclarativeChart::componentComplete()
275 // Set optional user defined axes and connect axis related signals
275 // Set optional user defined axes and connect axis related signals
276 if (qobject_cast<DeclarativeLineSeries *>(child)) {
276 if (qobject_cast<DeclarativeLineSeries *>(child)) {
277 DeclarativeLineSeries *s = qobject_cast<DeclarativeLineSeries *>(child);
277 DeclarativeLineSeries *s = qobject_cast<DeclarativeLineSeries *>(child);
278 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
278 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
279 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
279 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
280 setAxisX(s->axisX(), s);
280 setAxisX(s->axisX(), s);
281 setAxisY(s->axisY(), s);
281 setAxisY(s->axisY(), s);
282 } else if (qobject_cast<DeclarativeSplineSeries *>(child)) {
282 } else if (qobject_cast<DeclarativeSplineSeries *>(child)) {
283 DeclarativeSplineSeries *s = qobject_cast<DeclarativeSplineSeries *>(child);
283 DeclarativeSplineSeries *s = qobject_cast<DeclarativeSplineSeries *>(child);
284 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
284 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
285 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
285 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
286 setAxisX(s->axisX(), s);
286 setAxisX(s->axisX(), s);
287 setAxisY(s->axisY(), s);
287 setAxisY(s->axisY(), s);
288 } else if (qobject_cast<DeclarativeScatterSeries *>(child)) {
288 } else if (qobject_cast<DeclarativeScatterSeries *>(child)) {
289 DeclarativeScatterSeries *s = qobject_cast<DeclarativeScatterSeries *>(child);
289 DeclarativeScatterSeries *s = qobject_cast<DeclarativeScatterSeries *>(child);
290 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
290 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
291 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
291 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
292 setAxisX(s->axisX(), s);
292 setAxisX(s->axisX(), s);
293 setAxisY(s->axisY(), s);
293 setAxisY(s->axisY(), s);
294 } else if (qobject_cast<DeclarativeAreaSeries *>(child)) {
294 } else if (qobject_cast<DeclarativeAreaSeries *>(child)) {
295 DeclarativeAreaSeries *s = qobject_cast<DeclarativeAreaSeries *>(child);
295 DeclarativeAreaSeries *s = qobject_cast<DeclarativeAreaSeries *>(child);
296 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
296 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
297 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
297 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
298 setAxisX(s->axisX(), s);
298 setAxisX(s->axisX(), s);
299 setAxisY(s->axisY(), s);
299 setAxisY(s->axisY(), s);
300 } else if (qobject_cast<DeclarativeBarSeries *>(child)) {
300 } else if (qobject_cast<DeclarativeBarSeries *>(child)) {
301 DeclarativeBarSeries *s = qobject_cast<DeclarativeBarSeries *>(child);
301 DeclarativeBarSeries *s = qobject_cast<DeclarativeBarSeries *>(child);
302 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
302 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
303 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
303 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
304 setAxisX(s->axisX(), s);
304 setAxisX(s->axisX(), s);
305 setAxisY(s->axisY(), s);
305 setAxisY(s->axisY(), s);
306 } else if (qobject_cast<DeclarativeStackedBarSeries *>(child)) {
306 } else if (qobject_cast<DeclarativeStackedBarSeries *>(child)) {
307 DeclarativeStackedBarSeries *s = qobject_cast<DeclarativeStackedBarSeries *>(child);
307 DeclarativeStackedBarSeries *s = qobject_cast<DeclarativeStackedBarSeries *>(child);
308 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
308 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
309 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
309 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
310 setAxisX(s->axisX(), s);
310 setAxisX(s->axisX(), s);
311 setAxisY(s->axisY(), s);
311 setAxisY(s->axisY(), s);
312 } else if (qobject_cast<DeclarativePercentBarSeries *>(child)) {
312 } else if (qobject_cast<DeclarativePercentBarSeries *>(child)) {
313 DeclarativePercentBarSeries *s = qobject_cast<DeclarativePercentBarSeries *>(child);
313 DeclarativePercentBarSeries *s = qobject_cast<DeclarativePercentBarSeries *>(child);
314 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
314 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
315 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
315 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
316 setAxisX(s->axisX(), s);
316 setAxisX(s->axisX(), s);
317 setAxisY(s->axisY(), s);
317 setAxisY(s->axisY(), s);
318 } else if (qobject_cast<DeclarativeHorizontalBarSeries *>(child)) {
318 } else if (qobject_cast<DeclarativeHorizontalBarSeries *>(child)) {
319 DeclarativeHorizontalBarSeries *s = qobject_cast<DeclarativeHorizontalBarSeries *>(child);
319 DeclarativeHorizontalBarSeries *s = qobject_cast<DeclarativeHorizontalBarSeries *>(child);
320 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
320 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
321 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
321 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
322 setAxisX(s->axisX(), s);
322 setAxisX(s->axisX(), s);
323 setAxisY(s->axisY(), s);
323 setAxisY(s->axisY(), s);
324 } else if (qobject_cast<DeclarativeHorizontalStackedBarSeries *>(child)) {
324 } else if (qobject_cast<DeclarativeHorizontalStackedBarSeries *>(child)) {
325 DeclarativeHorizontalStackedBarSeries *s = qobject_cast<DeclarativeHorizontalStackedBarSeries *>(child);
325 DeclarativeHorizontalStackedBarSeries *s = qobject_cast<DeclarativeHorizontalStackedBarSeries *>(child);
326 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
326 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
327 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
327 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
328 setAxisX(s->axisX(), s);
328 setAxisX(s->axisX(), s);
329 setAxisY(s->axisY(), s);
329 setAxisY(s->axisY(), s);
330 } else if (qobject_cast<DeclarativeHorizontalPercentBarSeries *>(child)) {
330 } else if (qobject_cast<DeclarativeHorizontalPercentBarSeries *>(child)) {
331 DeclarativeHorizontalPercentBarSeries *s = qobject_cast<DeclarativeHorizontalPercentBarSeries *>(child);
331 DeclarativeHorizontalPercentBarSeries *s = qobject_cast<DeclarativeHorizontalPercentBarSeries *>(child);
332 connect(s, SIGNAL(axisXChanged(QAbstractAxis *)), this, SLOT(handleAxisXSet(QAbstractAxis *)));
332 connect(s, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*)));
333 connect(s, SIGNAL(axisYChanged(QAbstractAxis *)), this, SLOT(handleAxisYSet(QAbstractAxis *)));
333 connect(s, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*)));
334 setAxisX(s->axisX(), s);
334 setAxisX(s->axisX(), s);
335 setAxisY(s->axisY(), s);
335 setAxisY(s->axisY(), s);
336 }
336 }
General Comments 0
You need to be logged in to leave comments. Login now