mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
5eeb9ebb5d
commit
461872b7ea
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QPrintPreviewDialog>
|
#include <QPrintPreviewDialog>
|
||||||
#include <QPrintDialog>
|
#include <QPrintDialog>
|
||||||
|
#include <QShortcut>
|
||||||
|
|
||||||
PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
|
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);
|
setFixedSize(550, 400);
|
||||||
setWindowTitle(tr("Print"));
|
setWindowTitle(tr("Print"));
|
||||||
setWindowIcon(QIcon(":subsurface-icon"));
|
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)
|
void PrintDialog::previewClicked(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue