@@ -95,8 +95,9 void AreaChartItem::handleGeometryChanged(const QRectF& rect) | |||||
95 |
|
95 | |||
96 | void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
96 | void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
97 | { |
|
97 | { | |
98 |
Q_UNUSED(widget) |
|
98 | Q_UNUSED(widget) | |
99 |
Q_UNUSED(option) |
|
99 | Q_UNUSED(option) | |
|
100 | ||||
100 | painter->save(); |
|
101 | painter->save(); | |
101 | painter->setPen(m_linePen); |
|
102 | painter->setPen(m_linePen); | |
102 | painter->setBrush(m_brush); |
|
103 | painter->setBrush(m_brush); |
@@ -395,9 +395,9 void AxisItem::handleGeometryChanged(const QRectF& rect) | |||||
395 |
|
395 | |||
396 | void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
396 | void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
397 | { |
|
397 | { | |
398 |
Q_UNUSED(painter) |
|
398 | Q_UNUSED(painter) | |
399 |
Q_UNUSED(option) |
|
399 | Q_UNUSED(option) | |
400 |
Q_UNUSED(widget) |
|
400 | Q_UNUSED(widget) | |
401 | } |
|
401 | } | |
402 |
|
402 | |||
403 | //TODO "nice numbers algorithm" |
|
403 | //TODO "nice numbers algorithm" |
@@ -48,6 +48,9 void Bar::setBrush(QBrush brush) | |||||
48 |
|
48 | |||
49 | void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
49 | void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
50 | { |
|
50 | { | |
|
51 | Q_UNUSED(option) | |||
|
52 | Q_UNUSED(widget) | |||
|
53 | ||||
51 | if (0 == mHeight) { |
|
54 | if (0 == mHeight) { | |
52 | return; |
|
55 | return; | |
53 | } |
|
56 | } |
@@ -129,13 +129,18 void BarPresenterBase::initAxisLabels() | |||||
129 |
|
129 | |||
130 | void BarPresenterBase::handleModelChanged(int index) |
|
130 | void BarPresenterBase::handleModelChanged(int index) | |
131 | { |
|
131 | { | |
132 | // qDebug() << "BarPresenterBase::handleModelChanged" << index; |
|
132 | Q_UNUSED(index) | |
133 | dataChanged(); |
|
133 | dataChanged(); | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 |
void BarPresenterBase::handleDomainChanged( |
|
136 | void BarPresenterBase::handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY) | |
137 | { |
|
137 | { | |
138 | qDebug() << "BarPresenterBase::handleDomainChanged"; |
|
138 | // TODO: | |
|
139 | Q_UNUSED(minX) | |||
|
140 | Q_UNUSED(maxX) | |||
|
141 | Q_UNUSED(minY) | |||
|
142 | Q_UNUSED(maxY) | |||
|
143 | ||||
139 | /* |
|
144 | /* | |
140 | int count = mSeries->categoryCount(); |
|
145 | int count = mSeries->categoryCount(); | |
141 | if (0 == count) { |
|
146 | if (0 == count) { |
@@ -38,7 +38,7 protected: | |||||
38 |
|
38 | |||
39 | public slots: |
|
39 | public slots: | |
40 | void handleModelChanged(int index); |
|
40 | void handleModelChanged(int index); | |
41 |
void handleDomainChanged( |
|
41 | void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY); | |
42 | void handleGeometryChanged(const QRectF& size); |
|
42 | void handleGeometryChanged(const QRectF& size); | |
43 |
|
43 | |||
44 | // Internal slots |
|
44 | // Internal slots |
@@ -49,6 +49,9 void BarValue::setPos(qreal x, qreal y) | |||||
49 |
|
49 | |||
50 | void BarValue::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
50 | void BarValue::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
51 | { |
|
51 | { | |
|
52 | Q_UNUSED(option) | |||
|
53 | Q_UNUSED(widget) | |||
|
54 | ||||
52 | if (isVisible()) { |
|
55 | if (isVisible()) { | |
53 | painter->setPen(mPen); |
|
56 | painter->setPen(mPen); | |
54 | painter->drawText(boundingRect(),mValueString); |
|
57 | painter->drawText(boundingRect(),mValueString); |
@@ -227,14 +227,14 bool QBarSeries::setModel(QAbstractItemModel* model) | |||||
227 | return true; |
|
227 | return true; | |
228 | } |
|
228 | } | |
229 |
|
229 | |||
230 | void QBarSeries::setModelMappingCategories(int modelColumn) |
|
230 | // TODO | |
|
231 | void QBarSeries::setModelMappingCategories(int /*modelColumn*/) | |||
231 | { |
|
232 | { | |
232 | // |
|
|||
233 | } |
|
233 | } | |
234 |
|
234 | |||
235 | void QBarSeries::setModelMappingBarRange(int bottomBoundry, int topBoundry) |
|
235 | // TODO | |
|
236 | void QBarSeries::setModelMappingBarRange(int /*bottomBoundry*/, int /*topBoundry*/) | |||
236 | { |
|
237 | { | |
237 | // |
|
|||
238 | } |
|
238 | } | |
239 |
|
239 | |||
240 | #include "moc_qbarseries.cpp" |
|
240 | #include "moc_qbarseries.cpp" |
@@ -28,6 +28,9 void Separator::setSize(const QSizeF &size) | |||||
28 |
|
28 | |||
29 | void Separator::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
29 | void Separator::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
30 | { |
|
30 | { | |
|
31 | Q_UNUSED(option) | |||
|
32 | Q_UNUSED(widget) | |||
|
33 | ||||
31 | if (isVisible()) { |
|
34 | if (isVisible()) { | |
32 | QPen pen(mColor); |
|
35 | QPen pen(mColor); | |
33 | painter->setPen(pen); |
|
36 | painter->setPen(pen); |
@@ -174,7 +174,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||||
174 | if(m_options.testFlag(QChart::SeriesAnimations)) { |
|
174 | if(m_options.testFlag(QChart::SeriesAnimations)) { | |
175 | // m_animator->addAnimation(bar); |
|
175 | // m_animator->addAnimation(bar); | |
176 | } |
|
176 | } | |
177 |
m_chartTheme->decorate( |
|
177 | m_chartTheme->decorate(barSeries, m_dataset->seriesIndex(barSeries)); | |
178 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); |
|
178 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); | |
179 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); |
|
179 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); | |
180 | item=bar; |
|
180 | item=bar; | |
@@ -187,7 +187,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||||
187 | if(m_options.testFlag(QChart::SeriesAnimations)) { |
|
187 | if(m_options.testFlag(QChart::SeriesAnimations)) { | |
188 | // m_animator->addAnimation(bar); |
|
188 | // m_animator->addAnimation(bar); | |
189 | } |
|
189 | } | |
190 |
m_chartTheme->decorate( |
|
190 | m_chartTheme->decorate(stackedBarSeries, m_dataset->seriesIndex(stackedBarSeries)); | |
191 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); |
|
191 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); | |
192 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); |
|
192 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); | |
193 | item=bar; |
|
193 | item=bar; | |
@@ -200,7 +200,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||||
200 | if(m_options.testFlag(QChart::SeriesAnimations)) { |
|
200 | if(m_options.testFlag(QChart::SeriesAnimations)) { | |
201 | // m_animator->addAnimation(bar); |
|
201 | // m_animator->addAnimation(bar); | |
202 | } |
|
202 | } | |
203 |
m_chartTheme->decorate( |
|
203 | m_chartTheme->decorate(percentBarSeries, m_dataset->seriesIndex(percentBarSeries)); | |
204 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); |
|
204 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),bar,SLOT(handleGeometryChanged(const QRectF&))); | |
205 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); |
|
205 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),bar,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); | |
206 | item=bar; |
|
206 | item=bar; | |
@@ -226,7 +226,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||||
226 | if(m_options.testFlag(QChart::SeriesAnimations)) { |
|
226 | if(m_options.testFlag(QChart::SeriesAnimations)) { | |
227 | // m_animator->addAnimation(pie); |
|
227 | // m_animator->addAnimation(pie); | |
228 | } |
|
228 | } | |
229 |
m_chartTheme->decorate( |
|
229 | m_chartTheme->decorate(pieSeries, m_dataset->seriesIndex(series)); | |
230 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),pie,SLOT(handleGeometryChanged(const QRectF&))); |
|
230 | QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),pie,SLOT(handleGeometryChanged(const QRectF&))); | |
231 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),pie,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); |
|
231 | QObject::connect(domain,SIGNAL(domainChanged(qreal,qreal,qreal,qreal)),pie,SLOT(handleDomainChanged(qreal,qreal,qreal,qreal))); | |
232 | // Hide all from background when there is only piechart |
|
232 | // Hide all from background when there is only piechart |
@@ -110,7 +110,7 void ChartTheme::decorate(QLineSeries* series,int index) | |||||
110 | } |
|
110 | } | |
111 | } |
|
111 | } | |
112 |
|
112 | |||
113 |
void ChartTheme::decorate( |
|
113 | void ChartTheme::decorate(QBarSeries* series,int index) | |
114 | { |
|
114 | { | |
115 | QList<QBarSet*> sets = series->barSets(); |
|
115 | QList<QBarSet*> sets = series->barSets(); | |
116 | for (int i=0; i<sets.count(); i++) { |
|
116 | for (int i=0; i<sets.count(); i++) { | |
@@ -132,7 +132,7 void ChartTheme::decorate(BarPresenter* item, QBarSeries* series,int index) | |||||
132 | } |
|
132 | } | |
133 | } |
|
133 | } | |
134 |
|
134 | |||
135 |
void ChartTheme::decorate( |
|
135 | void ChartTheme::decorate(QStackedBarSeries* series,int index) | |
136 | { |
|
136 | { | |
137 | QList<QBarSet*> sets = series->barSets(); |
|
137 | QList<QBarSet*> sets = series->barSets(); | |
138 | for (int i=0; i<sets.count(); i++) { |
|
138 | for (int i=0; i<sets.count(); i++) { | |
@@ -151,7 +151,7 void ChartTheme::decorate(StackedBarPresenter* item, QStackedBarSeries* series,i | |||||
151 | } |
|
151 | } | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 |
void ChartTheme::decorate( |
|
154 | void ChartTheme::decorate(QPercentBarSeries* series,int index) | |
155 | { |
|
155 | { | |
156 | QList<QBarSet*> sets = series->barSets(); |
|
156 | QList<QBarSet*> sets = series->barSets(); | |
157 | for (int i=0; i<sets.count(); i++) { |
|
157 | for (int i=0; i<sets.count(); i++) { | |
@@ -188,7 +188,7 void ChartTheme::decorate(QScatterSeries* series, int index) | |||||
188 | } |
|
188 | } | |
189 | } |
|
189 | } | |
190 |
|
190 | |||
191 |
void ChartTheme::decorate( |
|
191 | void ChartTheme::decorate(QPieSeries* series, int index) | |
192 | { |
|
192 | { | |
193 | // Get color for a slice from a gradient linearly, beginning from the start of the gradient |
|
193 | // Get color for a slice from a gradient linearly, beginning from the start of the gradient | |
194 | for (int i(0); i < series->slices().count(); i++) { |
|
194 | for (int i(0); i < series->slices().count(); i++) { |
@@ -45,13 +45,13 public: | |||||
45 | void decorate(QChart* chart); |
|
45 | void decorate(QChart* chart); | |
46 | void decorate(QLegend* legend); |
|
46 | void decorate(QLegend* legend); | |
47 | //void decorate(ChartItem* item, QSeries* series,int index); |
|
47 | //void decorate(ChartItem* item, QSeries* series,int index); | |
48 |
void decorate( |
|
48 | void decorate(QBarSeries* series, int index); | |
49 |
void decorate( |
|
49 | void decorate(QStackedBarSeries* series, int index); | |
50 |
void decorate( |
|
50 | void decorate(QPercentBarSeries* series, int index); | |
51 | void decorate(QLineSeries* series, int index); |
|
51 | void decorate(QLineSeries* series, int index); | |
52 | void decorate(QAreaSeries* series, int index); |
|
52 | void decorate(QAreaSeries* series, int index); | |
53 | void decorate(QScatterSeries* series, int index); |
|
53 | void decorate(QScatterSeries* series, int index); | |
54 |
void decorate( |
|
54 | void decorate(QPieSeries* series, int index); | |
55 | void decorate(QSplineSeries* series, int index); |
|
55 | void decorate(QSplineSeries* series, int index); | |
56 | void decorate(QChartAxis* axis, bool axisX); |
|
56 | void decorate(QChartAxis* axis, bool axisX); | |
57 |
|
57 |
@@ -87,6 +87,9 QSeries* LegendMarker::series() const | |||||
87 |
|
87 | |||
88 | void LegendMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
88 | void LegendMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
89 | { |
|
89 | { | |
|
90 | Q_UNUSED(option) | |||
|
91 | Q_UNUSED(widget) | |||
|
92 | ||||
90 | painter->setBrush(mBrush); |
|
93 | painter->setBrush(mBrush); | |
91 | painter->drawRect(mMarkerBoundingRect); |
|
94 | painter->drawRect(mMarkerBoundingRect); | |
92 | } |
|
95 | } |
@@ -63,8 +63,9 void LineChartItem::handleUpdated() | |||||
63 |
|
63 | |||
64 | void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
64 | void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
65 | { |
|
65 | { | |
66 |
Q_UNUSED(widget) |
|
66 | Q_UNUSED(widget) | |
67 |
Q_UNUSED(option) |
|
67 | Q_UNUSED(option) | |
|
68 | ||||
68 | painter->save(); |
|
69 | painter->save(); | |
69 | painter->setPen(m_linePen); |
|
70 | painter->setPen(m_linePen); | |
70 | painter->setClipRect(clipRect()); |
|
71 | painter->setClipRect(clipRect()); |
@@ -27,6 +27,7 PieChartItem::~PieChartItem() | |||||
27 |
|
27 | |||
28 | void PieChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) |
|
28 | void PieChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) | |
29 | { |
|
29 | { | |
|
30 | Q_UNUSED(painter) | |||
30 | // TODO: paint shadows for all components |
|
31 | // TODO: paint shadows for all components | |
31 | // - get paths from items & merge & offset and draw with shadow color? |
|
32 | // - get paths from items & merge & offset and draw with shadow color? | |
32 | //painter->setBrush(QBrush(Qt::red)); |
|
33 | //painter->setBrush(QBrush(Qt::red)); |
@@ -590,6 +590,8 void QPieSeries::setModelMapping(int modelValuesLine, int modelLabelsLine, Qt::O | |||||
590 |
|
590 | |||
591 | void QPieSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) |
|
591 | void QPieSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |
592 | { |
|
592 | { | |
|
593 | Q_UNUSED(bottomRight) | |||
|
594 | ||||
593 | if (m_mapOrientation == Qt::Vertical) |
|
595 | if (m_mapOrientation == Qt::Vertical) | |
594 | { |
|
596 | { | |
595 | // slices().at(topLeft.row())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); |
|
597 | // slices().at(topLeft.row())->setValue(m_model->data(m_model->index(topLeft.row(), topLeft.column()), Qt::DisplayRole).toDouble()); | |
@@ -610,6 +612,9 void QPieSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |||||
610 |
|
612 | |||
611 | void QPieSeries::modelDataAdded(QModelIndex parent, int start, int end) |
|
613 | void QPieSeries::modelDataAdded(QModelIndex parent, int start, int end) | |
612 | { |
|
614 | { | |
|
615 | Q_UNUSED(parent) | |||
|
616 | Q_UNUSED(end) | |||
|
617 | ||||
613 | QPieSlice* newSlice = new QPieSlice; |
|
618 | QPieSlice* newSlice = new QPieSlice; | |
614 | newSlice->setLabelVisible(true); |
|
619 | newSlice->setLabelVisible(true); | |
615 | if (m_mapOrientation == Qt::Vertical) |
|
620 | if (m_mapOrientation == Qt::Vertical) | |
@@ -628,6 +633,8 void QPieSeries::modelDataAdded(QModelIndex parent, int start, int end) | |||||
628 |
|
633 | |||
629 | void QPieSeries::modelDataRemoved(QModelIndex parent, int start, int end) |
|
634 | void QPieSeries::modelDataRemoved(QModelIndex parent, int start, int end) | |
630 | { |
|
635 | { | |
|
636 | Q_UNUSED(parent) | |||
|
637 | Q_UNUSED(end) | |||
631 | remove(slices().at(start)); |
|
638 | remove(slices().at(start)); | |
632 | } |
|
639 | } | |
633 |
|
640 |
@@ -31,6 +31,9 QLegend::QLegend(QGraphicsItem *parent) | |||||
31 |
|
31 | |||
32 | void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
32 | void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
33 | { |
|
33 | { | |
|
34 | Q_UNUSED(option) | |||
|
35 | Q_UNUSED(widget) | |||
|
36 | ||||
34 | painter->setBrush(mBackgroundBrush); |
|
37 | painter->setBrush(mBackgroundBrush); | |
35 | painter->drawRect(mBoundingRect); |
|
38 | painter->drawRect(mBoundingRect); | |
36 | } |
|
39 | } | |
@@ -62,6 +65,8 void QLegend::setMinimumSize(const QSizeF size) | |||||
62 |
|
65 | |||
63 | void QLegend::handleSeriesAdded(QSeries* series,Domain* domain) |
|
66 | void QLegend::handleSeriesAdded(QSeries* series, Domain* domain) | |
64 | { |
|
67 | { | |
|
68 | Q_UNUSED(domain) | |||
|
69 | ||||
65 | mSeriesList.append(series); |
|
70 | mSeriesList.append(series); | |
66 | createMarkers(series); |
|
71 | createMarkers(series); | |
67 | layoutChanged(); |
|
72 | layoutChanged(); |
@@ -132,9 +132,9 void ScatterChartItem::setLayout(QVector<QPointF>& points) | |||||
132 |
|
132 | |||
133 | void ScatterChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
133 | void ScatterChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
134 | { |
|
134 | { | |
135 |
Q_UNUSED(painter) |
|
135 | Q_UNUSED(painter) | |
136 |
Q_UNUSED(option) |
|
136 | Q_UNUSED(option) | |
137 |
Q_UNUSED(widget) |
|
137 | Q_UNUSED(widget) | |
138 | } |
|
138 | } | |
139 |
|
139 | |||
140 | void ScatterChartItem::setPen(const QPen& pen) |
|
140 | void ScatterChartItem::setPen(const QPen& pen) | |
@@ -175,10 +175,6 void ScatterChartItem::handleUpdated() | |||||
175 |
|
175 | |||
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | void ScatterChartItem::mousePressEvent( QGraphicsSceneMouseEvent * event ) |
|
|||
179 | { |
|
|||
180 | } |
|
|||
181 |
|
||||
182 | #include "moc_scatterchartitem_p.cpp" |
|
178 | #include "moc_scatterchartitem_p.cpp" | |
183 |
|
179 | |||
184 | QTCOMMERCIALCHART_END_NAMESPACE |
|
180 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -106,6 +106,7 protected: | |||||
106 |
|
106 | |||
107 |
void mousePressEvent( |
|
107 | void mousePressEvent(QGraphicsSceneMouseEvent *event) | |
108 | { |
|
108 | { | |
|
109 | Q_UNUSED(event) | |||
109 | m_parent->markerSelected(this); |
|
110 | m_parent->markerSelected(this); | |
110 | } |
|
111 | } | |
111 |
|
112 |
@@ -69,8 +69,9 void SplineChartItem::handleUpdated() | |||||
69 |
|
69 | |||
70 | void SplineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
70 | void SplineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
71 | { |
|
71 | { | |
72 |
Q_UNUSED(widget) |
|
72 | Q_UNUSED(widget) | |
73 |
Q_UNUSED(option) |
|
73 | Q_UNUSED(option) | |
|
74 | ||||
74 | painter->save(); |
|
75 | painter->save(); | |
75 | painter->setClipRect(clipRect()); |
|
76 | painter->setClipRect(clipRect()); | |
76 | painter->setPen(m_linePen); |
|
77 | painter->setPen(m_linePen); |
@@ -268,6 +268,8 QXYSeries& QXYSeries::operator<< (const QList<QPointF> points) | |||||
268 |
|
268 | |||
269 | void QXYSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) |
|
269 | void QXYSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |
270 | { |
|
270 | { | |
|
271 | Q_UNUSED(bottomRight) | |||
|
272 | ||||
271 | if (m_mapOrientation == Qt::Vertical) |
|
273 | if (m_mapOrientation == Qt::Vertical) | |
272 | emit pointReplaced(topLeft.row()); |
|
274 | emit pointReplaced(topLeft.row()); | |
273 | else |
|
275 | else | |
@@ -276,11 +278,15 void QXYSeries::modelUpdated(QModelIndex topLeft, QModelIndex bottomRight) | |||||
276 |
|
278 | |||
277 | void QXYSeries::modelDataAdded(QModelIndex parent, int start, int end) |
|
279 | void QXYSeries::modelDataAdded(QModelIndex parent, int start, int end) | |
278 | { |
|
280 | { | |
|
281 | Q_UNUSED(parent) | |||
|
282 | Q_UNUSED(end) | |||
279 | emit pointAdded(start); |
|
283 | emit pointAdded(start); | |
280 | } |
|
284 | } | |
281 |
|
285 | |||
282 | void QXYSeries::modelDataRemoved(QModelIndex parent, int start, int end) |
|
286 | void QXYSeries::modelDataRemoved(QModelIndex parent, int start, int end) | |
283 | { |
|
287 | { | |
|
288 | Q_UNUSED(parent) | |||
|
289 | Q_UNUSED(end) | |||
284 | emit pointRemoved(start); |
|
290 | emit pointRemoved(start); | |
285 | } |
|
291 | } | |
286 |
|
292 |
General Comments 0
You need to be logged in to leave comments.
Login now