1/*
2 * Copyright (C) 1995 Paul Olav Tvete <paul@troll.no>
3 * Copyright (C) 2000-2008 Stephan Kulow <coolo@kde.org>
4 * Copyright (C) 2009 Parker Coates <coates@kde.org>
5 *
6 * License of original code:
7 * -------------------------------------------------------------------------
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation for any purpose and without fee is hereby granted,
10 * provided that the above copyright notice appear in all copies and that
11 * both that copyright notice and this permission notice appear in
12 * supporting documentation.
13 *
14 * This file is provided AS IS with no warranties of any kind. The author
15 * shall have no liability with respect to the infringement of copyrights,
16 * trade secrets or any patents by this file or any part thereof. In no
17 * event will the author be liable for any lost revenue or profits or
18 * other special, indirect and consequential damages.
19 * -------------------------------------------------------------------------
20 *
21 * License of modifications/additions made after 2009-01-01:
22 * -------------------------------------------------------------------------
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License as
25 * published by the Free Software Foundation; either version 2 of
26 * the License, or (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
35 * -------------------------------------------------------------------------
36 */
37
38#ifndef VIEW_H
39#define VIEW_H
40
41#include <KGameRendererClient>
42
43#include <QtGui/QGraphicsView>
44
45
46class PatienceView: public QGraphicsView, public KGameRendererClient
47{
48public:
49 PatienceView ( QWidget * parent );
50 virtual ~PatienceView();
51
52 void setScene( QGraphicsScene * scene );
53
54protected:
55 virtual void resizeEvent( QResizeEvent * e );
56 virtual void drawBackground( QPainter * painter, const QRectF & rect );
57 virtual void receivePixmap( const QPixmap & pixmap );
58
59private:
60 void updateSceneSize();
61
62 QPixmap m_background;
63};
64
65#endif
66