* renderComplete -> renderCompleted
* remove some unused members svn path=/trunk/KDE/kdelibs/; revision=948068
This commit is contained in:
parent
ef99d85b29
commit
1f1600e406
|
@ -44,9 +44,7 @@ public:
|
||||||
WallpaperPrivate(KService::Ptr service, Wallpaper *wallpaper) :
|
WallpaperPrivate(KService::Ptr service, Wallpaper *wallpaper) :
|
||||||
q(wallpaper),
|
q(wallpaper),
|
||||||
wallpaperDescription(service),
|
wallpaperDescription(service),
|
||||||
renderColor(0, 0, 0),
|
|
||||||
renderToken(-1),
|
renderToken(-1),
|
||||||
renderResizeMethod(Wallpaper::ScaledResize),
|
|
||||||
cacheRendering(false),
|
cacheRendering(false),
|
||||||
initialized(false),
|
initialized(false),
|
||||||
needsConfig(false)
|
needsConfig(false)
|
||||||
|
@ -57,9 +55,9 @@ public:
|
||||||
Wallpaper::ResizeMethod resizeMethod, const QColor &color) const;
|
Wallpaper::ResizeMethod resizeMethod, const QColor &color) const;
|
||||||
|
|
||||||
|
|
||||||
void renderComplete(int token, const QImage &image,
|
void renderCompleted(int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
Wallpaper::ResizeMethod resizeMethod, const QColor &color);
|
Wallpaper::ResizeMethod resizeMethod, const QColor &color);
|
||||||
|
|
||||||
static WallpaperRenderThread s_renderer;
|
static WallpaperRenderThread s_renderer;
|
||||||
static PackageStructure::Ptr packageStructure;
|
static PackageStructure::Ptr packageStructure;
|
||||||
|
@ -68,9 +66,7 @@ public:
|
||||||
KPluginInfo wallpaperDescription;
|
KPluginInfo wallpaperDescription;
|
||||||
QRectF boundingRect;
|
QRectF boundingRect;
|
||||||
KServiceAction mode;
|
KServiceAction mode;
|
||||||
QColor renderColor;
|
|
||||||
int renderToken;
|
int renderToken;
|
||||||
Wallpaper::ResizeMethod renderResizeMethod;
|
|
||||||
bool cacheRendering : 1;
|
bool cacheRendering : 1;
|
||||||
bool initialized : 1;
|
bool initialized : 1;
|
||||||
bool needsConfig : 1;
|
bool needsConfig : 1;
|
||||||
|
@ -93,7 +89,7 @@ Wallpaper::Wallpaper(QObject *parentObject, const QVariantList &args)
|
||||||
setParent(parentObject);
|
setParent(parentObject);
|
||||||
|
|
||||||
connect(&WallpaperPrivate::s_renderer, SIGNAL(done(int,QImage,QString,QSize,Wallpaper::ResizeMethod,QColor)),
|
connect(&WallpaperPrivate::s_renderer, SIGNAL(done(int,QImage,QString,QSize,Wallpaper::ResizeMethod,QColor)),
|
||||||
this, SLOT(renderComplete(int,QImage,QString,QSize,Wallpaper::ResizeMethod,QColor)));
|
this, SLOT(renderCompleted(int,QImage,QString,QSize,Wallpaper::ResizeMethod,QColor)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Wallpaper::~Wallpaper()
|
Wallpaper::~Wallpaper()
|
||||||
|
@ -327,7 +323,7 @@ void Wallpaper::render(const QString &sourceImagePath, const QSize &size,
|
||||||
if (QFile::exists(cache)) {
|
if (QFile::exists(cache)) {
|
||||||
kDebug() << "loading cached wallpaper from" << cache;
|
kDebug() << "loading cached wallpaper from" << cache;
|
||||||
QImage img(cache);
|
QImage img(cache);
|
||||||
emit renderComplete(img);
|
emit renderCompleted(img);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,9 +340,9 @@ QString WallpaperPrivate::cachePath(const QString &sourceImagePath, const QSize
|
||||||
return KGlobal::dirs()->locateLocal("cache", id);
|
return KGlobal::dirs()->locateLocal("cache", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WallpaperPrivate::renderComplete(int token, const QImage &image,
|
void WallpaperPrivate::renderCompleted(int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
Wallpaper::ResizeMethod resizeMethod, const QColor &color)
|
Wallpaper::ResizeMethod resizeMethod, const QColor &color)
|
||||||
{
|
{
|
||||||
if (token != renderToken) {
|
if (token != renderToken) {
|
||||||
return;
|
return;
|
||||||
|
@ -356,7 +352,7 @@ void WallpaperPrivate::renderComplete(int token, const QImage &image,
|
||||||
image.save(cachePath(sourceImagePath, size, resizeMethod, color));
|
image.save(cachePath(sourceImagePath, size, resizeMethod, color));
|
||||||
}
|
}
|
||||||
|
|
||||||
emit q->renderComplete(image);
|
emit q->renderCompleted(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Plasma namespace
|
} // Plasma namespace
|
||||||
|
|
10
wallpaper.h
10
wallpaper.h
|
@ -289,7 +289,7 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
||||||
* Emitted when a wallpaper image render is completed.
|
* Emitted when a wallpaper image render is completed.
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
*/
|
*/
|
||||||
void renderComplete(const QImage &image);
|
void renderCompleted(const QImage &image);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
@ -326,7 +326,7 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the wallpaper asyncronously with the given parameters. When the rendering is
|
* Renders the wallpaper asyncronously with the given parameters. When the rendering is
|
||||||
* complete, the renderComplete signal is emitted.
|
* complete, the renderCompleted signal is emitted.
|
||||||
*
|
*
|
||||||
* @param sourceImagePath the path to the image file on disk. Common image formats such as
|
* @param sourceImagePath the path to the image file on disk. Common image formats such as
|
||||||
* PNG, JPEG and SVG are supported
|
* PNG, JPEG and SVG are supported
|
||||||
|
@ -354,9 +354,9 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
||||||
void setUsingDiskCache(bool useCache);
|
void setUsingDiskCache(bool useCache);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_PRIVATE_SLOT(d, void renderComplete(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,
|
||||||
Wallpaper::ResizeMethod resizeMethod, const QColor &color))
|
Wallpaper::ResizeMethod resizeMethod, const QColor &color))
|
||||||
|
|
||||||
friend class WallpaperPrivate;
|
friend class WallpaperPrivate;
|
||||||
WallpaperPrivate *const d;
|
WallpaperPrivate *const d;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user