the monitor preview becomes optional, with Wallpaper::setPreviewDuringConfiguration() (default off)
image uses it just for slideshows together with the previous related commits, FEATURE: new appearance to the background config dialog svn path=/trunk/KDE/kdelibs/; revision=1162831
This commit is contained in:
parent
50fab85988
commit
0d2681a23d
@ -77,6 +77,7 @@ public:
|
|||||||
bool needsConfig : 1;
|
bool needsConfig : 1;
|
||||||
bool scriptInitialized : 1;
|
bool scriptInitialized : 1;
|
||||||
bool previewing : 1;
|
bool previewing : 1;
|
||||||
|
bool needsPreviewDuringConfiguration : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LoadImageThread : public QObject, public QRunnable
|
class LoadImageThread : public QObject, public QRunnable
|
||||||
|
@ -471,7 +471,8 @@ WallpaperPrivate::WallpaperPrivate(KService::Ptr service, Wallpaper *wallpaper)
|
|||||||
initialized(false),
|
initialized(false),
|
||||||
needsConfig(false),
|
needsConfig(false),
|
||||||
scriptInitialized(false),
|
scriptInitialized(false),
|
||||||
previewing(false)
|
previewing(false),
|
||||||
|
needsPreviewDuringConfiguration(false)
|
||||||
{
|
{
|
||||||
if (wallpaperDescription.isValid()) {
|
if (wallpaperDescription.isValid()) {
|
||||||
QString api = wallpaperDescription.property("X-Plasma-API").toString();
|
QString api = wallpaperDescription.property("X-Plasma-API").toString();
|
||||||
@ -665,6 +666,16 @@ void Wallpaper::setPreviewing(bool previewing)
|
|||||||
d->previewing = previewing;
|
d->previewing = previewing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Wallpaper::needsPreviewDuringConfiguration() const
|
||||||
|
{
|
||||||
|
return d->needsPreviewDuringConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Wallpaper::setPreviewDuringConfiguration(const bool preview)
|
||||||
|
{
|
||||||
|
d->needsPreviewDuringConfiguration = preview;
|
||||||
|
}
|
||||||
|
|
||||||
const Package *Wallpaper::package() const
|
const Package *Wallpaper::package() const
|
||||||
{
|
{
|
||||||
return d->package;
|
return d->package;
|
||||||
|
17
wallpaper.h
17
wallpaper.h
@ -343,6 +343,13 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
|||||||
*/
|
*/
|
||||||
void setPreviewing(bool previewing);
|
void setPreviewing(bool previewing);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the wallpaper needs a live preview in the configuration UI
|
||||||
|
* @since 4.6
|
||||||
|
*/
|
||||||
|
bool needsPreviewDuringConfiguration() const;
|
||||||
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* This signal indicates that wallpaper needs to be repainted.
|
* This signal indicates that wallpaper needs to be repainted.
|
||||||
@ -490,6 +497,16 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
|||||||
//FIXME: KDE5, this must be moved to the dptr
|
//FIXME: KDE5, this must be moved to the dptr
|
||||||
QList<QAction*> contextActions;
|
QList<QAction*> contextActions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the configuration user interface of the wallpaper should have
|
||||||
|
* a live preview rendered by a Wallpaper instance. note: this is just an
|
||||||
|
* hint, the configuration user interface can choose to ignore it
|
||||||
|
*
|
||||||
|
* @param preview true if a preview should be shown
|
||||||
|
* @since 4.6
|
||||||
|
*/
|
||||||
|
void setPreviewDuringConfiguration(const bool preview);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_PRIVATE_SLOT(d, void renderCompleted(WallpaperRenderThread *renderer, int token, const QImage &image,
|
Q_PRIVATE_SLOT(d, void renderCompleted(WallpaperRenderThread *renderer, 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