From 38e64220da41489a002c039f00071f90539f2161 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 6 Dec 2010 21:54:29 +0000 Subject: [PATCH] size property nitifies the change svn path=/trunk/KDE/kdelibs/; revision=1204363 --- svg.cpp | 2 ++ svg.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/svg.cpp b/svg.cpp index f016f4f2f..f7564c1fb 100644 --- a/svg.cpp +++ b/svg.cpp @@ -694,6 +694,7 @@ void Svg::resize(const QSizeF &size) d->size = size; d->localRectCache.clear(); + emit sizeChanged(); } void Svg::resize() @@ -705,6 +706,7 @@ void Svg::resize() d->size = d->naturalSize; d->localRectCache.clear(); + emit sizeChanged(); } QSize Svg::elementSize(const QString &elementId) const diff --git a/svg.h b/svg.h index 9942bc50f..0d4d15b01 100644 --- a/svg.h +++ b/svg.h @@ -57,7 +57,7 @@ class PLASMA_EXPORT Svg : public QObject { Q_OBJECT Q_ENUMS(ContentType) - Q_PROPERTY(QSize size READ size WRITE resize) + Q_PROPERTY(QSize size READ size WRITE resize NOTIFY sizeChanged) Q_PROPERTY(bool multipleImages READ containsMultipleImages WRITE setContainsMultipleImages) Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath) Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache) @@ -255,6 +255,7 @@ class PLASMA_EXPORT Svg : public QObject Q_SIGNALS: void repaintNeeded(); + void sizeChanged(); private: SvgPrivate *const d;