##// END OF EJS Templates
Normalizes signal slots connections
Michal Klocek -
r967:8223ac2745a8
parent child
Show More
1 NO CONTENT: modified file
1 NO CONTENT: modified file
@@ -80,7 +80,7 m_index(-1),m_chart(chart)
80 80
81 81 //![4]
82 82 foreach (QSeries* series, m_series) {
83 QObject::connect(series,SIGNAL(clicked(const QPointF&)),this,SLOT(handlePointClicked(const QPointF&)));
83 QObject::connect(series,SIGNAL(clicked(QPointF)),this,SLOT(handlePointClicked(QPointF)));
84 84 }
85 85 //![4]
86 86 m_timer.start();
@@ -40,7 +40,7 MainWindow::MainWindow(QWidget *parent)
40 40 chart->axisX()->setRange(0, 4.5);
41 41 chart->axisY()->setRange(0, 4.5);
42 42
43 connect(m_scatter, SIGNAL(clicked(const QPointF&)), this, SLOT(handleClickedPoint(const QPointF&)));
43 connect(m_scatter, SIGNAL(clicked(QPointF)), this, SLOT(handleClickedPoint(QPointF)));
44 44
45 45 QChartView *chartView = new QChartView(chart);
46 46 chartView->setRenderHint(QPainter::Antialiasing);
@@ -44,7 +44,7 AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, ChartPresenter *presenter)
44 44 m_lower = new AreaBoundItem(this,m_series->lowerSeries());
45 45
46 46 connect(m_series->d_func(),SIGNAL(updated()),this,SLOT(handleUpdated()));
47 connect(this,SIGNAL(clicked(const QPointF&)),areaSeries,SIGNAL(clicked(const QPointF&)));
47 connect(this,SIGNAL(clicked(QPointF)),areaSeries,SIGNAL(clicked(QPointF)));
48 48
49 49 handleUpdated();
50 50 }
@@ -109,8 +109,8 private:
109 109
110 110 class AxisItem: public QGraphicsLineItem
111 111 {
112 public:
113 112
113 public:
114 114 AxisItem(Axis *axis, QGraphicsItem *parent = 0) : QGraphicsLineItem(parent), m_axis(axis) {}
115 115
116 116 protected:
1 NO CONTENT: modified file
@@ -68,6 +68,6 private:
68 68
69 69 ChartConfig* ChartConfig::m_instance=0;
70 70
71 #endif
72
73 71 QTCOMMERCIALCHART_END_NAMESPACE
72
73 #endif
@@ -132,7 +132,7 void ChartPresenter::handleAxisAdded(QChartAxis* axis,Domain* domain)
132 132 item->handleRangeChanged(domain->minY(),domain->maxY(),domain->tickYCount());
133 133 }
134 134
135 QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),item,SLOT(handleGeometryChanged(const QRectF&)));
135 QObject::connect(this,SIGNAL(geometryChanged(QRectF)),item,SLOT(handleGeometryChanged(QRectF)));
136 136 //initialize
137 137 item->handleGeometryChanged(m_chartRect);
138 138 m_axisItems.insert(axis, item);
@@ -151,7 +151,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain)
151 151 {
152 152 Chart *item = series->d_ptr->createGraphics(this);
153 153 Q_ASSERT(item);
154 QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),item,SLOT(handleGeometryChanged(const QRectF&)));
154 QObject::connect(this,SIGNAL(geometryChanged(QRectF)),item,SLOT(handleGeometryChanged(QRectF)));
155 155 QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),item,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal)));
156 156 //initialize
157 157 item->handleDomainChanged(domain->minX(),domain->maxX(),domain->minY(),domain->maxY());
1 NO CONTENT: modified file
1 NO CONTENT: modified file
@@ -41,7 +41,7 XYChartItem::XYChartItem(QXYSeries *series, ChartPresenter *presenter):ChartItem
41 41 connect(series->d_func(),SIGNAL(pointReplaced(int)),this,SLOT(handlePointReplaced(int)));
42 42 connect(series->d_func(),SIGNAL(pointAdded(int)),this,SLOT(handlePointAdded(int)));
43 43 connect(series->d_func(),SIGNAL(pointRemoved(int)),this,SLOT(handlePointRemoved(int)));
44 connect(this,SIGNAL(clicked(const QPointF&)),series,SIGNAL(clicked(const QPointF&)));
44 connect(this,SIGNAL(clicked(QPointF)),series,SIGNAL(clicked(QPointF)));
45 45 }
46 46
47 47 QPointF XYChartItem::calculateGeometryPoint(const QPointF &point) const
1 NO CONTENT: modified file
1 NO CONTENT: modified file
1 NO CONTENT: modified file
General Comments 0
You need to be logged in to leave comments. Login now