Changeset View
Changeset View
Standalone View
Standalone View
effects/coverswitch/coverswitch.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef KWIN_COVERSWITCH_H | 21 | #ifndef KWIN_COVERSWITCH_H | ||
22 | #define KWIN_COVERSWITCH_H | 22 | #define KWIN_COVERSWITCH_H | ||
23 | 23 | | |||
24 | #include <QHash> | 24 | #include <QHash> | ||
25 | #include <QRect> | 25 | #include <QRect> | ||
26 | #include <QRegion> | 26 | #include <QRegion> | ||
27 | #include <QSize> | 27 | #include <QSize> | ||
28 | #include <QTimeLine> | | |||
29 | #include <QFont> | 28 | #include <QFont> | ||
30 | #include <QQueue> | 29 | #include <QQueue> | ||
31 | 30 | | |||
32 | #include <kwineffects.h> | 31 | #include <kwineffects.h> | ||
33 | #include <kwinglutils.h> | 32 | #include <kwinglutils.h> | ||
34 | 33 | | |||
35 | namespace KWin | 34 | namespace KWin | ||
36 | { | 35 | { | ||
Show All 23 Lines | 51 | public: | |||
60 | virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); | 59 | virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); | ||
61 | virtual void windowInputMouseEvent(QEvent* e); | 60 | virtual void windowInputMouseEvent(QEvent* e); | ||
62 | virtual bool isActive() const; | 61 | virtual bool isActive() const; | ||
63 | 62 | | |||
64 | static bool supported(); | 63 | static bool supported(); | ||
65 | 64 | | |||
66 | // for properties | 65 | // for properties | ||
67 | int configuredAnimationDuration() const { | 66 | int configuredAnimationDuration() const { | ||
68 | return animationDuration; | 67 | return animationDuration.count(); | ||
69 | } | 68 | } | ||
70 | bool isAnimateSwitch() const { | 69 | bool isAnimateSwitch() const { | ||
71 | return animateSwitch; | 70 | return animateSwitch; | ||
72 | } | 71 | } | ||
73 | bool isAnimateStart() const { | 72 | bool isAnimateStart() const { | ||
74 | return animateStart; | 73 | return animateStart; | ||
75 | } | 74 | } | ||
76 | bool isAnimateStop() const { | 75 | bool isAnimateStop() const { | ||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 105 | private: | |||
126 | bool animateStart; | 125 | bool animateStart; | ||
127 | bool animateStop; | 126 | bool animateStop; | ||
128 | bool animation; | 127 | bool animation; | ||
129 | bool start; | 128 | bool start; | ||
130 | bool stop; | 129 | bool stop; | ||
131 | bool reflection; | 130 | bool reflection; | ||
132 | float mirrorColor[2][4]; | 131 | float mirrorColor[2][4]; | ||
133 | bool windowTitle; | 132 | bool windowTitle; | ||
134 | int animationDuration; | 133 | std::chrono::milliseconds animationDuration; | ||
135 | bool stopRequested; | 134 | bool stopRequested; | ||
136 | bool startRequested; | 135 | bool startRequested; | ||
137 | QTimeLine timeLine; | 136 | TimeLine timeLine; | ||
138 | QRect area; | 137 | QRect area; | ||
139 | float zPosition; | 138 | float zPosition; | ||
140 | float scaleFactor; | 139 | float scaleFactor; | ||
141 | enum Direction { | 140 | enum Direction { | ||
142 | Left, | 141 | Left, | ||
143 | Right | 142 | Right | ||
144 | }; | 143 | }; | ||
145 | Direction direction; | 144 | Direction direction; | ||
Show All 22 Lines |