make it possible for scripts to get at the size of the applet
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743090
This commit is contained in:
parent
5b65d5c54c
commit
e07afa49a8
@ -64,7 +64,11 @@ void ScriptEngine::paintInterface(QPainter* painter, const QStyleOptionGraphicsI
|
|||||||
|
|
||||||
QSizeF ScriptEngine::size() const
|
QSizeF ScriptEngine::size() const
|
||||||
{
|
{
|
||||||
return QSizeF(0, 0);
|
if (applet()) {
|
||||||
|
return applet()->contentSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
return QSizeF();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScriptEngine::init()
|
bool ScriptEngine::init()
|
||||||
|
@ -87,10 +87,7 @@ public:
|
|||||||
**/
|
**/
|
||||||
virtual void paintInterface(QPainter* painter, const QStyleOptionGraphicsItem* option, const QRect &contentsRect);
|
virtual void paintInterface(QPainter* painter, const QStyleOptionGraphicsItem* option, const QRect &contentsRect);
|
||||||
|
|
||||||
/**
|
Q_INVOKABLE QSizeF size() const;
|
||||||
* @return the size of the applet
|
|
||||||
**/
|
|
||||||
virtual QSizeF size() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user