mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
new zone view code
This commit is contained in:
parent
ad3f4ba9e8
commit
26a77d9e40
27 changed files with 474 additions and 397 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue