API addition, constification and param naming clarity

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842640
This commit is contained in:
Aaron J. Seigo 2008-08-05 17:32:47 +00:00
parent 7f35d2e3e6
commit 41565045e3
2 changed files with 10 additions and 5 deletions

View File

@ -972,7 +972,7 @@ bool Containment::drawWallpaper()
return d->drawWallpaper;
}
void Containment::setWallpaper(const QString &pluginName, const QString &action)
void Containment::setWallpaper(const QString &pluginName, const QString &mode)
{
delete d->wallpaper;
if (!pluginName.isEmpty()) {
@ -980,7 +980,7 @@ void Containment::setWallpaper(const QString &pluginName, const QString &action)
setDrawWallpaper(d->wallpaper != 0);
if (d->wallpaper) {
d->wallpaper->setBoundingRect(geometry());
d->wallpaper->init(action);
d->wallpaper->init(mode);
connect(d->wallpaper, SIGNAL(update(const QRectF&)),
this, SLOT(updateRect(const QRectF&)));
}
@ -990,7 +990,7 @@ void Containment::setWallpaper(const QString &pluginName, const QString &action)
}
}
Plasma::Wallpaper* Containment::wallpaper()
Plasma::Wallpaper* Containment::wallpaper() const
{
return d->wallpaper;
}

View File

@ -282,13 +282,18 @@ class PLASMA_EXPORT Containment : public Applet
/**
* Sets wallpaper plugin.
*
* @param pluginName the name of the wallpaper to attempt to load
* @param mode optional mode or the wallpaper plugin (e.g. "Slideshow").
* These values are pugin specific and enumerated in the plugin's
* .desktop file.
*/
void setWallpaper(const QString &pluginName, const QString &action = QString());
void setWallpaper(const QString &pluginName, const QString &mode = QString());
/**
* Return wallpaper plugin.
*/
Plasma::Wallpaper* wallpaper();
Plasma::Wallpaper* wallpaper() const;
Q_SIGNALS: