a ctor with a QGraphicsItem as parent as it should always had
svn path=/trunk/KDE/kdelibs/; revision=1081047
This commit is contained in:
parent
99cd8006e6
commit
189289660c
@ -53,6 +53,7 @@ public:
|
||||
delete pixmap;
|
||||
}
|
||||
|
||||
void init();
|
||||
void syncBorders();
|
||||
QFont widgetFont() const;
|
||||
|
||||
@ -68,6 +69,16 @@ public:
|
||||
bool customFont;
|
||||
};
|
||||
|
||||
void FramePrivate::init()
|
||||
{
|
||||
svg = new Plasma::FrameSvg(q);
|
||||
svg->setImagePath("widgets/frame");
|
||||
svg->setElementPrefix("plain");
|
||||
syncBorders();
|
||||
|
||||
QObject::connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), q, SLOT(syncBorders()));
|
||||
}
|
||||
|
||||
QFont FramePrivate::widgetFont() const
|
||||
{
|
||||
if (customFont) {
|
||||
@ -96,12 +107,14 @@ Frame::Frame(QGraphicsWidget *parent)
|
||||
: QGraphicsWidget(parent),
|
||||
d(new FramePrivate(this))
|
||||
{
|
||||
d->svg = new Plasma::FrameSvg(this);
|
||||
d->svg->setImagePath("widgets/frame");
|
||||
d->svg->setElementPrefix("plain");
|
||||
d->syncBorders();
|
||||
d->init();
|
||||
}
|
||||
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(syncBorders()));
|
||||
Frame::Frame(QGraphicsItem *parent)
|
||||
: QGraphicsWidget(parent),
|
||||
d(new FramePrivate(this))
|
||||
{
|
||||
d->init();
|
||||
}
|
||||
|
||||
Frame::~Frame()
|
||||
|
@ -62,6 +62,11 @@ public:
|
||||
* @arg parent the parent of this widget
|
||||
*/
|
||||
explicit Frame(QGraphicsWidget *parent = 0);
|
||||
|
||||
/**
|
||||
* @since 4.5
|
||||
*/
|
||||
explicit Frame(QGraphicsItem *parent = 0);
|
||||
~Frame();
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user