Use player name in the KScoreDialog
[kdegames.git] / killbots / view.cpp
blob89ff108c0ddc995d8c9d5406c4da2b4915c2f21b
1 /*
2 * Copyright 2007-2009 Parker Coates <parker.coates@gmail.com>
4 * This file is part of Killbots.
6 * Killbots 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 * Killbots 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
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Killbots. If not, see <http://www.gnu.org/licenses/>.
20 #include "view.h"
22 #include <QtGui/QResizeEvent>
25 Killbots::View::View( QGraphicsScene * scene, QWidget * parent )
26 : QGraphicsView( scene, parent )
28 setMinimumSize( QSize( 300, 200 ) );
29 setFrameShape( QFrame::NoFrame );
30 setBackgroundRole( QPalette::Window );
32 setCacheMode( QGraphicsView::CacheBackground );
33 setViewportUpdateMode( QGraphicsView::SmartViewportUpdate );
35 // Including QGraphicsView::DontAdjustForAntialiasing here sometimes caused
36 // painting traces in certain situations like pushing junkheaps.
37 setOptimizationFlags( QGraphicsView::DontClipPainter | QGraphicsView::DontSavePainterState );
41 Killbots::View::~View()
46 void Killbots::View::resizeEvent( QResizeEvent * event )
48 emit sizeChanged( event->size() );
49 QGraphicsView::resizeEvent( event );
52 #include "moc_view.cpp"