Changeset View
Changeset View
Standalone View
Standalone View
effects/cube/cube.h
Show All 20 Lines | |||||
21 | #ifndef KWIN_CUBE_H | 21 | #ifndef KWIN_CUBE_H | ||
22 | #define KWIN_CUBE_H | 22 | #define KWIN_CUBE_H | ||
23 | 23 | | |||
24 | #include <kwineffects.h> | 24 | #include <kwineffects.h> | ||
25 | #include <kwinglutils.h> | 25 | #include <kwinglutils.h> | ||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QQueue> | 27 | #include <QQueue> | ||
28 | #include <QMatrix4x4> | 28 | #include <QMatrix4x4> | ||
29 | #include <QTimeLine> | | |||
30 | #include <QFont> | 29 | #include <QFont> | ||
31 | #include "cube_inside.h" | 30 | #include "cube_inside.h" | ||
32 | #include "cube_proxy.h" | 31 | #include "cube_proxy.h" | ||
33 | 32 | | |||
34 | namespace KWin | 33 | namespace KWin | ||
35 | { | 34 | { | ||
36 | 35 | | |||
37 | class CubeEffect | 36 | class CubeEffect | ||
38 | : public Effect | 37 | : public Effect | ||
39 | { | 38 | { | ||
40 | Q_OBJECT | 39 | Q_OBJECT | ||
41 | Q_PROPERTY(qreal cubeOpacity READ configuredCubeOpacity) | 40 | Q_PROPERTY(qreal cubeOpacity READ configuredCubeOpacity) | ||
42 | Q_PROPERTY(bool opacityDesktopOnly READ isOpacityDesktopOnly) | 41 | Q_PROPERTY(bool opacityDesktopOnly READ isOpacityDesktopOnly) | ||
43 | Q_PROPERTY(bool displayDesktopName READ isDisplayDesktopName) | 42 | Q_PROPERTY(bool displayDesktopName READ isDisplayDesktopName) | ||
44 | Q_PROPERTY(bool reflection READ isReflection) | 43 | Q_PROPERTY(bool reflection READ isReflection) | ||
45 | Q_PROPERTY(int rotationDuration READ configuredRotationDuration) | 44 | Q_PROPERTY(std::chrono::milliseconds rotationDuration READ configuredRotationDuration) | ||
46 | Q_PROPERTY(QColor backgroundColor READ configuredBackgroundColor) | 45 | Q_PROPERTY(QColor backgroundColor READ configuredBackgroundColor) | ||
47 | Q_PROPERTY(QColor capColor READ configuredCapColor) | 46 | Q_PROPERTY(QColor capColor READ configuredCapColor) | ||
48 | Q_PROPERTY(bool paintCaps READ isPaintCaps) | 47 | Q_PROPERTY(bool paintCaps READ isPaintCaps) | ||
49 | Q_PROPERTY(bool closeOnMouseRelease READ isCloseOnMouseRelease) | 48 | Q_PROPERTY(bool closeOnMouseRelease READ isCloseOnMouseRelease) | ||
50 | Q_PROPERTY(qreal zPosition READ configuredZPosition) | 49 | Q_PROPERTY(qreal zPosition READ configuredZPosition) | ||
51 | Q_PROPERTY(bool useForTabBox READ isUseForTabBox) | 50 | Q_PROPERTY(bool useForTabBox READ isUseForTabBox) | ||
52 | Q_PROPERTY(bool invertKeys READ isInvertKeys) | 51 | Q_PROPERTY(bool invertKeys READ isInvertKeys) | ||
53 | Q_PROPERTY(bool invertMouse READ isInvertMouse) | 52 | Q_PROPERTY(bool invertMouse READ isInvertMouse) | ||
Show All 34 Lines | 86 | bool isOpacityDesktopOnly() const { | |||
88 | return opacityDesktopOnly; | 87 | return opacityDesktopOnly; | ||
89 | } | 88 | } | ||
90 | bool isDisplayDesktopName() const { | 89 | bool isDisplayDesktopName() const { | ||
91 | return displayDesktopName; | 90 | return displayDesktopName; | ||
92 | } | 91 | } | ||
93 | bool isReflection() const { | 92 | bool isReflection() const { | ||
94 | return reflection; | 93 | return reflection; | ||
95 | } | 94 | } | ||
96 | int configuredRotationDuration() const { | 95 | std::chrono::milliseconds configuredRotationDuration() const { | ||
97 | return rotationDuration; | 96 | return rotationDuration; | ||
98 | } | 97 | } | ||
99 | QColor configuredBackgroundColor() const { | 98 | QColor configuredBackgroundColor() const { | ||
100 | return backgroundColor; | 99 | return backgroundColor; | ||
101 | } | 100 | } | ||
102 | QColor configuredCapColor() const { | 101 | QColor configuredCapColor() const { | ||
103 | return capColor; | 102 | return capColor; | ||
104 | } | 103 | } | ||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 143 | private: | |||
199 | bool texturedCaps; | 198 | bool texturedCaps; | ||
200 | GLTexture* capTexture; | 199 | GLTexture* capTexture; | ||
201 | // animations | 200 | // animations | ||
202 | // Horizontal/start/stop | 201 | // Horizontal/start/stop | ||
203 | float startAngle; | 202 | float startAngle; | ||
204 | float currentAngle; | 203 | float currentAngle; | ||
205 | int startFrontDesktop; | 204 | int startFrontDesktop; | ||
206 | AnimationState animationState; | 205 | AnimationState animationState; | ||
207 | QTimeLine timeLine; | 206 | TimeLine timeLine; | ||
208 | QQueue<AnimationState> animations; | 207 | QQueue<AnimationState> animations; | ||
209 | // vertical | 208 | // vertical | ||
210 | float verticalStartAngle; | 209 | float verticalStartAngle; | ||
211 | float verticalCurrentAngle; | 210 | float verticalCurrentAngle; | ||
212 | VerticalAnimationState verticalAnimationState; | 211 | VerticalAnimationState verticalAnimationState; | ||
213 | QTimeLine verticalTimeLine; | 212 | TimeLine verticalTimeLine; | ||
214 | QQueue<VerticalAnimationState> verticalAnimations; | 213 | QQueue<VerticalAnimationState> verticalAnimations; | ||
215 | 214 | | |||
216 | bool reflectionPainting; | 215 | bool reflectionPainting; | ||
217 | int rotationDuration; | 216 | std::chrono::milliseconds rotationDuration; | ||
218 | int activeScreen; | 217 | int activeScreen; | ||
219 | bool bottomCap; | 218 | bool bottomCap; | ||
220 | bool closeOnMouseRelease; | 219 | bool closeOnMouseRelease; | ||
221 | float zoom; | 220 | float zoom; | ||
222 | float zPosition; | 221 | float zPosition; | ||
223 | bool useForTabBox; | 222 | bool useForTabBox; | ||
224 | bool invertKeys; | 223 | bool invertKeys; | ||
225 | bool invertMouse; | 224 | bool invertMouse; | ||
Show All 39 Lines |