style fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=873137
This commit is contained in:
parent
dd9445d885
commit
2839ebec00
@ -25,64 +25,64 @@
|
||||
|
||||
namespace Plasma
|
||||
{
|
||||
class SvgWidgetPrivate
|
||||
{
|
||||
public:
|
||||
SvgWidgetPrivate(Svg *s, const QString &element)
|
||||
: svg(s), elementID(element)
|
||||
{
|
||||
}
|
||||
|
||||
Svg *svg;
|
||||
QString elementID;
|
||||
};
|
||||
|
||||
SvgWidget::SvgWidget( QGraphicsItem * parent, Qt::WindowFlags wFlags)
|
||||
: QGraphicsWidget(parent, wFlags),
|
||||
d(new SvgWidgetPrivate(0, QString()))
|
||||
class SvgWidgetPrivate
|
||||
{
|
||||
public:
|
||||
SvgWidgetPrivate(Svg *s, const QString &element)
|
||||
: svg(s), elementID(element)
|
||||
{
|
||||
}
|
||||
|
||||
SvgWidget::SvgWidget(Svg *svg, const QString &elementID, QGraphicsItem * parent, Qt::WindowFlags wFlags)
|
||||
: QGraphicsWidget(parent, wFlags),
|
||||
d(new SvgWidgetPrivate(svg, elementID))
|
||||
{
|
||||
}
|
||||
Svg *svg;
|
||||
QString elementID;
|
||||
};
|
||||
|
||||
SvgWidget::~SvgWidget()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
SvgWidget::SvgWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
|
||||
: QGraphicsWidget(parent, wFlags),
|
||||
d(new SvgWidgetPrivate(0, QString()))
|
||||
{
|
||||
}
|
||||
|
||||
void SvgWidget::setSvg(Svg *svg)
|
||||
{
|
||||
d->svg = svg;
|
||||
}
|
||||
SvgWidget::SvgWidget(Svg *svg, const QString &elementID, QGraphicsItem *parent, Qt::WindowFlags wFlags)
|
||||
: QGraphicsWidget(parent, wFlags),
|
||||
d(new SvgWidgetPrivate(svg, elementID))
|
||||
{
|
||||
}
|
||||
|
||||
Svg *SvgWidget::svg() const
|
||||
{
|
||||
return d->svg;
|
||||
}
|
||||
SvgWidget::~SvgWidget()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void SvgWidget::setElementID(const QString &elementID)
|
||||
{
|
||||
d->elementID = elementID;
|
||||
}
|
||||
void SvgWidget::setSvg(Svg *svg)
|
||||
{
|
||||
d->svg = svg;
|
||||
}
|
||||
|
||||
QString SvgWidget::elementID() const
|
||||
{
|
||||
return d->elementID;
|
||||
}
|
||||
Svg *SvgWidget::svg() const
|
||||
{
|
||||
return d->svg;
|
||||
}
|
||||
|
||||
void SvgWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
void SvgWidget::setElementID(const QString &elementID)
|
||||
{
|
||||
d->elementID = elementID;
|
||||
}
|
||||
|
||||
if (d->svg){
|
||||
d->svg->paint(painter, boundingRect(), d->elementID);
|
||||
}
|
||||
}
|
||||
QString SvgWidget::elementID() const
|
||||
{
|
||||
return d->elementID;
|
||||
}
|
||||
|
||||
void SvgWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
|
||||
if (d->svg){
|
||||
d->svg->paint(painter, boundingRect(), d->elementID);
|
||||
}
|
||||
}
|
||||
|
||||
} // Plasma namespace
|
||||
|
||||
|
@ -36,8 +36,9 @@ namespace Plasma
|
||||
class PLASMA_EXPORT SvgWidget : public QGraphicsWidget
|
||||
{
|
||||
public:
|
||||
SvgWidget ( QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0 );
|
||||
SvgWidget ( Svg *svg, const QString & elementID = QString(), QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0 );
|
||||
SvgWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
|
||||
SvgWidget(Svg *svg, const QString & elementID = QString(),
|
||||
QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
|
||||
virtual ~SvgWidget();
|
||||
|
||||
void setSvg(Svg *svg);
|
||||
|
Loading…
Reference in New Issue
Block a user