diff --git a/src/barchart/bargroup.cpp b/src/barchart/bargroup.cpp index f372dcd..88eab42 100644 --- a/src/barchart/bargroup.cpp +++ b/src/barchart/bargroup.cpp @@ -48,6 +48,11 @@ int BarGroup::addColor( QColor color ) return colorIndex; } +void BarGroup::resetColors() +{ + mColors.clear(); +} + void BarGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (!mLayoutSet) { diff --git a/src/barchart/bargroup.h b/src/barchart/bargroup.h index 48e94ee..808ad8f 100644 --- a/src/barchart/bargroup.h +++ b/src/barchart/bargroup.h @@ -37,8 +37,8 @@ public: void setPos(qreal x, qreal y); void setBarWidth( int w ); // Default width for each bar - // TODO: set color theme instead? or use some external color theme call this int addColor( QColor color ); + void resetColors(); // From QGraphicsItem void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);