Amendments to Plasma::Wallpaper for wallpaper contextual actions support.

svn path=/trunk/KDE/kdelibs/; revision=1034320
This commit is contained in:
Yuen Hoe Lim 2009-10-12 13:01:51 +00:00
parent 54202fc885
commit 2a5325af51
2 changed files with 25 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include <QFile>
#include <QFileInfo>
#include <QImage>
#include <QAction>
#include <kdebug.h>
#include <kglobal.h>
@ -415,6 +416,16 @@ void Wallpaper::insertIntoCache(const QString& key, const QImage &image)
}
}
QList<QAction*> Wallpaper::contextualActions() const
{
return contextActions;
}
void Wallpaper::setContextualActions(const QList<QAction*> &actions)
{
contextActions = actions;
}
} // Plasma namespace
#include "wallpaper.moc"

View File

@ -317,6 +317,11 @@ class PLASMA_EXPORT Wallpaper : public QObject
*/
void setTargetSizeHint(const QSizeF &targetSize);
/**
* Returns a list of wallpaper contextual actions (nothing by default)
*/
QList<QAction*> contextualActions() const;
Q_SIGNALS:
/**
* This signal indicates that wallpaper needs to be repainted.
@ -452,6 +457,15 @@ class PLASMA_EXPORT Wallpaper : public QObject
**/
void insertIntoCache(const QString& key, const QImage &image);
/**
* Sets the contextual actions for this wallpaper.
*
* @param actions A list of contextual actions for this wallpaper
**/
void setContextualActions(const QList<QAction*> &actions);
QList<QAction*> contextActions;
private:
Q_PRIVATE_SLOT(d, void renderCompleted(int token, const QImage &image,
const QString &sourceImagePath, const QSize &size,