Closing shortcuts for shift times windows

Adding the ability to close the shift times window, also Quit subsurface
with this window in front.

See #489

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-04-25 19:39:40 +02:00 committed by Dirk Hohndel
parent 155eac11d2
commit b4a04074c2

View file

@ -14,6 +14,7 @@
#include <QTime>
#include <QFileDialog>
#include <QDateTime>
#include <QShortcut>
#include "exif.h"
#include "../dive.h"
#include "../file.h"
@ -181,6 +182,10 @@ ShiftTimesDialog::ShiftTimesDialog(QWidget *parent) : QDialog(parent)
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *)));
connect(ui.timeEdit, SIGNAL(timeChanged(const QTime)), this, SLOT(changeTime()));
connect(ui.backwards, SIGNAL(toggled(bool)), this, SLOT(changeTime()));
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 ShiftImageTimesDialog::buttonClicked(QAbstractButton *button)