add shortcut to open layouts editor

--use Meta+E to open the layouts editor
pull/2/head
Michail Vourlakos 7 years ago
parent 0077029e3f
commit 00032f9198

@ -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) {

@ -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);

Loading…
Cancel
Save