add rect() which returns the contents rect

svn path=/trunk/KDE/kdebase/runtime/; revision=1038277
This commit is contained in:
Aaron J. Seigo 2009-10-20 23:30:36 +00:00
parent 07f1255677
commit bc26a048ec
2 changed files with 6 additions and 0 deletions

View File

@ -210,6 +210,11 @@ QSizeF AppletInterface::size() const
return applet()->size();
}
QRectF AppletInterface::rect() const
{
return applet()->contentRect();
}
void AppletInterface::setAction(const QString &name, const QString &text, const QString &icon, const QString &shortcut)
{
Plasma::Applet *a = applet();

View File

@ -133,6 +133,7 @@ enum QtAlignment {
Q_INVOKABLE void setConfigurationRequired(bool needsConfiguring, const QString &reason = QString());
Q_INVOKABLE QSizeF size() const;
Q_INVOKABLE QRectF rect() const;
Q_INVOKABLE void setAction(const QString &name, const QString &text,
const QString &icon = QString(), const QString &shortcut = QString());