Changeset View
Changeset View
Standalone View
Standalone View
effects/slide/slide.h
Show All 37 Lines | 33 | { | |||
---|---|---|---|---|---|
38 | Q_PROPERTY(bool slideDocks READ slideDocks) | 38 | Q_PROPERTY(bool slideDocks READ slideDocks) | ||
39 | Q_PROPERTY(bool slideBackground READ slideBackground) | 39 | Q_PROPERTY(bool slideBackground READ slideBackground) | ||
40 | 40 | | |||
41 | public: | 41 | public: | ||
42 | SlideEffect(); | 42 | SlideEffect(); | ||
43 | 43 | | |||
44 | void reconfigure(ReconfigureFlags) override; | 44 | void reconfigure(ReconfigureFlags) override; | ||
45 | 45 | | |||
46 | void prePaintScreen(ScreenPrePaintData& data, int time) override; | 46 | void prePaintScreen(ScreenPrePaintData &data, int time) override; | ||
47 | void paintScreen(int mask, QRegion region, ScreenPaintData& data) override; | 47 | void paintScreen(int mask, QRegion region, ScreenPaintData &data) override; | ||
48 | void postPaintScreen() override; | 48 | void postPaintScreen() override; | ||
49 | 49 | | |||
50 | void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override; | 50 | void prePaintWindow(EffectWindow *w, WindowPrePaintData &data, int time) override; | ||
51 | void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override; | 51 | void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data) override; | ||
52 | 52 | | |||
53 | bool isActive() const override { | 53 | bool isActive() const override { | ||
54 | return m_active; | 54 | return m_active; | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | int requestedEffectChainPosition() const override { | 57 | int requestedEffectChainPosition() const override { | ||
58 | return 50; | 58 | return 50; | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | static bool supported(); | 61 | static bool supported(); | ||
62 | 62 | | |||
63 | int duration() const; | 63 | int duration() const; | ||
64 | int horizontalGap() const; | 64 | int horizontalGap() const; | ||
65 | int verticalGap() const; | 65 | int verticalGap() const; | ||
66 | bool slideDocks() const; | 66 | bool slideDocks() const; | ||
67 | bool slideBackground() const; | 67 | bool slideBackground() const; | ||
68 | 68 | | |||
69 | private Q_SLOTS: | 69 | private Q_SLOTS: | ||
70 | void desktopChanged(int old, int current, EffectWindow* with); | 70 | void desktopChanged(int old, int current, EffectWindow *with); | ||
71 | void windowAdded(EffectWindow* w); | 71 | void windowAdded(EffectWindow *w); | ||
72 | void windowDeleted(EffectWindow* w); | 72 | void windowDeleted(EffectWindow *w); | ||
73 | 73 | | |||
74 | void numberDesktopsChanged(uint old); | 74 | void numberDesktopsChanged(uint old); | ||
75 | void numberScreensChanged(); | 75 | void numberScreensChanged(); | ||
76 | 76 | | |||
77 | private: | 77 | private: | ||
78 | QPoint desktopCoords(int id) const; | 78 | QPoint desktopCoords(int id) const; | ||
79 | QRect desktopGeometry(int id) const; | 79 | QRect desktopGeometry(int id) const; | ||
80 | int workspaceWidth() const; | 80 | int workspaceWidth() const; | ||
81 | int workspaceHeight() const; | 81 | int workspaceHeight() const; | ||
82 | 82 | | |||
83 | bool isTranslated(const EffectWindow* w) const; | 83 | bool isTranslated(const EffectWindow *w) const; | ||
84 | bool isPainted(const EffectWindow* w) const; | 84 | bool isPainted(const EffectWindow *w) const; | ||
85 | 85 | | |||
86 | bool shouldForceBlur(const EffectWindow* w) const; | 86 | bool shouldForceBlur(const EffectWindow *w) const; | ||
87 | bool shouldForceBackgroundContrast(const EffectWindow* w) const; | 87 | bool shouldForceBackgroundContrast(const EffectWindow *w) const; | ||
88 | bool shouldElevate(const EffectWindow* w) const; | 88 | bool shouldElevate(const EffectWindow *w) const; | ||
89 | 89 | | |||
90 | void start(int old, int current, EffectWindow* movingWindow = nullptr); | 90 | void start(int old, int current, EffectWindow *movingWindow = nullptr); | ||
91 | void stop(); | 91 | void stop(); | ||
92 | 92 | | |||
93 | private: | 93 | private: | ||
94 | int m_hGap; | 94 | int m_hGap; | ||
95 | int m_vGap; | 95 | int m_vGap; | ||
96 | bool m_slideDocks; | 96 | bool m_slideDocks; | ||
97 | bool m_slideBackground; | 97 | bool m_slideBackground; | ||
98 | 98 | | |||
99 | bool m_active = false; | 99 | bool m_active = false; | ||
100 | TimeLine m_timeLine; | 100 | TimeLine m_timeLine; | ||
101 | QPoint m_startPos; | 101 | QPoint m_startPos; | ||
102 | QPoint m_diff; | 102 | QPoint m_diff; | ||
103 | EffectWindow* m_movingWindow = nullptr; | 103 | EffectWindow *m_movingWindow = nullptr; | ||
104 | 104 | | |||
105 | struct { | 105 | struct { | ||
106 | int desktop; | 106 | int desktop; | ||
107 | bool firstPass; | 107 | bool firstPass; | ||
108 | bool lastPass; | 108 | bool lastPass; | ||
109 | QPoint translation; | 109 | QPoint translation; | ||
110 | 110 | | |||
111 | EffectWindowList fullscreenWindows; | 111 | EffectWindowList fullscreenWindows; | ||
Show All 38 Lines |