Changeset View
Changeset View
Standalone View
Standalone View
effects/flipswitch/flipswitch.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
55 | m_captionFont.setPointSize(m_captionFont.pointSize() * 2); | 55 | m_captionFont.setPointSize(m_captionFont.pointSize() * 2); | ||
56 | 56 | | |||
57 | QAction* flipSwitchCurrentAction = new QAction(this); | 57 | QAction* flipSwitchCurrentAction = new QAction(this); | ||
58 | flipSwitchCurrentAction->setObjectName(QStringLiteral("FlipSwitchCurrent")); | 58 | flipSwitchCurrentAction->setObjectName(QStringLiteral("FlipSwitchCurrent")); | ||
59 | flipSwitchCurrentAction->setText(i18n("Toggle Flip Switch (Current desktop)")); | 59 | flipSwitchCurrentAction->setText(i18n("Toggle Flip Switch (Current desktop)")); | ||
60 | KGlobalAccel::self()->setShortcut(flipSwitchCurrentAction, QList<QKeySequence>()); | 60 | KGlobalAccel::self()->setShortcut(flipSwitchCurrentAction, QList<QKeySequence>()); | ||
61 | m_shortcutCurrent = KGlobalAccel::self()->shortcut(flipSwitchCurrentAction); | 61 | m_shortcutCurrent = KGlobalAccel::self()->shortcut(flipSwitchCurrentAction); | ||
62 | effects->registerGlobalShortcut(QKeySequence(), flipSwitchCurrentAction); | 62 | effects->registerGlobalShortcut(QKeySequence(), flipSwitchCurrentAction); | ||
63 | connect(flipSwitchCurrentAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveCurrent())); | 63 | connect(flipSwitchCurrentAction, &QAction::triggered, this, &FlipSwitchEffect::toggleActiveCurrent); | ||
64 | QAction* flipSwitchAllAction = new QAction(this); | 64 | QAction* flipSwitchAllAction = new QAction(this); | ||
65 | flipSwitchAllAction->setObjectName(QStringLiteral("FlipSwitchAll")); | 65 | flipSwitchAllAction->setObjectName(QStringLiteral("FlipSwitchAll")); | ||
66 | flipSwitchAllAction->setText(i18n("Toggle Flip Switch (All desktops)")); | 66 | flipSwitchAllAction->setText(i18n("Toggle Flip Switch (All desktops)")); | ||
67 | KGlobalAccel::self()->setShortcut(flipSwitchAllAction, QList<QKeySequence>()); | 67 | KGlobalAccel::self()->setShortcut(flipSwitchAllAction, QList<QKeySequence>()); | ||
68 | effects->registerGlobalShortcut(QKeySequence(), flipSwitchAllAction); | 68 | effects->registerGlobalShortcut(QKeySequence(), flipSwitchAllAction); | ||
69 | m_shortcutAll = KGlobalAccel::self()->shortcut(flipSwitchAllAction); | 69 | m_shortcutAll = KGlobalAccel::self()->shortcut(flipSwitchAllAction); | ||
70 | connect(flipSwitchAllAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveAllDesktops())); | 70 | connect(flipSwitchAllAction, &QAction::triggered, this, &FlipSwitchEffect::toggleActiveAllDesktops); | ||
71 | connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &FlipSwitchEffect::globalShortcutChanged); | 71 | connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &FlipSwitchEffect::globalShortcutChanged); | ||
72 | connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*))); | 72 | connect(effects, &EffectsHandler::windowAdded, this, &FlipSwitchEffect::slotWindowAdded); | ||
73 | connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*))); | 73 | connect(effects, &EffectsHandler::windowClosed, this, &FlipSwitchEffect::slotWindowClosed); | ||
74 | connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int))); | 74 | connect(effects, &EffectsHandler::tabBoxAdded, this, &FlipSwitchEffect::slotTabBoxAdded); | ||
75 | connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed())); | 75 | connect(effects, &EffectsHandler::tabBoxClosed, this, &FlipSwitchEffect::slotTabBoxClosed); | ||
76 | connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated())); | 76 | connect(effects, &EffectsHandler::tabBoxUpdated, this, &FlipSwitchEffect::slotTabBoxUpdated); | ||
77 | connect(effects, SIGNAL(tabBoxKeyEvent(QKeyEvent*)), this, SLOT(slotTabBoxKeyEvent(QKeyEvent*))); | 77 | connect(effects, &EffectsHandler::tabBoxKeyEvent, this, &FlipSwitchEffect::slotTabBoxKeyEvent); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | FlipSwitchEffect::~FlipSwitchEffect() | 80 | FlipSwitchEffect::~FlipSwitchEffect() | ||
81 | { | 81 | { | ||
82 | delete m_captionFrame; | 82 | delete m_captionFrame; | ||
83 | } | 83 | } | ||
84 | 84 | | |||
85 | bool FlipSwitchEffect::supported() | 85 | bool FlipSwitchEffect::supported() | ||
▲ Show 20 Lines • Show All 903 Lines • Show Last 20 Lines |