Print dialog: make Ctrl-Q and Ctlr-W work

All these recent commits should have included:

See #489

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-04-25 10:27:44 -07:00
parent 5eeb9ebb5d
commit 461872b7ea

View file

@ -10,6 +10,7 @@
#include <QHBoxLayout>
#include <QPrintPreviewDialog>
#include <QPrintDialog>
#include <QShortcut>
PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
{
@ -57,6 +58,11 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
setFixedSize(550, 400);
setWindowTitle(tr("Print"));
setWindowIcon(QIcon(":subsurface-icon"));
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
connect(close, SIGNAL(activated()), this, SLOT(close()));
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
connect(quit, SIGNAL(activated()), parent, SLOT(close()));
}
void PrintDialog::previewClicked(void)