From 2a5325af5192930a333a380a7098066a5539740f Mon Sep 17 00:00:00 2001 From: Yuen Hoe Lim Date: Mon, 12 Oct 2009 13:01:51 +0000 Subject: [PATCH] Amendments to Plasma::Wallpaper for wallpaper contextual actions support. svn path=/trunk/KDE/kdelibs/; revision=1034320 --- wallpaper.cpp | 11 +++++++++++ wallpaper.h | 14 ++++++++++++++ 2 files changed, 25 insertions(+) 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,