aboutsummaryrefslogtreecommitdiff
path: root/lumina-search
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-search')
-rw-r--r--lumina-search/MainUI.cpp3
-rw-r--r--lumina-search/MainUI.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/lumina-search/MainUI.cpp b/lumina-search/MainUI.cpp
index 08356093..363d788e 100644
--- a/lumina-search/MainUI.cpp
+++ b/lumina-search/MainUI.cpp
@@ -26,6 +26,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
searcher = new Worker();
searcher->moveToThread(workthread);
+ closeShort = new QShortcut(QKeySequence(tr("Esc")), this);
+
//Setup the connections
connect(livetime, SIGNAL(timeout()), this, SLOT(startSearch()) );
connect(this, SIGNAL(SearchTerm(QString, bool)), searcher, SLOT(StartSearch(QString, bool)) );
@@ -41,6 +43,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(ui->listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(LaunchItem(QListWidgetItem*)) );
connect(ui->listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(LaunchItem(QListWidgetItem*)) );
connect(ui->tool_configure, SIGNAL(clicked()), this, SLOT(configureSearch()) );
+ connect(closeShort, SIGNAL(activated()), this, SLOT( close() ) );
//Setup the settings file
QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
diff --git a/lumina-search/MainUI.h b/lumina-search/MainUI.h
index 0a9f4acb..599a5195 100644
--- a/lumina-search/MainUI.h
+++ b/lumina-search/MainUI.h
@@ -14,6 +14,7 @@
#include <QThread>
#include <QProcess>
#include <QListWidgetItem>
+#include <QShortcut>
#include <LuminaXDG.h>
@@ -43,6 +44,7 @@ private:
QTimer *livetime;
Worker *searcher;
QSettings *settings;
+ QShortcut *closeShort;
void updateDefaultStatusTip();
bgstack15