3 Copyright (C) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
4 Copyright (C) 2002,2004 Oswald Buddenhagen <ossi@kde.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
23 #ifndef __KDM_KROOTIMAGE_H__
24 #define __KDM_KROOTIMAGE_H__
28 #include <QApplication>
32 * In xinerama mode, each screen is rendered separately by KBackgroundRenderer.
33 * This class controls a set of renderers for a desktop, and collates the
34 * images. Usage is similar to KBackgroundRenderer: connect to the imageDone
37 class KVirtualBGRenderer
: public QObject
41 explicit KVirtualBGRenderer(const KSharedConfigPtr
&config
);
42 ~KVirtualBGRenderer();
44 KBackgroundRenderer
* renderer( unsigned screen
);
45 unsigned numRenderers() const { return m_numRenderers
; }
49 bool needProgramUpdate();
52 bool needWallpaperChange();
53 void changeWallpaper();
55 void desktopResized();
57 void load( bool reparseConfig
= true );
62 void enableTiling( bool enable
);
68 void screenDone( int screen
);
71 QSize
renderSize( int screen
); // the size the renderer should be
74 KSharedConfigPtr m_pConfig
;
78 bool m_bDrawBackgroundPerScreen
;
82 QVector
<bool> m_bFinished
;
83 QVector
<KBackgroundRenderer
*> m_renderer
;
87 class MyApplication
: public QApplication
92 MyApplication( const char *conf
, int argc
, char **argv
);
99 KVirtualBGRenderer renderer
;
103 #endif // __KDM_KROOTIMAGE_H__