Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kwin / effects / thumbnailaside.h
blobd0b89f9885f4a62a4816368d2c49e6d3a2973c9a
1 /********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
5 Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
6 Copyright (C) 2007 Christian Nitschkowski <christian.nitschkowski@kdemail.net>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *********************************************************************/
24 Testing of painting a window more than once.
28 #ifndef KWIN_THUMBNAILASIDE_H
29 #define KWIN_THUMBNAILASIDE_H
31 #include <kwineffects.h>
33 #include <qhash.h>
35 namespace KWin
38 class ThumbnailAsideEffect
39 : public QObject
40 , public Effect
42 Q_OBJECT
43 public:
44 ThumbnailAsideEffect();
45 virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
46 virtual void windowDamaged( EffectWindow* w, const QRect& damage );
47 virtual void windowGeometryShapeChanged( EffectWindow* w, const QRect& old );
48 virtual void windowClosed( EffectWindow* w );
49 private slots:
50 void toggleCurrentThumbnail();
51 private:
52 void addThumbnail( EffectWindow* w );
53 void removeThumbnail( EffectWindow* w );
54 void arrange();
55 void repaintAll();
56 struct Data
58 EffectWindow* window; // the same like the key in the hash (makes code simpler)
59 int index;
60 QRect rect;
62 QHash< EffectWindow*, Data > windows;
63 int maxwidth;
64 int spacing;
65 double opacity;
66 int screen;
69 } // namespace
71 #endif