File indexing completed on 2024-05-12 08:00:36
0001 /* 0002 * Copyright (C) 1995 Paul Olav Tvete <paul@troll.no> 0003 * Copyright (C) 2000-2008 Stephan Kulow <coolo@kde.org> 0004 * Copyright (C) 2009 Parker Coates <coates@kde.org> 0005 * 0006 * License of original code: 0007 * ------------------------------------------------------------------------- 0008 * Permission to use, copy, modify, and distribute this software and its 0009 * documentation for any purpose and without fee is hereby granted, 0010 * provided that the above copyright notice appear in all copies and that 0011 * both that copyright notice and this permission notice appear in 0012 * supporting documentation. 0013 * 0014 * This file is provided AS IS with no warranties of any kind. The author 0015 * shall have no liability with respect to the infringement of copyrights, 0016 * trade secrets or any patents by this file or any part thereof. In no 0017 * event will the author be liable for any lost revenue or profits or 0018 * other special, indirect and consequential damages. 0019 * ------------------------------------------------------------------------- 0020 * 0021 * License of modifications/additions made after 2009-01-01: 0022 * ------------------------------------------------------------------------- 0023 * This program is free software; you can redistribute it and/or 0024 * modify it under the terms of the GNU General Public License as 0025 * published by the Free Software Foundation; either version 2 of 0026 * the License, or (at your option) any later version. 0027 * 0028 * This program is distributed in the hope that it will be useful, 0029 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0031 * GNU General Public License for more details. 0032 * 0033 * You should have received a copy of the GNU General Public License 0034 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0035 * ------------------------------------------------------------------------- 0036 */ 0037 0038 #ifndef VIEW_H 0039 #define VIEW_H 0040 0041 // KDEGames 0042 #include <KGameRendererClient> 0043 // Qt 0044 #include <QGraphicsView> 0045 0046 class PatienceView : public QGraphicsView, public KGameRendererClient 0047 { 0048 public: 0049 explicit PatienceView(QWidget *parent); 0050 virtual ~PatienceView(); 0051 0052 void setScene(QGraphicsScene *scene); 0053 0054 protected: 0055 void resizeEvent(QResizeEvent *e) override; 0056 void drawBackground(QPainter *painter, const QRectF &rect) override; 0057 void receivePixmap(const QPixmap &pixmap) override; 0058 0059 private: 0060 void updateSceneSize(); 0061 0062 QPixmap m_background; 0063 }; 0064 0065 #endif