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