@@ -42,7 +42,6 void Bar::setPos(qreal x, qreal y) | |||
|
42 | 42 | void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
43 | 43 | { |
|
44 | 44 | if (0 == mHeight) { |
|
45 | // Nothing to draw | |
|
46 | 45 | return; |
|
47 | 46 | } |
|
48 | 47 | // Set color for bar. TODO: gradients, textures etc |
@@ -52,7 +51,7 void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidg | |||
|
52 | 51 | painter->setPen(pen); |
|
53 | 52 | |
|
54 | 53 | // Draw bar |
|
55 |
painter->drawLine(mXpos, mYpos |
|
|
54 | painter->drawLine(mXpos, mYpos, | |
|
56 | 55 | mXpos, mYpos - mHeight); |
|
57 | 56 | } |
|
58 | 57 |
@@ -126,9 +126,6 void BarGroup::layoutChanged() | |||
|
126 | 126 | // TODO: width settable per bar? |
|
127 | 127 | bar->resize(mBarDefaultWidth, barHeight); |
|
128 | 128 | bar->setColor(mColors.at(series)); |
|
129 | ||
|
130 | // TODO: bar width shouldn't affect height. Currently it does because pen width also affects height. (QPainter thingy...) | |
|
131 | // bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight - barHeight); | |
|
132 | 129 | bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight); |
|
133 | 130 | itemIndex++; |
|
134 | 131 | } |
General Comments 0
You need to be logged in to leave comments.
Login now