##// END OF EJS Templates
Removes obsolate methods from qchart
Removes obsolate methods from qchart

File last commit:

r116:999187e32a9b
r117:bd5d64e54b3e
Show More
barlabel.cpp
42 lines | 737 B | text/x-c | CppLexer
#include "barlabel_p.h"
#include <QPainter>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
BarLabel::BarLabel(QGraphicsItem* parent) : ChartItem(parent)
{
}
void BarLabel::set(QString label)
{
mLabel = label;
}
void BarLabel::setPos(qreal x, qreal y)
{
mXpos = x;
mYpos = y;
}
void BarLabel::setSize(const QSizeF &size)
{
mSize = size;
}
void BarLabel::setPlotDomain(const PlotDomain& data)
{
mDomain = data;
}
void BarLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
painter->drawText(boundingRect(),mLabel);
}
QRectF BarLabel::boundingRect() const
{
QRectF r(mXpos, mYpos, mXpos + mSize.width(), mYpos + mSize.height());
return r;
}
QTCOMMERCIALCHART_END_NAMESPACE