add a contentSizeHint so that this can be easily forwarded in those cases where it needs to be something special (mac dashboard widgets being such an example)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779416
This commit is contained in:
parent
9c94c63dfe
commit
12cea8acf1
@ -61,6 +61,11 @@ void AppletScript::paintInterface(QPainter* painter, const QStyleOptionGraphicsI
|
|||||||
Q_UNUSED(contentsRect)
|
Q_UNUSED(contentsRect)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSizeF AppletScript::contentSizeHint() const
|
||||||
|
{
|
||||||
|
return applet()->contentSizeHint();
|
||||||
|
}
|
||||||
|
|
||||||
QSizeF AppletScript::size() const
|
QSizeF AppletScript::size() const
|
||||||
{
|
{
|
||||||
if (applet()) {
|
if (applet()) {
|
||||||
|
@ -68,6 +68,12 @@ public:
|
|||||||
const QStyleOptionGraphicsItem* option,
|
const QStyleOptionGraphicsItem* option,
|
||||||
const QRect &contentsRect);
|
const QRect &contentsRect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called to discover the content size hint for the item.
|
||||||
|
* The default implementation simply returns the Applet's contentSizeHint
|
||||||
|
*/
|
||||||
|
virtual QSizeF contentSizeHint() const;
|
||||||
|
|
||||||
Q_INVOKABLE QSizeF size() const;
|
Q_INVOKABLE QSizeF size() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user