From 9fe1cd8fa936a9e9545a415e1698b95c983754f2 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sun, 27 Jan 2019 16:00:18 -0500 Subject: Add shortcut Ctrl+F4 for closing the current tab --- src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | 2 ++ src-qt5/desktop-utils/lumina-textedit/MainUI.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index 298fedde..f01119c6 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -84,8 +84,10 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ ui->groupReplace->setVisible(false); nextTabS = new QShortcut(QKeySequence(QKeySequence::Forward), this); prevTabS = new QShortcut(QKeySequence(QKeySequence::Back), this); + closeTabS = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F4), this); connect(nextTabS, SIGNAL(activated()), this, SLOT(nextTab()) ); connect(prevTabS, SIGNAL(activated()), this, SLOT(prevTab()) ); + connect(closeTabS, SIGNAL(activated()), this, SLOT(CloseFile()) ); //Update the menu of available syntax highlighting modes QStringList smodes = Custom_Syntax::availableRules(settings); diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.h b/src-qt5/desktop-utils/lumina-textedit/MainUI.h index 38a742dd..2c6082cf 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.h +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.h @@ -43,7 +43,7 @@ private: QFontComboBox *fontbox; ColorDialog *colorDLG; QSettings *settings; - QShortcut *closeFindS, *nextTabS, *prevTabS; + QShortcut *closeFindS, *nextTabS, *prevTabS, *closeTabS; QSpinBox *fontSizes; QAction *label_readonly; //Hunspell *hunspell; -- cgit