@@ -48,6 +48,11 int BarGroup::addColor( QColor color ) | |||||
48 | return colorIndex; |
|
48 | return colorIndex; | |
49 | } |
|
49 | } | |
50 |
|
50 | |||
|
51 | void BarGroup::resetColors() | |||
|
52 | { | |||
|
53 | mColors.clear(); | |||
|
54 | } | |||
|
55 | ||||
51 | void BarGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
56 | void BarGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
52 | { |
|
57 | { | |
53 | if (!mLayoutSet) { |
|
58 | if (!mLayoutSet) { |
@@ -37,8 +37,8 public: | |||||
37 | void setPos(qreal x, qreal y); |
|
37 | void setPos(qreal x, qreal y); | |
38 | void setBarWidth( int w ); // Default width for each bar |
|
38 | void setBarWidth( int w ); // Default width for each bar | |
39 |
|
39 | |||
40 | // TODO: set color theme instead? or use some external color theme call this |
|
|||
41 | int addColor( QColor color ); |
|
40 | int addColor( QColor color ); | |
|
41 | void resetColors(); | |||
42 |
|
42 | |||
43 | // From QGraphicsItem |
|
43 | // From QGraphicsItem | |
44 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
44 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
General Comments 0
You need to be logged in to leave comments.
Login now