Merge remote-tracking branch 'origin/KDE/4.8'
This commit is contained in:
commit
337e86b82c
15
svg.h
15
svg.h
@ -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:
|
||||
|
8
theme.h
8
theme.h
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user