diff --git a/src/areachart/areachartitem.cpp b/src/areachart/areachartitem.cpp index 91cab8c..9bd7365 100644 --- a/src/areachart/areachartitem.cpp +++ b/src/areachart/areachartitem.cpp @@ -10,7 +10,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE //TODO: optimize : remove points which are not visible -AreaChartItem::AreaChartItem(QAreaSeries* areaSeries,ChartPresenter *presenter):Chart(presenter),QGraphicsItem(presenter->rootItem()), +AreaChartItem::AreaChartItem(QAreaSeries* areaSeries,ChartPresenter *presenter):ChartItem(presenter), m_series(areaSeries), m_upper(0), m_lower(0), @@ -99,8 +99,12 @@ void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt Q_UNUSED(option) painter->save(); - painter->setPen(m_linePen); - painter->setBrush(m_brush); + QPen pen; + pen.setCosmetic(false); + pen.setWidth(4); + pen.setColor(qRgb(200,0,250)); + painter->setPen(pen); + //painter->setBrush(m_brush); painter->setClipRect(m_clipRect); painter->drawPath(m_path); if(m_pointsVisible){ diff --git a/src/areachart/areachartitem_p.h b/src/areachart/areachartitem_p.h index ced1a66..17374cb 100644 --- a/src/areachart/areachartitem_p.h +++ b/src/areachart/areachartitem_p.h @@ -10,7 +10,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class QAreaSeries; class AreaChartItem; -class AreaChartItem : public Chart, public QGraphicsItem +class AreaChartItem : public ChartItem { Q_OBJECT public: diff --git a/src/piechart/qpieseries.cpp b/src/piechart/qpieseries.cpp index d400ea4..2a1f766 100644 --- a/src/piechart/qpieseries.cpp +++ b/src/piechart/qpieseries.cpp @@ -76,8 +76,7 @@ void QPieSeriesPrivate::updateDerivativeData() void QPieSeriesPrivate::sliceChanged() { - QPieSlice* slice = qobject_cast(sender()); - Q_ASSERT(m_slices.contains(slice)); + Q_ASSERT(m_slices.contains(qobject_cast(sender()))); updateDerivativeData(); } diff --git a/src/scatterseries/scatterchartitem.cpp b/src/scatterseries/scatterchartitem.cpp index 63a0342..93a5e0d 100644 --- a/src/scatterseries/scatterchartitem.cpp +++ b/src/scatterseries/scatterchartitem.cpp @@ -41,7 +41,7 @@ void ScatterChartItem::createPoints(int count) { for (int i = 0; i < count; ++i) { - QGraphicsItem *item; + QGraphicsItem *item = 0; switch (m_shape) { case QScatterSeries::MarkerShapeCircle:{