Merge remote-tracking branch 'origin/KDE/4.8'

This commit is contained in:
David Faure 2012-02-13 12:28:14 +01:00
commit 337e86b82c
2 changed files with 21 additions and 2 deletions

15
svg.h
View File

@ -360,7 +360,22 @@ class PLASMA_EXPORT Svg : public QObject
Theme *theme() const;
Q_SIGNALS:
/**
* Emitted whenever the SVG data has changed in such a way that a repaint is required.
* Any usage of an Svg object that does the painting itself must connect to this signal
* and respond by updating the painting. Note that connected to Theme::themeChanged is
* incorrect in such a use case as the Svg itself may not be updated yet nor may theme
* change be the only case when a repaint is needed. Also note that classes or QML code
* which take Svg objects as parameters for their own painting all respond to this signal
* so that in those cases manually responding to the signal is unnecessary; ONLY when
* direct, manual painting with an Svg object is done in application code is this signal
* used.
*/
void repaintNeeded();
/**
* Emitted whenever the size of the Svg is changed. @see resize()
*/
void sizeChanged();
private:

View File

@ -386,8 +386,12 @@ class PLASMA_EXPORT Theme : public QObject
Q_SIGNALS:
/**
* Emitted when the user changes the theme. SVGs should be reloaded at
* that point
* Emitted when the user changes the theme. Stylesheet usage, colors, etc. should
* be updated at this point. However, SVGs should *not* be repainted in response
* to this signal; connect to Svg::repaintNeeded() instead for that, as Svg objects
* need repainting not only when themeChanged() is emitted; moreover Svg objects
* connect to and respond appropriately to themeChanged() internally, emitting
* Svg::repaintNeeded() at an appropriate time.
*/
void themeChanged();