allow applets to know when they are destroyed

svn path=/trunk/KDE/kdelibs/; revision=891035
This commit is contained in:
Aaron J. Seigo 2008-12-01 01:04:58 +00:00
parent 2048022183
commit 6f3d2bc0ea
2 changed files with 11 additions and 0 deletions

View File

@ -371,6 +371,11 @@ void Applet::destroy()
}
}
bool Applet::destroyed() const
{
return d->transient;
}
void AppletPrivate::appletAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation anim)
{
if (anim != Animator::DisappearAnimation || item != q) {

View File

@ -550,6 +550,12 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
const QString &serviceId = QString(),
uint appletId = 0);
/**
* @return true if destroy() was called; useful for Applets which should avoid
* certain tasks if they are about to be deleted permanently
*/
bool destroyed() const;
Q_SIGNALS:
/**
* This signal indicates that an application launch, window