Changeset View
Changeset View
Standalone View
Standalone View
effects/thumbnailaside/thumbnailaside.h
Show All 39 Lines | |||||
40 | { | 40 | { | ||
41 | Q_OBJECT | 41 | Q_OBJECT | ||
42 | Q_PROPERTY(int maxWidth READ configuredMaxWidth) | 42 | Q_PROPERTY(int maxWidth READ configuredMaxWidth) | ||
43 | Q_PROPERTY(int spacing READ configuredSpacing) | 43 | Q_PROPERTY(int spacing READ configuredSpacing) | ||
44 | Q_PROPERTY(qreal opacity READ configuredOpacity) | 44 | Q_PROPERTY(qreal opacity READ configuredOpacity) | ||
45 | Q_PROPERTY(int screen READ configuredScreen) | 45 | Q_PROPERTY(int screen READ configuredScreen) | ||
46 | public: | 46 | public: | ||
47 | ThumbnailAsideEffect(); | 47 | ThumbnailAsideEffect(); | ||
48 | virtual void reconfigure(ReconfigureFlags); | 48 | void reconfigure(ReconfigureFlags) override; | ||
49 | virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data); | 49 | void paintScreen(int mask, QRegion region, ScreenPaintData& data) override; | ||
50 | virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data); | 50 | void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override; | ||
51 | 51 | | |||
52 | // for properties | 52 | // for properties | ||
53 | int configuredMaxWidth() const { | 53 | int configuredMaxWidth() const { | ||
54 | return maxwidth; | 54 | return maxwidth; | ||
55 | } | 55 | } | ||
56 | int configuredSpacing() const { | 56 | int configuredSpacing() const { | ||
57 | return spacing; | 57 | return spacing; | ||
58 | } | 58 | } | ||
59 | qreal configuredOpacity() const { | 59 | qreal configuredOpacity() const { | ||
60 | return opacity; | 60 | return opacity; | ||
61 | } | 61 | } | ||
62 | int configuredScreen() const { | 62 | int configuredScreen() const { | ||
63 | return screen; | 63 | return screen; | ||
64 | } | 64 | } | ||
65 | private Q_SLOTS: | 65 | private Q_SLOTS: | ||
66 | void toggleCurrentThumbnail(); | 66 | void toggleCurrentThumbnail(); | ||
67 | void slotWindowClosed(KWin::EffectWindow *w); | 67 | void slotWindowClosed(KWin::EffectWindow *w); | ||
68 | void slotWindowGeometryShapeChanged(KWin::EffectWindow *w, const QRect &old); | 68 | void slotWindowGeometryShapeChanged(KWin::EffectWindow *w, const QRect &old); | ||
69 | void slotWindowDamaged(KWin::EffectWindow* w, const QRect& damage); | 69 | void slotWindowDamaged(KWin::EffectWindow* w, const QRect& damage); | ||
70 | virtual bool isActive() const; | 70 | bool isActive() const override; | ||
71 | void repaintAll(); | 71 | void repaintAll(); | ||
72 | private: | 72 | private: | ||
73 | void addThumbnail(EffectWindow* w); | 73 | void addThumbnail(EffectWindow* w); | ||
74 | void removeThumbnail(EffectWindow* w); | 74 | void removeThumbnail(EffectWindow* w); | ||
75 | void arrange(); | 75 | void arrange(); | ||
76 | struct Data { | 76 | struct Data { | ||
77 | EffectWindow* window; // the same like the key in the hash (makes code simpler) | 77 | EffectWindow* window; // the same like the key in the hash (makes code simpler) | ||
78 | int index; | 78 | int index; | ||
Show All 13 Lines |