size property nitifies the change

svn path=/trunk/KDE/kdelibs/; revision=1204363
This commit is contained in:
Marco Martin 2010-12-06 21:54:29 +00:00
parent ef8359507d
commit 38e64220da
2 changed files with 4 additions and 1 deletions

View File

@ -694,6 +694,7 @@ void Svg::resize(const QSizeF &size)
d->size = size; d->size = size;
d->localRectCache.clear(); d->localRectCache.clear();
emit sizeChanged();
} }
void Svg::resize() void Svg::resize()
@ -705,6 +706,7 @@ void Svg::resize()
d->size = d->naturalSize; d->size = d->naturalSize;
d->localRectCache.clear(); d->localRectCache.clear();
emit sizeChanged();
} }
QSize Svg::elementSize(const QString &elementId) const QSize Svg::elementSize(const QString &elementId) const

3
svg.h
View File

@ -57,7 +57,7 @@ class PLASMA_EXPORT Svg : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(ContentType) 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(bool multipleImages READ containsMultipleImages WRITE setContainsMultipleImages)
Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath) Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath)
Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache) Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache)
@ -255,6 +255,7 @@ class PLASMA_EXPORT Svg : public QObject
Q_SIGNALS: Q_SIGNALS:
void repaintNeeded(); void repaintNeeded();
void sizeChanged();
private: private:
SvgPrivate *const d; SvgPrivate *const d;