Shorcut read from settings

This commit is contained in:
marco 2015-08-08 19:41:18 +02:00
parent 644ea0482f
commit b0bf94e378
14 changed files with 353 additions and 78 deletions

View file

@ -1,5 +1,6 @@
#include "gameview.h"
#include "gamescene.h"
#include "settingscache.h"
#include <QResizeEvent>
#include <QAction>
#include <QRubberBand>
@ -19,7 +20,9 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
connect(scene, SIGNAL(sigStopRubberBand()), this, SLOT(stopRubberBand()));
aCloseMostRecentZoneView = new QAction(this);
aCloseMostRecentZoneView->setShortcut(QKeySequence("Esc"));
aCloseMostRecentZoneView->setShortcuts(settingsCache->shortcuts().getShortcut(
"GameView/aCloseMostRecentZoneView",
QKeySequence("Esc")));
connect(aCloseMostRecentZoneView, SIGNAL(triggered()), scene, SLOT(closeMostRecentZoneView()));
addAction(aCloseMostRecentZoneView);