new zone view code

This commit is contained in:
Max-Wilhelm Bruker 2010-03-08 15:55:35 +01:00
parent ad3f4ba9e8
commit 26a77d9e40
27 changed files with 474 additions and 397 deletions

View file

@ -1,4 +1,5 @@
#include "gameview.h"
#include <QAction>
GameView::GameView(QGraphicsScene *scene, QWidget *parent)
: QGraphicsView(scene, parent)
@ -7,9 +8,13 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing/* | QPainter::SmoothPixmapTransform*/);
setDragMode(RubberBandDrag);
setViewportUpdateMode(BoundingRectViewportUpdate);
setFocusPolicy(Qt::NoFocus);
connect(scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(updateSceneRect(const QRectF &)));
aCloseMostRecentZoneView = new QAction(this);
aCloseMostRecentZoneView->setShortcut(tr("Esc"));
connect(aCloseMostRecentZoneView, SIGNAL(triggered()), scene, SLOT(closeMostRecentZoneView()));
addAction(aCloseMostRecentZoneView);
}
void GameView::resizeEvent(QResizeEvent *event)