Changeset View
Changeset View
Standalone View
Standalone View
effects/invert/invert_config.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 44 | { | |||
---|---|---|---|---|---|
57 | QAction* b = actionCollection->addAction(QStringLiteral("InvertWindow")); | 57 | QAction* b = actionCollection->addAction(QStringLiteral("InvertWindow")); | ||
58 | b->setText(i18n("Toggle Invert Effect on Window")); | 58 | b->setText(i18n("Toggle Invert Effect on Window")); | ||
59 | b->setProperty("isConfigurationAction", true); | 59 | b->setProperty("isConfigurationAction", true); | ||
60 | KGlobalAccel::self()->setDefaultShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U); | 60 | KGlobalAccel::self()->setDefaultShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U); | ||
61 | KGlobalAccel::self()->setShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U); | 61 | KGlobalAccel::self()->setShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U); | ||
62 | 62 | | |||
63 | mShortcutEditor = new KShortcutsEditor(actionCollection, this, | 63 | mShortcutEditor = new KShortcutsEditor(actionCollection, this, | ||
64 | KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed); | 64 | KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed); | ||
65 | connect(mShortcutEditor, SIGNAL(keyChange()), this, SLOT(changed())); | 65 | connect(mShortcutEditor, &KShortcutsEditor::keyChange, this, qOverload<>(&InvertEffectConfig::changed)); | ||
66 | layout->addWidget(mShortcutEditor); | 66 | layout->addWidget(mShortcutEditor); | ||
67 | 67 | | |||
68 | load(); | 68 | load(); | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | InvertEffectConfig::~InvertEffectConfig() | 71 | InvertEffectConfig::~InvertEffectConfig() | ||
72 | { | 72 | { | ||
73 | // Undo (only) unsaved changes to global key shortcuts | 73 | // Undo (only) unsaved changes to global key shortcuts | ||
Show All 34 Lines |