diff --git a/wallpaper.cpp b/wallpaper.cpp index 64a8b0552..777be44c9 100644 --- a/wallpaper.cpp +++ b/wallpaper.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -415,6 +416,16 @@ void Wallpaper::insertIntoCache(const QString& key, const QImage &image) } } +QList Wallpaper::contextualActions() const +{ + return contextActions; +} + +void Wallpaper::setContextualActions(const QList &actions) +{ + contextActions = actions; +} + } // Plasma namespace #include "wallpaper.moc" diff --git a/wallpaper.h b/wallpaper.h index ba96cc705..c8eb58b1b 100644 --- a/wallpaper.h +++ b/wallpaper.h @@ -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 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 &actions); + + QList contextActions; + private: Q_PRIVATE_SLOT(d, void renderCompleted(int token, const QImage &image, const QString &sourceImagePath, const QSize &size,