[effects] Port to new connect syntax
Summary: The new connect syntax has several advantages over the old syntax: (a) Connecting with the new syntax is faster; (b) It is compile time checked. There are still a few places where the old connect syntax is used, e.g. connecting to QML buttons in the Desktop Grid effect. Test Plan: Have been testing this patch for ~2 weeks, haven't noticed any regressions. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, broulik, graesslin, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18368
This commit is contained in:
parent
4729a42c34
commit
253ff428a7
38 changed files with 130 additions and 133 deletions
|
@ -54,10 +54,10 @@ ContrastEffect::ContrastEffect()
|
|||
net_wm_contrast_region = 0;
|
||||
}
|
||||
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, SIGNAL(screenGeometryChanged(QSize)), this, SLOT(slotScreenGeometryChanged()));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &ContrastEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &ContrastEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::propertyNotify, this, &ContrastEffect::slotPropertyNotify);
|
||||
connect(effects, &EffectsHandler::screenGeometryChanged, this, &ContrastEffect::slotScreenGeometryChanged);
|
||||
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
|
||||
[this] {
|
||||
if (shader && shader->isValid()) {
|
||||
|
|
|
@ -64,10 +64,10 @@ BlurEffect::BlurEffect()
|
|||
net_wm_blur_region = 0;
|
||||
}
|
||||
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, SIGNAL(screenGeometryChanged(QSize)), this, SLOT(slotScreenGeometryChanged()));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &BlurEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &BlurEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::propertyNotify, this, &BlurEffect::slotPropertyNotify);
|
||||
connect(effects, &EffectsHandler::screenGeometryChanged, this, &BlurEffect::slotScreenGeometryChanged);
|
||||
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
|
||||
[this] {
|
||||
if (m_shader && m_shader->isValid() && m_renderTargetsValid) {
|
||||
|
|
|
@ -67,11 +67,11 @@ CoverSwitchEffect::CoverSwitchEffect()
|
|||
} else {
|
||||
m_reflectionShader = NULL;
|
||||
}
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
||||
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
|
||||
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
|
||||
connect(effects, SIGNAL(tabBoxKeyEvent(QKeyEvent*)), this, SLOT(slotTabBoxKeyEvent(QKeyEvent*)));
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &CoverSwitchEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::tabBoxAdded, this, &CoverSwitchEffect::slotTabBoxAdded);
|
||||
connect(effects, &EffectsHandler::tabBoxClosed, this, &CoverSwitchEffect::slotTabBoxClosed);
|
||||
connect(effects, &EffectsHandler::tabBoxUpdated, this, &CoverSwitchEffect::slotTabBoxUpdated);
|
||||
connect(effects, &EffectsHandler::tabBoxKeyEvent, this, &CoverSwitchEffect::slotTabBoxKeyEvent);
|
||||
}
|
||||
|
||||
CoverSwitchEffect::~CoverSwitchEffect()
|
||||
|
|
|
@ -98,9 +98,9 @@ CubeEffect::CubeEffect()
|
|||
}
|
||||
m_textureMirrorMatrix.scale(1.0, -1.0, 1.0);
|
||||
m_textureMirrorMatrix.translate(0.0, -1.0, 0.0);
|
||||
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
||||
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
|
||||
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
|
||||
connect(effects, &EffectsHandler::tabBoxAdded, this, &CubeEffect::slotTabBoxAdded);
|
||||
connect(effects, &EffectsHandler::tabBoxClosed, this, &CubeEffect::slotTabBoxClosed);
|
||||
connect(effects, &EffectsHandler::tabBoxUpdated, this, &CubeEffect::slotTabBoxUpdated);
|
||||
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
@ -202,9 +202,9 @@ void CubeEffect::reconfigure(ReconfigureFlags)
|
|||
KGlobalAccel::self()->setShortcut(sphereAction, QList<QKeySequence>());
|
||||
sphereShortcut = KGlobalAccel::self()->shortcut(sphereAction);
|
||||
effects->registerGlobalShortcut(QKeySequence(), sphereAction);
|
||||
connect(cubeAction, SIGNAL(triggered(bool)), this, SLOT(toggleCube()));
|
||||
connect(cylinderAction, SIGNAL(triggered(bool)), this, SLOT(toggleCylinder()));
|
||||
connect(sphereAction, SIGNAL(triggered(bool)), this, SLOT(toggleSphere()));
|
||||
connect(cubeAction, &QAction::triggered, this, &CubeEffect::toggleCube);
|
||||
connect(cylinderAction, &QAction::triggered, this, &CubeEffect::toggleCylinder);
|
||||
connect(sphereAction, &QAction::triggered, this, &CubeEffect::toggleSphere);
|
||||
connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &CubeEffect::globalShortcutChanged);
|
||||
shortcutsRegistered = true;
|
||||
}
|
||||
|
@ -1537,13 +1537,13 @@ void CubeEffect::setActive(bool active)
|
|||
QString capPath = CubeConfig::capPath();
|
||||
if (texturedCaps && !capTexture && !capPath.isEmpty()) {
|
||||
QFutureWatcher<QImage> *watcher = new QFutureWatcher<QImage>(this);
|
||||
connect(watcher, SIGNAL(finished()), SLOT(slotCubeCapLoaded()));
|
||||
connect(watcher, &QFutureWatcher<QImage>::finished, this, &CubeEffect::slotCubeCapLoaded);
|
||||
watcher->setFuture(QtConcurrent::run(this, &CubeEffect::loadCubeCap, capPath));
|
||||
}
|
||||
QString wallpaperPath = CubeConfig::wallpaper().toLocalFile();
|
||||
if (!wallpaper && !wallpaperPath.isEmpty()) {
|
||||
QFutureWatcher<QImage> *watcher = new QFutureWatcher<QImage>(this);
|
||||
connect(watcher, SIGNAL(finished()), SLOT(slotWallPaperLoaded()));
|
||||
connect(watcher, &QFutureWatcher<QImage>::finished, this, &CubeEffect::slotWallPaperLoaded);
|
||||
watcher->setFuture(QtConcurrent::run(this, &CubeEffect::loadWallPaper, wallpaperPath));
|
||||
}
|
||||
activated = true;
|
||||
|
|
|
@ -84,7 +84,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
|
|||
m_ui->editor->addCollection(m_actionCollection);
|
||||
|
||||
capsSelectionChanged();
|
||||
connect(m_ui->kcfg_Caps, SIGNAL(stateChanged(int)), this, SLOT(capsSelectionChanged()));
|
||||
connect(m_ui->kcfg_Caps, &QCheckBox::stateChanged, this, &CubeEffectConfig::capsSelectionChanged);
|
||||
m_ui->kcfg_Wallpaper->setFilter(QStringLiteral("*.png *.jpeg *.jpg "));
|
||||
CubeConfig::instance(KWIN_CONFIG);
|
||||
addConfig(CubeConfig::self(), m_ui);
|
||||
|
|
|
@ -79,13 +79,13 @@ DesktopGridEffect::DesktopGridEffect()
|
|||
shortcut = KGlobalAccel::self()->shortcut(a);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::Key_F8, a);
|
||||
effects->registerTouchpadSwipeShortcut(SwipeDirection::Up, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggle()));
|
||||
connect(a, &QAction::triggered, this, &DesktopGridEffect::toggle);
|
||||
connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &DesktopGridEffect::globalShortcutChanged);
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(numberDesktopsChanged(uint)), this, SLOT(slotNumberDesktopsChanged(uint)));
|
||||
connect(effects, SIGNAL(windowGeometryShapeChanged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &DesktopGridEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &DesktopGridEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &DesktopGridEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::numberDesktopsChanged, this, &DesktopGridEffect::slotNumberDesktopsChanged);
|
||||
connect(effects, &EffectsHandler::windowGeometryShapeChanged, this, &DesktopGridEffect::slotWindowGeometryShapeChanged);
|
||||
connect(effects, &EffectsHandler::numberScreensChanged, this, &DesktopGridEffect::setup);
|
||||
|
||||
// Load all other configuration details
|
||||
|
@ -1128,8 +1128,8 @@ void DesktopGridEffect::setup()
|
|||
view = new DesktopButtonsView();
|
||||
m_desktopButtonsViews.append(view);
|
||||
it = m_desktopButtonsViews.end(); // changed through insert!
|
||||
connect(view, SIGNAL(addDesktop()), SLOT(slotAddDesktop()));
|
||||
connect(view, SIGNAL(removeDesktop()), SLOT(slotRemoveDesktop()));
|
||||
connect(view, &DesktopButtonsView::addDesktop, this, &DesktopGridEffect::slotAddDesktop);
|
||||
connect(view, &DesktopButtonsView::removeDesktop, this, &DesktopGridEffect::slotRemoveDesktop);
|
||||
} else {
|
||||
view = *it;
|
||||
++it;
|
||||
|
|
|
@ -86,9 +86,9 @@ DesktopGridEffectConfig::DesktopGridEffectConfig(QWidget* parent, const QVariant
|
|||
|
||||
DesktopGridConfig::instance(KWIN_CONFIG);
|
||||
addConfig(DesktopGridConfig::self(), m_ui);
|
||||
connect(m_ui->kcfg_LayoutMode, SIGNAL(currentIndexChanged(int)), this, SLOT(layoutSelectionChanged()));
|
||||
connect(m_ui->desktopNameAlignmentCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->shortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->kcfg_LayoutMode, qOverload<int>(&KComboBox::currentIndexChanged), this, &DesktopGridEffectConfig::layoutSelectionChanged);
|
||||
connect(m_ui->desktopNameAlignmentCombo, qOverload<int>(&KComboBox::currentIndexChanged), this, qOverload<>(&DesktopGridEffectConfig::changed));
|
||||
connect(m_ui->shortcutEditor, &KShortcutsEditor::keyChange, this, qOverload<>(&DesktopGridEffectConfig::changed));
|
||||
|
||||
load();
|
||||
layoutSelectionChanged();
|
||||
|
|
|
@ -36,9 +36,9 @@ FallApartEffect::FallApartEffect()
|
|||
{
|
||||
initConfig<FallApartConfig>();
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDataChanged(KWin::EffectWindow*,int)), this, SLOT(slotWindowDataChanged(KWin::EffectWindow*,int)));
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &FallApartEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &FallApartEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::windowDataChanged, this, &FallApartEffect::slotWindowDataChanged);
|
||||
}
|
||||
|
||||
void FallApartEffect::reconfigure(ReconfigureFlags)
|
||||
|
|
|
@ -60,21 +60,21 @@ FlipSwitchEffect::FlipSwitchEffect()
|
|||
KGlobalAccel::self()->setShortcut(flipSwitchCurrentAction, QList<QKeySequence>());
|
||||
m_shortcutCurrent = KGlobalAccel::self()->shortcut(flipSwitchCurrentAction);
|
||||
effects->registerGlobalShortcut(QKeySequence(), flipSwitchCurrentAction);
|
||||
connect(flipSwitchCurrentAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveCurrent()));
|
||||
connect(flipSwitchCurrentAction, &QAction::triggered, this, &FlipSwitchEffect::toggleActiveCurrent);
|
||||
QAction* flipSwitchAllAction = new QAction(this);
|
||||
flipSwitchAllAction->setObjectName(QStringLiteral("FlipSwitchAll"));
|
||||
flipSwitchAllAction->setText(i18n("Toggle Flip Switch (All desktops)"));
|
||||
KGlobalAccel::self()->setShortcut(flipSwitchAllAction, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), flipSwitchAllAction);
|
||||
m_shortcutAll = KGlobalAccel::self()->shortcut(flipSwitchAllAction);
|
||||
connect(flipSwitchAllAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveAllDesktops()));
|
||||
connect(flipSwitchAllAction, &QAction::triggered, this, &FlipSwitchEffect::toggleActiveAllDesktops);
|
||||
connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &FlipSwitchEffect::globalShortcutChanged);
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
|
||||
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
|
||||
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
|
||||
connect(effects, SIGNAL(tabBoxKeyEvent(QKeyEvent*)), this, SLOT(slotTabBoxKeyEvent(QKeyEvent*)));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &FlipSwitchEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &FlipSwitchEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::tabBoxAdded, this, &FlipSwitchEffect::slotTabBoxAdded);
|
||||
connect(effects, &EffectsHandler::tabBoxClosed, this, &FlipSwitchEffect::slotTabBoxClosed);
|
||||
connect(effects, &EffectsHandler::tabBoxUpdated, this, &FlipSwitchEffect::slotTabBoxUpdated);
|
||||
connect(effects, &EffectsHandler::tabBoxKeyEvent, this, &FlipSwitchEffect::slotTabBoxKeyEvent);
|
||||
}
|
||||
|
||||
FlipSwitchEffect::~FlipSwitchEffect()
|
||||
|
|
|
@ -29,10 +29,14 @@ HighlightWindowEffect::HighlightWindowEffect()
|
|||
, m_monitorWindow(NULL)
|
||||
{
|
||||
m_atom = effects->announceSupportProperty("_KDE_WINDOW_HIGHLIGHT", this);
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &HighlightWindowEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &HighlightWindowEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &HighlightWindowEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::propertyNotify, this,
|
||||
[this](EffectWindow *w, long atom) {
|
||||
slotPropertyNotify(w, atom, nullptr);
|
||||
}
|
||||
);
|
||||
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
|
||||
[this] {
|
||||
m_atom = effects->announceSupportProperty("_KDE_WINDOW_HIGHLIGHT", this);
|
||||
|
|
|
@ -46,7 +46,7 @@ InvertEffect::InvertEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_I);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_I);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::META + Qt::Key_I, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleScreenInversion()));
|
||||
connect(a, &QAction::triggered, this, &InvertEffect::toggleScreenInversion);
|
||||
|
||||
QAction* b = new QAction(this);
|
||||
b->setObjectName(QStringLiteral("InvertWindow"));
|
||||
|
@ -54,9 +54,9 @@ InvertEffect::InvertEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U);
|
||||
KGlobalAccel::self()->setShortcut(b, QList<QKeySequence>() << Qt::CTRL + Qt::META + Qt::Key_U);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::META + Qt::Key_U, b);
|
||||
connect(b, SIGNAL(triggered(bool)), this, SLOT(toggleWindow()));
|
||||
connect(b, &QAction::triggered, this, &InvertEffect::toggleWindow);
|
||||
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &InvertEffect::slotWindowClosed);
|
||||
}
|
||||
|
||||
InvertEffect::~InvertEffect()
|
||||
|
|
|
@ -62,7 +62,7 @@ InvertEffectConfig::InvertEffectConfig(QWidget* parent, const QVariantList& args
|
|||
|
||||
mShortcutEditor = new KShortcutsEditor(actionCollection, this,
|
||||
KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed);
|
||||
connect(mShortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(mShortcutEditor, &KShortcutsEditor::keyChange, this, qOverload<>(&InvertEffectConfig::changed));
|
||||
layout->addWidget(mShortcutEditor);
|
||||
|
||||
load();
|
||||
|
|
|
@ -56,7 +56,7 @@ KscreenEffect::KscreenEffect()
|
|||
, m_atom(effects->announceSupportProperty("_KDE_KWIN_KSCREEN_SUPPORT", this))
|
||||
{
|
||||
initConfig<KscreenConfig>();
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), SLOT(propertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, &EffectsHandler::propertyNotify, this, &KscreenEffect::propertyNotify);
|
||||
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
|
||||
[this] {
|
||||
m_atom = effects->announceSupportProperty(QByteArrayLiteral("_KDE_KWIN_KSCREEN_SUPPORT"), this);
|
||||
|
|
|
@ -69,8 +69,8 @@ LookingGlassEffect::LookingGlassEffect()
|
|||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_0);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::Key_0, a);
|
||||
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &LookingGlassEffect::slotMouseChanged);
|
||||
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ LookingGlassEffectConfig::LookingGlassEffectConfig(QWidget* parent, const QVaria
|
|||
|
||||
LookingGlassConfig::instance(KWIN_CONFIG);
|
||||
addConfig(LookingGlassConfig::self(), m_ui);
|
||||
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->editor, &KShortcutsEditor::keyChange, this, qOverload<>(&LookingGlassEffectConfig::changed));
|
||||
|
||||
// Shortcut config. The shortcut belongs to the component "kwin"!
|
||||
m_actionCollection = new KActionCollection(this, QStringLiteral("kwin"));
|
||||
|
|
|
@ -31,9 +31,9 @@ MagicLampEffect::MagicLampEffect()
|
|||
{
|
||||
initConfig<MagicLampConfig>();
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowMinimized(KWin::EffectWindow*)), this, SLOT(slotWindowMinimized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowUnminimized(KWin::EffectWindow*)), this, SLOT(slotWindowUnminimized(KWin::EffectWindow*)));
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &MagicLampEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::windowMinimized, this, &MagicLampEffect::slotWindowMinimized);
|
||||
connect(effects, &EffectsHandler::windowUnminimized, this, &MagicLampEffect::slotWindowUnminimized);
|
||||
}
|
||||
|
||||
bool MagicLampEffect::supported()
|
||||
|
|
|
@ -67,8 +67,8 @@ MagnifierEffect::MagnifierEffect()
|
|||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_0);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::Key_0, a);
|
||||
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &MagnifierEffect::slotMouseChanged);
|
||||
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ MagnifierEffectConfig::MagnifierEffectConfig(QWidget* parent, const QVariantList
|
|||
MagnifierConfig::instance(KWIN_CONFIG);
|
||||
addConfig(MagnifierConfig::self(), m_ui);
|
||||
|
||||
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->editor, &KShortcutsEditor::keyChange, this, qOverload<>(&MagnifierEffectConfig::changed));
|
||||
|
||||
// Shortcut config. The shortcut belongs to the component "kwin"!
|
||||
m_actionCollection = new KActionCollection(this, QStringLiteral("kwin"));
|
||||
|
|
|
@ -52,7 +52,7 @@ MouseClickEffect::MouseClickEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::Key_Asterisk, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleEnabled()));
|
||||
connect(a, &QAction::triggered, this, &MouseClickEffect::toggleEnabled);
|
||||
|
||||
reconfigure(ReconfigureAll);
|
||||
|
||||
|
@ -227,12 +227,10 @@ void MouseClickEffect::toggleEnabled()
|
|||
m_enabled = !m_enabled;
|
||||
|
||||
if (m_enabled) {
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &MouseClickEffect::slotMouseChanged);
|
||||
effects->startMousePolling();
|
||||
} else {
|
||||
disconnect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
disconnect(effects, &EffectsHandler::mouseChanged, this, &MouseClickEffect::slotMouseChanged);
|
||||
effects->stopMousePolling();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ MouseClickEffectConfig::MouseClickEffectConfig(QWidget* parent, const QVariantLi
|
|||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->addWidget(m_ui);
|
||||
|
||||
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->editor, &KShortcutsEditor::keyChange, this, qOverload<>(&MouseClickEffectConfig::changed));
|
||||
|
||||
// Shortcut config. The shortcut belongs to the component "kwin"!
|
||||
m_actionCollection = new KActionCollection(this, QStringLiteral("kwin"));
|
||||
|
|
|
@ -53,18 +53,17 @@ MouseMarkEffect::MouseMarkEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::SHIFT + Qt::META + Qt::Key_F11);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::SHIFT + Qt::META + Qt::Key_F11);
|
||||
effects->registerGlobalShortcut(Qt::SHIFT + Qt::META + Qt::Key_F11, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(clear()));
|
||||
connect(a, &QAction::triggered, this, &MouseMarkEffect::clear);
|
||||
a = new QAction(this);
|
||||
a->setObjectName(QStringLiteral("ClearLastMouseMark"));
|
||||
a->setText(i18n("Clear Last Mouse Mark"));
|
||||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::SHIFT + Qt::META + Qt::Key_F12);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::SHIFT + Qt::META + Qt::Key_F12);
|
||||
effects->registerGlobalShortcut(Qt::SHIFT + Qt::META + Qt::Key_F12, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(clearLast()));
|
||||
connect(a, &QAction::triggered, this, &MouseMarkEffect::clearLast);
|
||||
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(effects, SIGNAL(screenLockingChanged(bool)), SLOT(screenLockingChanged(bool)));
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &MouseMarkEffect::slotMouseChanged);
|
||||
connect(effects, &EffectsHandler::screenLockingChanged, this, &MouseMarkEffect::screenLockingChanged);
|
||||
reconfigure(ReconfigureAll);
|
||||
arrow_start = NULL_POINT;
|
||||
effects->startMousePolling(); // We require it to detect activation as well
|
||||
|
|
|
@ -80,7 +80,7 @@ PresentWindowsEffect::PresentWindowsEffect()
|
|||
KGlobalAccel::self()->setShortcut(exposeAction, QList<QKeySequence>() << Qt::CTRL + Qt::Key_F9);
|
||||
shortcut = KGlobalAccel::self()->shortcut(exposeAction);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::Key_F9, exposeAction);
|
||||
connect(exposeAction, SIGNAL(triggered(bool)), this, SLOT(toggleActive()));
|
||||
connect(exposeAction, &QAction::triggered, this, &PresentWindowsEffect::toggleActive);
|
||||
QAction* exposeAllAction = m_exposeAllAction;
|
||||
exposeAllAction->setObjectName(QStringLiteral("ExposeAll"));
|
||||
exposeAllAction->setText(i18n("Toggle Present Windows (All desktops)"));
|
||||
|
@ -89,22 +89,22 @@ PresentWindowsEffect::PresentWindowsEffect()
|
|||
shortcutAll = KGlobalAccel::self()->shortcut(exposeAllAction);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::Key_F10, exposeAllAction);
|
||||
effects->registerTouchpadSwipeShortcut(SwipeDirection::Down, exposeAllAction);
|
||||
connect(exposeAllAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveAllDesktops()));
|
||||
connect(exposeAllAction, &QAction::triggered, this, &PresentWindowsEffect::toggleActiveAllDesktops);
|
||||
QAction* exposeClassAction = m_exposeClassAction;
|
||||
exposeClassAction->setObjectName(QStringLiteral("ExposeClass"));
|
||||
exposeClassAction->setText(i18n("Toggle Present Windows (Window class)"));
|
||||
KGlobalAccel::self()->setDefaultShortcut(exposeClassAction, QList<QKeySequence>() << Qt::CTRL + Qt::Key_F7);
|
||||
KGlobalAccel::self()->setShortcut(exposeClassAction, QList<QKeySequence>() << Qt::CTRL + Qt::Key_F7);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::Key_F7, exposeClassAction);
|
||||
connect(exposeClassAction, SIGNAL(triggered(bool)), this, SLOT(toggleActiveClass()));
|
||||
connect(exposeClassAction, &QAction::triggered, this, &PresentWindowsEffect::toggleActiveClass);
|
||||
shortcutClass = KGlobalAccel::self()->shortcut(exposeClassAction);
|
||||
connect(KGlobalAccel::self(), &KGlobalAccel::globalShortcutChanged, this, &PresentWindowsEffect::globalShortcutChanged);
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowGeometryShapeChanged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &PresentWindowsEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &PresentWindowsEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &PresentWindowsEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::windowGeometryShapeChanged, this, &PresentWindowsEffect::slotWindowGeometryShapeChanged);
|
||||
connect(effects, &EffectsHandler::propertyNotify, this, &PresentWindowsEffect::slotPropertyNotify);
|
||||
connect(effects, &EffectsHandler::numberScreensChanged, this,
|
||||
[this] {
|
||||
if (isActive())
|
||||
|
|
|
@ -83,7 +83,7 @@ PresentWindowsEffectConfig::PresentWindowsEffectConfig(QWidget* parent, const QV
|
|||
|
||||
m_ui->shortcutEditor->addCollection(m_actionCollection);
|
||||
|
||||
connect(m_ui->shortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->shortcutEditor, &KShortcutsEditor::keyChange, this, qOverload<>(&PresentWindowsEffectConfig::changed));
|
||||
|
||||
PresentWindowsConfig::instance(KWIN_CONFIG);
|
||||
addConfig(PresentWindowsConfig::self(), m_ui);
|
||||
|
|
|
@ -42,9 +42,9 @@ ResizeEffect::ResizeEffect()
|
|||
{
|
||||
initConfig<ResizeConfig>();
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowStartUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowStartUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowStepUserMovedResized(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowStepUserMovedResized(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(windowFinishUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowFinishUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, &EffectsHandler::windowStartUserMovedResized, this, &ResizeEffect::slotWindowStartUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowStepUserMovedResized, this, &ResizeEffect::slotWindowStepUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowFinishUserMovedResized, this, &ResizeEffect::slotWindowFinishUserMovedResized);
|
||||
}
|
||||
|
||||
ResizeEffect::~ResizeEffect()
|
||||
|
|
|
@ -39,10 +39,10 @@ ScreenEdgeEffect::ScreenEdgeEffect()
|
|||
: Effect()
|
||||
, m_cleanupTimer(new QTimer(this))
|
||||
{
|
||||
connect(effects, SIGNAL(screenEdgeApproaching(ElectricBorder,qreal,QRect)), SLOT(edgeApproaching(ElectricBorder,qreal,QRect)));
|
||||
connect(effects, &EffectsHandler::screenEdgeApproaching, this, &ScreenEdgeEffect::edgeApproaching);
|
||||
m_cleanupTimer->setInterval(5000);
|
||||
m_cleanupTimer->setSingleShot(true);
|
||||
connect(m_cleanupTimer, SIGNAL(timeout()), SLOT(cleanup()));
|
||||
connect(m_cleanupTimer, &QTimer::timeout, this, &ScreenEdgeEffect::cleanup);
|
||||
connect(effects, &EffectsHandler::screenLockingChanged, this,
|
||||
[this] (bool locked) {
|
||||
if (locked) {
|
||||
|
|
|
@ -60,7 +60,7 @@ bool ScreenShotEffect::supported()
|
|||
ScreenShotEffect::ScreenShotEffect()
|
||||
: m_scheduledScreenshot(0)
|
||||
{
|
||||
connect ( effects, SIGNAL(windowClosed(KWin::EffectWindow*)), SLOT(windowClosed(KWin::EffectWindow*)) );
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &ScreenShotEffect::windowClosed);
|
||||
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Screenshot"), this, QDBusConnection::ExportScriptableContents);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ SlideBackEffect::SlideBackEffect()
|
|||
{
|
||||
m_tabboxActive = 0;
|
||||
m_justMapped = m_upmostWindow = NULL;
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowUnminimized(KWin::EffectWindow*)), SLOT(slotWindowUnminimized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(tabBoxAdded(int)), SLOT(slotTabBoxAdded()));
|
||||
connect(effects, SIGNAL(stackingOrderChanged()), SLOT(slotStackingOrderChanged()));
|
||||
connect(effects, SIGNAL(tabBoxClosed()), SLOT(slotTabBoxClosed()));
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &SlideBackEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowDeleted, this, &SlideBackEffect::slotWindowDeleted);
|
||||
connect(effects, &EffectsHandler::windowUnminimized, this, &SlideBackEffect::slotWindowUnminimized);
|
||||
connect(effects, &EffectsHandler::tabBoxAdded, this, &SlideBackEffect::slotTabBoxAdded);
|
||||
connect(effects, &EffectsHandler::stackingOrderChanged, this, &SlideBackEffect::slotStackingOrderChanged);
|
||||
connect(effects, &EffectsHandler::tabBoxClosed, this, &SlideBackEffect::slotTabBoxClosed);
|
||||
}
|
||||
|
||||
void SlideBackEffect::slotStackingOrderChanged()
|
||||
|
|
|
@ -90,11 +90,10 @@ StartupFeedbackEffect::StartupFeedbackEffect()
|
|||
m_selection = new KSelectionOwner("_KDE_STARTUP_FEEDBACK", xcbConnection(), x11RootWindow(), this);
|
||||
m_selection->claim(true);
|
||||
}
|
||||
connect(m_startupInfo, SIGNAL(gotNewStartup(KStartupInfoId,KStartupInfoData)), SLOT(gotNewStartup(KStartupInfoId,KStartupInfoData)));
|
||||
connect(m_startupInfo, SIGNAL(gotRemoveStartup(KStartupInfoId,KStartupInfoData)), SLOT(gotRemoveStartup(KStartupInfoId,KStartupInfoData)));
|
||||
connect(m_startupInfo, SIGNAL(gotStartupChange(KStartupInfoId,KStartupInfoData)), SLOT(gotStartupChange(KStartupInfoId,KStartupInfoData)));
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(m_startupInfo, &KStartupInfo::gotNewStartup, this, &StartupFeedbackEffect::gotNewStartup);
|
||||
connect(m_startupInfo, &KStartupInfo::gotRemoveStartup, this, &StartupFeedbackEffect::gotRemoveStartup);
|
||||
connect(m_startupInfo, &KStartupInfo::gotStartupChange, this, &StartupFeedbackEffect::gotStartupChange);
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &StartupFeedbackEffect::slotMouseChanged);
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ ThumbnailAsideEffect::ThumbnailAsideEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_T, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleCurrentThumbnail()));
|
||||
connect(a, &QAction::triggered, this, &ThumbnailAsideEffect::toggleCurrentThumbnail);
|
||||
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowGeometryShapeChanged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowDamaged(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(screenLockingChanged(bool)), SLOT(repaintAll()));
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &ThumbnailAsideEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowGeometryShapeChanged, this, &ThumbnailAsideEffect::slotWindowGeometryShapeChanged);
|
||||
connect(effects, &EffectsHandler::windowDamaged, this, &ThumbnailAsideEffect::slotWindowDamaged);
|
||||
connect(effects, &EffectsHandler::screenLockingChanged, this, &ThumbnailAsideEffect::repaintAll);
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ ThumbnailAsideEffectConfig::ThumbnailAsideEffectConfig(QWidget* parent, const QV
|
|||
|
||||
layout->addWidget(m_ui);
|
||||
|
||||
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->editor, &KShortcutsEditor::keyChange, this, qOverload<>(&ThumbnailAsideEffectConfig::changed));
|
||||
|
||||
ThumbnailAsideConfig::instance(KWIN_CONFIG);
|
||||
addConfig(ThumbnailAsideConfig::self(), this);
|
||||
|
|
|
@ -63,10 +63,9 @@ TrackMouseEffect::TrackMouseEffect()
|
|||
KGlobalAccel::self()->setShortcut(m_action, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), m_action);
|
||||
|
||||
connect(m_action, SIGNAL(triggered(bool)), this, SLOT(toggle()));
|
||||
connect(m_action, &QAction::triggered, this, &TrackMouseEffect::toggle);
|
||||
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &TrackMouseEffect::slotMouseChanged);
|
||||
reconfigure(ReconfigureAll);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantLi
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
|
||||
|
||||
connect(m_ui->shortcut, SIGNAL(keySequenceChanged(QKeySequence)),
|
||||
SLOT(shortcutChanged(QKeySequence)));
|
||||
connect(m_ui->shortcut, &KKeySequenceWidget::keySequenceChanged,
|
||||
this, &TrackMouseEffectConfig::shortcutChanged);
|
||||
|
||||
load();
|
||||
}
|
||||
|
|
|
@ -56,11 +56,11 @@ WindowGeometry::WindowGeometry()
|
|||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::CTRL + Qt::SHIFT + Qt::Key_F11);
|
||||
effects->registerGlobalShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_F11, a);
|
||||
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggle()));
|
||||
connect(a, &QAction::triggered, this, &WindowGeometry::toggle);
|
||||
|
||||
connect(effects, SIGNAL(windowStartUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowStartUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowFinishUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowFinishUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowStepUserMovedResized(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowStepUserMovedResized(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, &EffectsHandler::windowStartUserMovedResized, this, &WindowGeometry::slotWindowStartUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowFinishUserMovedResized, this, &WindowGeometry::slotWindowFinishUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowStepUserMovedResized, this, &WindowGeometry::slotWindowStepUserMovedResized);
|
||||
}
|
||||
|
||||
WindowGeometry::~WindowGeometry()
|
||||
|
|
|
@ -62,7 +62,7 @@ WindowGeometryConfig::WindowGeometryConfig(QWidget* parent, const QVariantList&
|
|||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::CTRL + Qt::SHIFT + Qt::Key_F11);
|
||||
myUi->shortcuts->addCollection(myActionCollection);
|
||||
|
||||
connect(myUi->shortcuts, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(myUi->shortcuts, &KShortcutsEditor::keyChange, this, qOverload<>(&WindowGeometryConfig::changed));
|
||||
|
||||
addConfig(WindowGeometryConfiguration::self(), myUi);
|
||||
|
||||
|
|
|
@ -141,13 +141,12 @@ WobblyWindowsEffect::WobblyWindowsEffect()
|
|||
{
|
||||
initConfig<WobblyWindowsConfig>();
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), this, SLOT(slotWindowAdded(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowStartUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowStartUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowStepUserMovedResized(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowStepUserMovedResized(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(windowFinishUserMovedResized(KWin::EffectWindow*)), this, SLOT(slotWindowFinishUserMovedResized(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowMaximizedStateChanged(KWin::EffectWindow*,bool,bool)), this, SLOT(slotWindowMaximizeStateChanged(KWin::EffectWindow*,bool,bool)));
|
||||
|
||||
connect(effects, &EffectsHandler::windowAdded, this, &WobblyWindowsEffect::slotWindowAdded);
|
||||
connect(effects, &EffectsHandler::windowClosed, this, &WobblyWindowsEffect::slotWindowClosed);
|
||||
connect(effects, &EffectsHandler::windowStartUserMovedResized, this, &WobblyWindowsEffect::slotWindowStartUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowStepUserMovedResized, this, &WobblyWindowsEffect::slotWindowStepUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowFinishUserMovedResized, this, &WobblyWindowsEffect::slotWindowFinishUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowMaximizedStateChanged, this, &WobblyWindowsEffect::slotWindowMaximizeStateChanged);
|
||||
connect(effects, &EffectsHandler::windowDataChanged, this, &WobblyWindowsEffect::cancelWindowGrab);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ WobblyWindowsEffectConfig::WobblyWindowsEffectConfig(QWidget* parent, const QVar
|
|||
m_ui.setupUi(this);
|
||||
|
||||
addConfig(WobblyWindowsConfig::self(), this);
|
||||
connect(m_ui.kcfg_WobblynessLevel, SIGNAL(valueChanged(int)), this, SLOT(wobblinessChanged()));
|
||||
connect(m_ui.kcfg_WobblynessLevel, &QSlider::valueChanged, this, &WobblyWindowsEffectConfig::wobblinessChanged);
|
||||
|
||||
load();
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomLeft()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveZoomLeft);
|
||||
|
||||
a = new QAction(this);
|
||||
a->setObjectName(QStringLiteral("MoveZoomRight"));
|
||||
|
@ -93,7 +93,7 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomRight()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveZoomRight);
|
||||
|
||||
a = new QAction(this);
|
||||
a->setObjectName(QStringLiteral("MoveZoomUp"));
|
||||
|
@ -101,7 +101,7 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomUp()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveZoomUp);
|
||||
|
||||
a = new QAction(this);
|
||||
a->setObjectName(QStringLiteral("MoveZoomDown"));
|
||||
|
@ -109,7 +109,7 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>());
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>());
|
||||
effects->registerGlobalShortcut(QKeySequence(), a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveZoomDown()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveZoomDown);
|
||||
|
||||
// TODO: these two actions don't belong into the effect. They need to be moved into KWin core
|
||||
a = new QAction(this);
|
||||
|
@ -118,7 +118,7 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_F5);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_F5);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::Key_F5, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveMouseToFocus()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveMouseToFocus);
|
||||
|
||||
a = new QAction(this);
|
||||
a->setObjectName(QStringLiteral("MoveMouseToCenter"));
|
||||
|
@ -126,13 +126,12 @@ ZoomEffect::ZoomEffect()
|
|||
KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_F6);
|
||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_F6);
|
||||
effects->registerGlobalShortcut(Qt::META + Qt::Key_F6, a);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(moveMouseToCenter()));
|
||||
connect(a, &QAction::triggered, this, &ZoomEffect::moveMouseToCenter);
|
||||
|
||||
timeline.setDuration(350);
|
||||
timeline.setFrameRange(0, 100);
|
||||
connect(&timeline, SIGNAL(frameChanged(int)), this, SLOT(timelineFrameChanged(int)));
|
||||
connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)),
|
||||
this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)));
|
||||
connect(&timeline, &QTimeLine::frameChanged, this, &ZoomEffect::timelineFrameChanged);
|
||||
connect(effects, &EffectsHandler::mouseChanged, this, &ZoomEffect::slotMouseChanged);
|
||||
|
||||
source_zoom = -1; // used to trigger initialZoom reading
|
||||
reconfigure(ReconfigureAll);
|
||||
|
|
|
@ -58,7 +58,7 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) :
|
|||
|
||||
addConfig(ZoomConfig::self(), m_ui);
|
||||
|
||||
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
|
||||
connect(m_ui->editor, &KShortcutsEditor::keyChange, this, qOverload<>(&ZoomEffectConfig::changed));
|
||||
|
||||
// Shortcut config. The shortcut belongs to the component "kwin"!
|
||||
KActionCollection *actionCollection = new KActionCollection(this, QStringLiteral("kwin"));
|
||||
|
|
Loading…
Reference in a new issue