not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / plasma / shells / common / wallpaperpreview.h
blob9e67df75034dfe8f2b9c844da7791dba33aad711
1 /*
2 * Copyright 2008 Petri Damsten <damu@iki.fi>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef WALLPAPER_PREVIEW_HEADER
19 #define WALLPAPER_PREVIEW_HEADER
21 #include <QWidget>
23 namespace Plasma{
24 class Wallpaper;
25 class Svg;
28 class WallpaperPreview : public QWidget
30 Q_OBJECT
31 public:
32 WallpaperPreview(QWidget *parent = 0);
33 virtual ~WallpaperPreview();
35 void setWallpaper(Plasma::Wallpaper* wallpaper);
37 protected:
38 virtual void paintEvent(QPaintEvent* event);
39 virtual void resizeEvent(QResizeEvent* event);
41 protected slots:
42 void updateRect(const QRectF& rect);
44 private:
45 Plasma::Wallpaper* m_wallpaper;
46 Plasma::Svg* m_wallpaperOverlay;
49 #endif // WALLPAPER_PREVIEW