##// END OF EJS Templates
git acrobatics
sauimone -
r84:64dd93b1af28
parent child
Show More
@@ -42,7 +42,6 void Bar::setPos(qreal x, qreal y)
42 void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
42 void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
43 {
43 {
44 if (0 == mHeight) {
44 if (0 == mHeight) {
45 // Nothing to draw
46 return;
45 return;
47 }
46 }
48 // Set color for bar. TODO: gradients, textures etc
47 // Set color for bar. TODO: gradients, textures etc
@@ -52,7 +51,7 void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidg
52 painter->setPen(pen);
51 painter->setPen(pen);
53
52
54 // Draw bar
53 // Draw bar
55 painter->drawLine(mXpos, mYpos ,
54 painter->drawLine(mXpos, mYpos,
56 mXpos, mYpos - mHeight);
55 mXpos, mYpos - mHeight);
57 }
56 }
58
57
@@ -126,9 +126,6 void BarGroup::layoutChanged()
126 // TODO: width settable per bar?
126 // TODO: width settable per bar?
127 bar->resize(mBarDefaultWidth, barHeight);
127 bar->resize(mBarDefaultWidth, barHeight);
128 bar->setColor(mColors.at(series));
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 bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight);
129 bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight);
133 itemIndex++;
130 itemIndex++;
134 }
131 }
General Comments 0
You need to be logged in to leave comments. Login now