Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwincompositing/compositing.h
Show All 18 Lines | |||||
19 | **************************************************************************/ | 19 | **************************************************************************/ | ||
20 | 20 | | |||
21 | 21 | | |||
22 | #ifndef COMPOSITING_H | 22 | #ifndef COMPOSITING_H | ||
23 | #define COMPOSITING_H | 23 | #define COMPOSITING_H | ||
24 | 24 | | |||
25 | #include <QAbstractItemModel> | 25 | #include <QAbstractItemModel> | ||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <KSharedConfig> | ||||
27 | 28 | | |||
28 | class OrgKdeKwinCompositingInterface; | 29 | class OrgKdeKwinCompositingInterface; | ||
29 | 30 | | |||
30 | namespace KWin { | 31 | namespace KWin { | ||
31 | namespace Compositing { | 32 | namespace Compositing { | ||
32 | 33 | | |||
33 | class OpenGLPlatformInterfaceModel; | 34 | class OpenGLPlatformInterfaceModel; | ||
34 | 35 | | |||
Show All 13 Lines | 37 | { | |||
48 | Q_PROPERTY(bool windowsBlockCompositing READ windowsBlockCompositing WRITE setWindowsBlockCompositing NOTIFY windowsBlockCompositingChanged) | 49 | Q_PROPERTY(bool windowsBlockCompositing READ windowsBlockCompositing WRITE setWindowsBlockCompositing NOTIFY windowsBlockCompositingChanged) | ||
49 | Q_PROPERTY(bool compositingRequired READ compositingRequired CONSTANT) | 50 | Q_PROPERTY(bool compositingRequired READ compositingRequired CONSTANT) | ||
50 | public: | 51 | public: | ||
51 | explicit Compositing(QObject *parent = 0); | 52 | explicit Compositing(QObject *parent = 0); | ||
52 | 53 | | |||
53 | Q_INVOKABLE bool OpenGLIsUnsafe() const; | 54 | Q_INVOKABLE bool OpenGLIsUnsafe() const; | ||
54 | Q_INVOKABLE bool OpenGLIsBroken(); | 55 | Q_INVOKABLE bool OpenGLIsBroken(); | ||
55 | Q_INVOKABLE void reenableOpenGLDetection(); | 56 | Q_INVOKABLE void reenableOpenGLDetection(); | ||
56 | int animationSpeed() const; | 57 | qreal animationSpeed() const; | ||
57 | int windowThumbnail() const; | 58 | int windowThumbnail() const; | ||
58 | int glScaleFilter() const; | 59 | int glScaleFilter() const; | ||
59 | bool xrScaleFilter() const; | 60 | bool xrScaleFilter() const; | ||
60 | int glSwapStrategy() const; | 61 | int glSwapStrategy() const; | ||
61 | int compositingType() const; | 62 | int compositingType() const; | ||
62 | bool compositingEnabled() const; | 63 | bool compositingEnabled() const; | ||
63 | int openGLPlatformInterface() const; | 64 | int openGLPlatformInterface() const; | ||
64 | bool windowsBlockCompositing() const; | 65 | bool windowsBlockCompositing() const; | ||
65 | bool compositingRequired() const; | 66 | bool compositingRequired() const; | ||
66 | 67 | | |||
67 | OpenGLPlatformInterfaceModel *openGLPlatformInterfaceModel() const; | 68 | OpenGLPlatformInterfaceModel *openGLPlatformInterfaceModel() const; | ||
68 | 69 | | |||
69 | void setAnimationSpeed(int speed); | 70 | void setAnimationSpeed(qreal speed); | ||
70 | void setWindowThumbnail(int index); | 71 | void setWindowThumbnail(int index); | ||
71 | void setGlScaleFilter(int index); | 72 | void setGlScaleFilter(int index); | ||
72 | void setXrScaleFilter(bool filter); | 73 | void setXrScaleFilter(bool filter); | ||
73 | void setGlSwapStrategy(int strategy); | 74 | void setGlSwapStrategy(int strategy); | ||
74 | void setCompositingType(int index); | 75 | void setCompositingType(int index); | ||
75 | void setCompositingEnabled(bool enalbed); | 76 | void setCompositingEnabled(bool enalbed); | ||
76 | void setOpenGLPlatformInterface(int interface); | 77 | void setOpenGLPlatformInterface(int interface); | ||
77 | void setWindowsBlockCompositing(bool set); | 78 | void setWindowsBlockCompositing(bool set); | ||
78 | 79 | | |||
79 | void save(); | 80 | void save(); | ||
80 | 81 | | |||
82 | static bool isRunningPlasma(); | ||||
83 | | ||||
81 | public Q_SLOTS: | 84 | public Q_SLOTS: | ||
82 | void reset(); | 85 | void reset(); | ||
83 | void defaults(); | 86 | void defaults(); | ||
84 | 87 | | |||
85 | Q_SIGNALS: | 88 | Q_SIGNALS: | ||
86 | void changed(); | 89 | void changed(); | ||
87 | void animationSpeedChanged(int); | 90 | void animationSpeedChanged(qreal); | ||
88 | void windowThumbnailChanged(int); | 91 | void windowThumbnailChanged(int); | ||
89 | void glScaleFilterChanged(int); | 92 | void glScaleFilterChanged(int); | ||
90 | void xrScaleFilterChanged(int); | 93 | void xrScaleFilterChanged(int); | ||
91 | void glSwapStrategyChanged(int); | 94 | void glSwapStrategyChanged(int); | ||
92 | void compositingTypeChanged(int); | 95 | void compositingTypeChanged(int); | ||
93 | void compositingEnabledChanged(bool); | 96 | void compositingEnabledChanged(bool); | ||
94 | void openGLPlatformInterfaceChanged(int); | 97 | void openGLPlatformInterfaceChanged(int); | ||
95 | void windowsBlockCompositingChanged(bool); | 98 | void windowsBlockCompositingChanged(bool); | ||
96 | 99 | | |||
97 | private: | 100 | private: | ||
98 | int m_animationSpeed; | 101 | qreal m_animationSpeed; | ||
99 | int m_windowThumbnail; | 102 | int m_windowThumbnail; | ||
100 | int m_glScaleFilter; | 103 | int m_glScaleFilter; | ||
101 | bool m_xrScaleFilter; | 104 | bool m_xrScaleFilter; | ||
102 | int m_glSwapStrategy; | 105 | int m_glSwapStrategy; | ||
103 | int m_compositingType; | 106 | int m_compositingType; | ||
104 | bool m_compositingEnabled; | 107 | bool m_compositingEnabled; | ||
105 | bool m_changed; | 108 | bool m_changed; | ||
106 | OpenGLPlatformInterfaceModel *m_openGLPlatformInterfaceModel; | 109 | OpenGLPlatformInterfaceModel *m_openGLPlatformInterfaceModel; | ||
107 | int m_openGLPlatformInterface; | 110 | int m_openGLPlatformInterface; | ||
108 | bool m_windowsBlockCompositing; | 111 | bool m_windowsBlockCompositing; | ||
109 | bool m_windowsBlockingCompositing; | 112 | bool m_windowsBlockingCompositing; | ||
110 | OrgKdeKwinCompositingInterface *m_compositingInterface; | 113 | OrgKdeKwinCompositingInterface *m_compositingInterface; | ||
114 | KSharedConfigPtr m_config; | ||||
111 | }; | 115 | }; | ||
112 | 116 | | |||
113 | 117 | | |||
114 | struct CompositingData; | 118 | struct CompositingData; | ||
115 | 119 | | |||
116 | class CompositingType : public QAbstractItemModel | 120 | class CompositingType : public QAbstractItemModel | ||
117 | { | 121 | { | ||
118 | 122 | | |||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |