aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2017-06-05 12:09:40 -0400
committerq5sys <jt@obs-sec.com>2017-06-05 12:09:40 -0400
commit278340e28b8fd4c610a25c4165a6447a2723f039 (patch)
treed373e7c6ac5cc625d6af1df646ed84bf25a0299c /src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
parentmore work on autoextract functionality (diff)
downloadlumina-278340e28b8fd4c610a25c4165a6447a2723f039.tar.gz
lumina-278340e28b8fd4c610a25c4165a6447a2723f039.tar.bz2
lumina-278340e28b8fd4c610a25c4165a6447a2723f039.zip
add quit and open shortcuts to screenshot
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 364c391c..be0fc02b 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -72,6 +72,13 @@ MainUI::MainUI()
IMG->setDefaultSize(ui->scrollArea->maximumViewportSize());
IMG->LoadImage( QApplication::screens().at(0)->grabWindow(QApplication::desktop()->winId()).toImage() ); //initial screenshot
lastScreenShot = QDateTime::currentDateTime();
+
+ // Shortcuts
+ quitShortcut = new QShortcut(Qt::CTRL + Qt::Key_Q, this);
+ connect(quitShortcut, SIGNAL(activated()), this, SLOT(on_quitShortcut_Triggered()) );
+ openShortcut = new QShortcut(Qt::CTRL + Qt::Key_O, this);
+ connect(openShortcut, SIGNAL(activated()), this, SLOT(quicksave()) );
+
//ui->label_screenshot->setPixmap( cpic.scaled(ui->label_screenshot->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) );
}
@@ -330,3 +337,7 @@ void MainUI::closeEvent(QCloseEvent *ev){
}
QMainWindow::closeEvent(ev);
}
+
+void MainUI::on_quitShortcut_Triggered(){
+ QApplication::quit();
+}
bgstack15