~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/effects/_test/demo_shakymove.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************
 
2
 KWin - the KDE window manager
 
3
 This file is part of the KDE project.
 
4
 
 
5
Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org>
 
6
 
 
7
You can Freely distribute this program under the GNU General Public
 
8
License. See the file "COPYING" for the exact licensing terms.
 
9
******************************************************************/
 
10
 
 
11
#ifndef DEMO_SHAKYMOVE_H
 
12
#define DEMO_SHAKYMOVE_H
 
13
 
 
14
#include <qtimer.h>
 
15
 
 
16
#include <kwineffects.h>
 
17
 
 
18
namespace KWin
 
19
{
 
20
 
 
21
class ShakyMoveEffect
 
22
    : public QObject, public Effect
 
23
{
 
24
    Q_OBJECT
 
25
public:
 
26
    ShakyMoveEffect();
 
27
    virtual void prePaintScreen(ScreenPrePaintData& data, int time);
 
28
    virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
 
29
    virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
 
30
    virtual void windowUserMovedResized(EffectWindow* c, bool first, bool last);
 
31
    virtual void windowClosed(EffectWindow* c);
 
32
private slots:
 
33
    void tick();
 
34
private:
 
35
    QHash< const EffectWindow*, int > windows;
 
36
    QTimer timer;
 
37
};
 
38
 
 
39
} // namespace
 
40
 
 
41
#endif // DEMO_SHAKYMOVE_H