1/*
2Copyright (c) 2006, 2007, Nicolas Roffet, <nicolas-kde@roffet.com>
3
4This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
5
6This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7
8You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
9*/
10
11#ifndef KBBLEVELCONFIGURATIONPREVIEW_H
12#define KBBLEVELCONFIGURATIONPREVIEW_H
13
14
15
16#include <QGraphicsView>
17#include <QList>
18
19
20class KBBGraphicsItem;
21class KBBGraphicsItemBlackBox;
22class KBBThemeManager;
23
24
25
26/**
27 * @brief Widget with the preview of the field in the configuration widget
28 */
29class KBBLevelConfigurationPreview : public QGraphicsView
30{
31 Q_OBJECT
32
33 public:
34 KBBLevelConfigurationPreview(QWidget *parent, KBBThemeManager* themeManager);
35
36
37 public slots:
38 void preview(int balls, int columns, int rows);
39
40
41 protected:
42 void drawBackground(QPainter* painter, const QRectF&);
43
44
45 private:
46 QGraphicsView* m_view;
47 QList<KBBGraphicsItem*> m_balls;
48 KBBGraphicsItemBlackBox* m_blackbox;
49 KBBThemeManager* m_themeManager;
50
51
52 private slots:
53 void resizeEvent(QResizeEvent*);
54};
55
56
57#endif //KSIMILILEVELCONFIGURATIONPREVIEW_H
58