29 : KCModule(parent, data)
31 QVBoxLayout *layout =
new QVBoxLayout(widget());
34 KActionCollection *actionCollection =
new KActionCollection(widget(), QStringLiteral(
"kwin"));
35 actionCollection->setComponentDisplayName(i18n(
"KWin"));
37 QAction *a = actionCollection->addAction(QStringLiteral(
"Invert"));
38 a->setText(i18n(
"Toggle Invert Effect"));
39 a->setProperty(
"isConfigurationAction",
true);
40 KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << (Qt::CTRL | Qt::META | Qt::Key_I));
41 KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << (Qt::CTRL | Qt::META | Qt::Key_I));
43 QAction *b = actionCollection->addAction(QStringLiteral(
"InvertWindow"));
44 b->setText(i18n(
"Toggle Invert Effect on Window"));
45 b->setProperty(
"isConfigurationAction",
true);
46 KGlobalAccel::self()->setDefaultShortcut(b, QList<QKeySequence>() << (Qt::CTRL | Qt::META | Qt::Key_U));
47 KGlobalAccel::self()->setShortcut(b, QList<QKeySequence>() << (Qt::CTRL | Qt::META | Qt::Key_U));
49 mShortcutEditor =
new KShortcutsEditor(actionCollection, widget(),
50 KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed);
51 connect(mShortcutEditor, &KShortcutsEditor::keyChange,
this, &KCModule::markAsChanged);
52 layout->addWidget(mShortcutEditor);