@@ -65,7 +65,8 @@ KsMainWindow::KsMainWindow(QWidget *parent)
_colorPhaseSlider(Qt::Horizontal, this),
_fullScreenModeAction("Full Screen Mode", this),
_aboutAction("About", this),
- _contentsAction("Contents", this)
+ _contentsAction("Contents", this),
+ _deselectShortcut(this)
{
setWindowTitle("Kernel Shark");
_createActions();
@@ -114,6 +115,10 @@ KsMainWindow::KsMainWindow(QWidget *parent)
connect(&_plugins, &KsPluginManager::dataReload,
&_data, &KsDataStore::reload);
+ _deselectShortcut.setKey(Qt::CTRL + Qt::Key_D);
+ connect(&_deselectShortcut, &QShortcut::activated,
+ this, &KsMainWindow::_deselect);
+
_resizeEmpty();
}
@@ -147,6 +147,8 @@ private:
QAction _contentsAction;
+ QShortcut _deselectShortcut;
+
void _open();
void _restorSession();
@@ -26,6 +26,8 @@ KsQuickMarkerMenu::KsQuickMarkerMenu(KsDualMarkerSM *dm, QWidget *parent)
if (dm->activeMarker()._isSet) {
addSection("Marker menu");
_deselectAction.setText("Deselect");
+ _deselectAction.setShortcut(tr("Ctrl+D"));
+ _deselectAction.setStatusTip(tr("Deselect marker"));
connect(&_deselectAction, &QAction::triggered,
this, &KsQuickMarkerMenu::deselect);
The active marker can now be deselected by pressing "Ctrl + D". Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> --- kernel-shark-qt/src/KsMainWindow.cpp | 7 ++++++- kernel-shark-qt/src/KsMainWindow.hpp | 2 ++ kernel-shark-qt/src/KsQuickContextMenu.cpp | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-)