not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kwin / effects / thumbnailaside.h
blobd0ad1f15407d7d23e1bb6e0b609f6c2bfcad71d5
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 reconfigure( ReconfigureFlags );
46 virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
47 virtual void windowDamaged( EffectWindow* w, const QRect& damage );
48 virtual void windowGeometryShapeChanged( EffectWindow* w, const QRect& old );
49 virtual void windowClosed( EffectWindow* w );
50 private slots:
51 void toggleCurrentThumbnail();
52 private:
53 void addThumbnail( EffectWindow* w );
54 void removeThumbnail( EffectWindow* w );
55 void arrange();
56 void repaintAll();
57 struct Data
59 EffectWindow* window; // the same like the key in the hash (makes code simpler)
60 int index;
61 QRect rect;
63 QHash< EffectWindow*, Data > windows;
64 int maxwidth;
65 int spacing;
66 double opacity;
67 int screen;
70 } // namespace
72 #endif