Plasma
wallpaper.cpp
Go to the documentation of this file.
162 KPluginInfo::List Wallpaper::listWallpaperInfoForMimetype(const QString &mimetype, const QString &formFactor)
466 void WallpaperPrivate::renderWallpaper(const QString &sourceImagePath, const QImage &image, const QSize &size,
545 void WallpaperPrivate::newRenderCompleted(const WallpaperRenderRequest &request, const QImage &image)
554 q->insertIntoCache(cacheKey(request.file, request.size, request.resizeMethod, request.color), image);
void setUsingRenderingCache(bool useCache)
Sets whether or not to cache on disk the results of calls to render.
Definition: wallpaper.cpp:413
bool needsPreviewDuringConfiguration() const
Definition: wallpaper.cpp:672
void renderCompleted(const QImage &image)
Emitted when a wallpaper image render is completed.
QString & append(QChar ch)
bool load(QIODevice *device, const char *format)
int width() const
void setTargetSizeHint(const QSizeF &targetSize)
Allows one to set rendering hints that may differ from the actualities of the Wallpaper's current sta...
Definition: wallpaper.cpp:432
Q_INVOKABLE DataEngine * dataEngine(const QString &name) const
Loads the given DataEngine.
Definition: wallpaper.cpp:384
Wallpaper(QObject *parent=0)
Default constructor for an empty or null wallpaper.
Definition: wallpaper.cpp:102
bool isUsingRenderingCache() const
Definition: wallpaper.cpp:408
void renderHintsChanged()
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Mouse move event.
Definition: wallpaper.cpp:356
QString name() const
bool remove()
void render(const QString &sourceImagePath, const QSize &size, Wallpaper::ResizeMethod resizeMethod=ScaledResize, const QColor &color=QColor(0, 0, 0))
Renders the wallpaper asyncronously with the given parameters.
Definition: wallpaper.cpp:455
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Mouse press event.
Definition: wallpaper.cpp:363
void setPreviewing(bool previewing)
Puts the wallpaper into preview mode.
Definition: wallpaper.cpp:667
QSizeF size() const
QThreadPool * globalInstance()
int size() const
bool supportsMimetype(const QString &mimetype) const
Definition: wallpaper.cpp:174
ResizeMethod
Various resize modes supported by the built in image renderer.
Definition: wallpaper.h:74
void setBoundingRect(const QRectF &boundingRect)
Sets bounding rectangle.
Definition: wallpaper.cpp:293
void setConfigurationRequired(bool needsConfiguring, const QString &reason=QString())
When the wallpaper needs to be configured before being usable, this method can be called to denote th...
Definition: wallpaper.cpp:394
void setPreviewDuringConfiguration(const bool preview)
Sets whether the configuration user interface of the wallpaper should have a live preview rendered by...
Definition: wallpaper.cpp:677
QString name() const
Returns the user-visible name for the wallpaper, as specified in the .desktop file.
bool isNull() const
bool exists() const
AppletScript * loadScriptEngine(const QString &language, Applet *applet)
Loads an Applet script engine for the given language.
Definition: scriptengine.cpp:206
virtual void save(KConfigGroup &config)
This method is called when settings need to be saved.
Definition: wallpaper.cpp:340
bool isPluginVersionCompatible(unsigned int version)
Verifies that a plugin is compatible with plasma.
Definition: version.cpp:51
void setRenderingMode(const QString &mode)
Sets the rendering mode for this wallpaper.
Definition: wallpaper.cpp:303
QList< QAction * > contextualActions() const
Returns a list of wallpaper contextual actions (nothing by default)
Definition: wallpaper.cpp:652
static PackageStructure::Ptr packageStructure(Wallpaper *paper=0)
Returns the Package specialization for wallpapers.
Definition: wallpaper.cpp:228
void insertIntoCache(const QString &key, const QImage &image)
Insert specified pixmap into the cache if usingRenderingCache.
Definition: wallpaper.cpp:631
bool configurationRequired() const
Definition: wallpaper.cpp:389
void setContextualActions(const QList< QAction * > &actions)
Sets the contextual actions for this wallpaper.
Definition: wallpaper.cpp:657
bool isEmpty() const
virtual void init(const KConfigGroup &config)
This method is called once the wallpaper is loaded or mode is changed.
Definition: wallpaper.cpp:332
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Mouse release event.
Definition: wallpaper.cpp:370
QFuture< T > run(Function function,...)
QDateTime lastModified() const
bool findInCache(const QString &key, QImage &image, unsigned int lastModified=0)
Tries to load pixmap with the specified key from cache.
Definition: wallpaper.cpp:611
void setResizeMethodHint(Wallpaper::ResizeMethod resizeMethod)
Allows one to set rendering hints that may differ from the actualities of the Wallpaper's current sta...
Definition: wallpaper.cpp:418
static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:57
void setParent(QObject *parent)
virtual void wheelEvent(QGraphicsSceneWheelEvent *event)
Mouse wheel event.
Definition: wallpaper.cpp:377
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
uint toTime_t() const
static KPluginInfo::List listWallpaperInfo(const QString &formFactor=QString())
Returns a list of all known wallpapers.
Definition: wallpaper.cpp:151
void addUrls(const KUrl::List &urls)
This method is invoked by setUrls(KUrl::List) Can be Overriden by Plugins which want to support setti...
Definition: wallpaper.cpp:128
virtual QWidget * createConfigurationInterface(QWidget *parent)
Returns a widget that can be used to configure the options (if any) associated with this wallpaper...
Definition: wallpaper.cpp:347
int count() const
static KPluginInfo::List listWallpaperInfoForMimetype(const QString &mimetype, const QString &formFactor=QString())
Returns a list of all known wallpapers that can accept the given mimetype.
Definition: wallpaper.cpp:162
const Package * package() const
Accessor for the associated Package object if any.
Definition: wallpaper.cpp:682
int height() const
QList< KServiceAction > listRenderingModes() const
Returns modes the wallpaper has, as specified in the .desktop file.
void restore(const KConfigGroup &config)
This method should be called once the wallpaper is loaded or mode is changed.
Definition: wallpaper.cpp:322
Wallpaper::ResizeMethod resizeMethodHint() const
Definition: wallpaper.cpp:427
void start(QRunnable *runnable, int priority)
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void urlDropped(const KUrl &url)
Emitted when a URL matching X-Plasma-DropMimeTypes is dropped on the wallpaper.
KServiceAction renderingMode() const
QString filePath(const char *fileType, const QString &filename) const
Get the path to a given file.
Definition: package.cpp:213
static Wallpaper * load(const QString &name, const QVariantList &args=QVariantList())
Attempts to load a wallpaper.
Definition: wallpaper.cpp:180
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.