##// END OF EJS Templates
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.
Refactoring QPieSlice private implementation. Removes the useless QPieSlicePrivate layer and uses PieSliceData directly.

File last commit:

r677:2b967c4f6e8e
r818:5bf1dbd3a89a
Show More
separator.cpp
48 lines | 839 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)
Michal Klocek
Refactors chartitem...
r677 : QGraphicsItem(parent)
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 {
}
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)
{
Tero Ahola
Squashed bunch of warnings
r611 Q_UNUSED(option)
Q_UNUSED(widget)
sauimone
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code
r296 if (isVisible()) {
QPen pen(mColor);
painter->setPen(pen);
painter->drawLine(mXpos,mYpos,mXpos,mHeight);
}
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 }
QRectF Separator::boundingRect() const
{
QRectF r(mXpos,mYpos,mWidth,mHeight);
return r;
}
QTCOMMERCIALCHART_END_NAMESPACE