make it easy to track if the configuration dialog is around or not

svn path=/trunk/KDE/kdelibs/; revision=1082160
This commit is contained in:
Aaron J. Seigo 2010-01-29 21:21:16 +00:00
parent f820ea872d
commit dd53f9bd7f
2 changed files with 12 additions and 0 deletions

View File

@ -1681,6 +1681,11 @@ void Applet::resizeEvent(QGraphicsSceneResizeEvent *event)
emit geometryChanged();
}
bool Applet::isUserConfiguring() const
{
return KConfigDialog::exists(d->configDialogId());
}
void Applet::showConfigurationInterface()
{
if (!hasConfigurationInterface()) {

View File

@ -87,6 +87,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry)
Q_PROPERTY(bool shouldConserveResources READ shouldConserveResources)
Q_PROPERTY(uint id READ id)
Q_PROPERTY(bool userConfiguring READ isUserConfiguring)
public:
typedef QList<Applet*> List;
@ -796,6 +797,12 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
*/
virtual void showConfigurationInterface();
/**
* @return true when the configuration interface is being shown
* @since 4.5
*/
bool isUserConfiguring() const;
/**
* Causes this applet to raise above all other applets.
*/