diff --git a/app/globalshortcuts.cpp b/app/globalshortcuts.cpp index e2beafafd..7957891f9 100644 --- a/app/globalshortcuts.cpp +++ b/app/globalshortcuts.cpp @@ -213,6 +213,15 @@ void GlobalShortcuts::init() showDock(); }); + //show the layouts editor + QAction *layoutsAction = taskbarActions->addAction(QStringLiteral("show layouts editor")); + layoutsAction->setText(i18n("Show Layouts Editor")); + layoutsAction->setShortcut(QKeySequence(Qt::META + Qt::Key_E)); + KGlobalAccel::setGlobalShortcut(layoutsAction, QKeySequence(Qt::META + Qt::Key_E)); + connect(layoutsAction, &QAction::triggered, this, [this]() { + showLayoutsEditor(); + }); + } //! Activate launcher menu through dbus interface @@ -444,6 +453,11 @@ void GlobalShortcuts::showDock() } } +void GlobalShortcuts::showLayoutsEditor() +{ + m_corona->layoutManager()->showLayoutConfigDialog(); +} + bool GlobalShortcuts::dockAtLowerScreenPriority(DockView *test, DockView *base) { if (!base || ! test) { diff --git a/app/globalshortcuts.h b/app/globalshortcuts.h index 36ea70feb..6f064109c 100644 --- a/app/globalshortcuts.h +++ b/app/globalshortcuts.h @@ -51,6 +51,7 @@ private: void activateTaskManagerEntry(int index, Qt::Key modifier); void showDock(); void hideDock(); + void showLayoutsEditor(); void showSettings(); bool dockAtLowerEdgePriority(DockView *test, DockView *base);