##// END OF EJS Templates
added labels to series, intergrated with test app. minor hack to test app
added labels to series, intergrated with test app. minor hack to test app

File last commit:

r161:cc2daab2560d
r167:023d2c8150a8
Show More
separator.cpp
44 lines | 807 B | text/x-c | CppLexer
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #include "separator_p.h"
#include <QDebug>
#include <QPainter>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Separator::Separator(QGraphicsItem *parent)
: ChartItem(parent)
{
}
void Separator::setPos(qreal x, qreal y)
{
mXpos = x;
mYpos = y;
}
void Separator::setColor(QColor color)
{
mColor = color;
}
void Separator::setSize(const QSizeF &size)
{
mWidth = size.width();
mHeight = size.height();
}
void Separator::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
sauimone
model delegate for bar series. updated examples
r161 // qDebug() << "separator::paint" << boundingRect();
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 QPen pen(mColor);
painter->setPen(pen);
painter->drawLine(mXpos,mYpos,mXpos,mHeight);
}
QRectF Separator::boundingRect() const
{
QRectF r(mXpos,mYpos,mWidth,mHeight);
return r;
}
QTCOMMERCIALCHART_END_NAMESPACE