Amendments to Plasma::Wallpaper for wallpaper contextual actions support.
svn path=/trunk/KDE/kdelibs/; revision=1034320
This commit is contained in:
parent
54202fc885
commit
2a5325af51
@ -24,6 +24,7 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kglobal.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
|
} // Plasma namespace
|
||||||
|
|
||||||
#include "wallpaper.moc"
|
#include "wallpaper.moc"
|
||||||
|
14
wallpaper.h
14
wallpaper.h
@ -317,6 +317,11 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
|||||||
*/
|
*/
|
||||||
void setTargetSizeHint(const QSizeF &targetSize);
|
void setTargetSizeHint(const QSizeF &targetSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of wallpaper contextual actions (nothing by default)
|
||||||
|
*/
|
||||||
|
QList<QAction*> contextualActions() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* This signal indicates that wallpaper needs to be repainted.
|
* 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);
|
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:
|
private:
|
||||||
Q_PRIVATE_SLOT(d, void renderCompleted(int token, const QImage &image,
|
Q_PRIVATE_SLOT(d, void renderCompleted(int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
|
Loading…
Reference in New Issue
Block a user