Changeset View
Changeset View
Standalone View
Standalone View
effects/thumbnailaside/thumbnailaside.cpp
Show All 33 Lines | |||||
34 | { | 34 | { | ||
35 | initConfig<ThumbnailAsideConfig>(); | 35 | initConfig<ThumbnailAsideConfig>(); | ||
36 | QAction* a = new QAction(this); | 36 | QAction* a = new QAction(this); | ||
37 | a->setObjectName(QStringLiteral("ToggleCurrentThumbnail")); | 37 | a->setObjectName(QStringLiteral("ToggleCurrentThumbnail")); | ||
38 | a->setText(i18n("Toggle Thumbnail for Current Window")); | 38 | a->setText(i18n("Toggle Thumbnail for Current Window")); | ||
39 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T); | 39 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T); | ||
40 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T); | 40 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T); | ||
41 | effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_T, a); | 41 | effects->registerGlobalShortcut(Qt::META + Qt::CTRL + Qt::Key_T, a); | ||
42 | connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleCurrentThumbnail())); | 42 | connect(a, &QAction::triggered, this, &ThumbnailAsideEffect::toggleCurrentThumbnail); | ||
43 | 43 | | |||
44 | connect(effects, SIGNAL(windowClosed(KWin::EffectWindow*)), this, SLOT(slotWindowClosed(KWin::EffectWindow*))); | 44 | connect(effects, &EffectsHandler::windowClosed, this, &ThumbnailAsideEffect::slotWindowClosed); | ||
45 | connect(effects, SIGNAL(windowGeometryShapeChanged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(KWin::EffectWindow*,QRect))); | 45 | connect(effects, &EffectsHandler::windowGeometryShapeChanged, this, &ThumbnailAsideEffect::slotWindowGeometryShapeChanged); | ||
46 | connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowDamaged(KWin::EffectWindow*,QRect))); | 46 | connect(effects, &EffectsHandler::windowDamaged, this, &ThumbnailAsideEffect::slotWindowDamaged); | ||
47 | connect(effects, SIGNAL(screenLockingChanged(bool)), SLOT(repaintAll())); | 47 | connect(effects, &EffectsHandler::screenLockingChanged, this, &ThumbnailAsideEffect::repaintAll); | ||
48 | reconfigure(ReconfigureAll); | 48 | reconfigure(ReconfigureAll); | ||
49 | } | 49 | } | ||
50 | 50 | | |||
51 | void ThumbnailAsideEffect::reconfigure(ReconfigureFlags) | 51 | void ThumbnailAsideEffect::reconfigure(ReconfigureFlags) | ||
52 | { | 52 | { | ||
53 | ThumbnailAsideConfig::self()->read(); | 53 | ThumbnailAsideConfig::self()->read(); | ||
54 | maxwidth = ThumbnailAsideConfig::maxWidth(); | 54 | maxwidth = ThumbnailAsideConfig::maxWidth(); | ||
55 | spacing = ThumbnailAsideConfig::spacing(); | 55 | spacing = ThumbnailAsideConfig::spacing(); | ||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |