43 : KConfigSkeletonItem(actionCollection->componentName(), action->text())
44 , m_actionCollection(actionCollection)
47 setGetDefaultImpl([
this] {
48 return m_actionCollection->defaultShortcut(m_action);
51 setIsDefaultImpl([
this] {
52 return m_action->shortcut() == m_actionCollection->defaultShortcut(m_action);
55 setIsSaveNeededImpl([
this] {
56 return (m_action->shortcut() != m_savedShortcut);
113 : KConfigSkeleton(nullptr, parent)
114 , m_actionCollection(new KActionCollection(this, QStringLiteral(
"kwin")))
116 m_actionCollection->setConfigGroup(
"Navigation");
117 m_actionCollection->setConfigGlobal(
true);
119 auto addShortcut = [
this](
const KLocalizedString &name,
const QKeySequence &sequence = QKeySequence()) {
120 const QString untranslatedName = QString::fromUtf8(name.untranslatedText());
121 QAction *action = m_actionCollection->addAction(untranslatedName);
122 action->setObjectName(untranslatedName);
123 action->setProperty(
"isConfigurationAction",
true);
124 action->setText(name.toString());
126 m_actionCollection->setDefaultShortcut(action, sequence);
132 addShortcut(ki18nd(
"kwin",
"Walk Through Windows"), Qt::ALT | Qt::Key_Tab);
133 addShortcut(ki18nd(
"kwin",
"Walk Through Windows (Reverse)"), Qt::ALT | Qt::SHIFT | Qt::Key_Tab);
134 addShortcut(ki18nd(
"kwin",
"Walk Through Windows of Current Application"), Qt::ALT | Qt::Key_QuoteLeft);
135 addShortcut(ki18nd(
"kwin",
"Walk Through Windows of Current Application (Reverse)"), Qt::ALT | Qt::Key_AsciiTilde);
137 addShortcut(ki18nd(
"kwin",
"Walk Through Windows Alternative"));
138 addShortcut(ki18nd(
"kwin",
"Walk Through Windows Alternative (Reverse)"));
139 addShortcut(ki18nd(
"kwin",
"Walk Through Windows of Current Application Alternative"));
140 addShortcut(ki18nd(
"kwin",
"Walk Through Windows of Current Application Alternative (Reverse)"));