Make class Scene inherit from QObject
The class Scene now inherits from QObject and has the Q_OBJECT macro. The inheriting classes SceneOpenGL and SceneXRender are provided with the Q_OBJECT macro. Now it is possible to use signals and slots and replace direct method calls.
This commit is contained in:
parent
903bcb42fb
commit
d88cb00b0b
4 changed files with 6 additions and 2 deletions
|
@ -91,7 +91,8 @@ namespace KWin
|
|||
Scene* scene = 0;
|
||||
|
||||
Scene::Scene(Workspace* ws)
|
||||
: wspace(ws)
|
||||
: QObject(ws)
|
||||
, wspace(ws)
|
||||
, has_waitSync(false)
|
||||
, lanczos_filter(new LanczosFilter())
|
||||
{
|
||||
|
|
3
scene.h
3
scene.h
|
@ -38,8 +38,9 @@ class LanczosFilter;
|
|||
class Shadow;
|
||||
|
||||
// The base class for compositing backends.
|
||||
class Scene
|
||||
class Scene : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Scene(Workspace* ws);
|
||||
virtual ~Scene() = 0;
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace KWin
|
|||
class SceneOpenGL
|
||||
: public Scene
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
class EffectFrame;
|
||||
class Texture;
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace KWin
|
|||
class SceneXrender
|
||||
: public Scene
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
class EffectFrame;
|
||||
SceneXrender(Workspace* ws);
|
||||
|
|
Loading…
Reference in a new issue