Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/anidata.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
90 | , fullScreenEffectLock(fullScreenEffectLock_) | 90 | , fullScreenEffectLock(fullScreenEffectLock_) | ||
91 | , waitAtSource(waitAtSource_) | 91 | , waitAtSource(waitAtSource_) | ||
92 | , keepAtTarget(keepAtTarget_) | 92 | , keepAtTarget(keepAtTarget_) | ||
93 | , keepAlive(keepAlive) | 93 | , keepAlive(keepAlive) | ||
94 | , previousWindowPixmapLock(previousWindowPixmapLock_) | 94 | , previousWindowPixmapLock(previousWindowPixmapLock_) | ||
95 | { | 95 | { | ||
96 | } | 96 | } | ||
97 | 97 | | |||
98 | bool AniData::isActive() const | ||||
99 | { | ||||
100 | if (!timeLine.done()) { | ||||
101 | return true; | ||||
102 | } | ||||
103 | | ||||
104 | if (keepAtTarget) { | ||||
105 | return timeLine.direction() == TimeLine::Forward | ||||
106 | || terminationPolicy == AnimationEffect::DontTerminateAtSource; | ||||
107 | } | ||||
108 | | ||||
109 | return false; | ||||
110 | } | ||||
111 | | ||||
98 | static QString attributeString(KWin::AnimationEffect::Attribute attribute) | 112 | static QString attributeString(KWin::AnimationEffect::Attribute attribute) | ||
99 | { | 113 | { | ||
100 | switch (attribute) { | 114 | switch (attribute) { | ||
101 | case KWin::AnimationEffect::Opacity: return QStringLiteral("Opacity"); | 115 | case KWin::AnimationEffect::Opacity: return QStringLiteral("Opacity"); | ||
102 | case KWin::AnimationEffect::Brightness: return QStringLiteral("Brightness"); | 116 | case KWin::AnimationEffect::Brightness: return QStringLiteral("Brightness"); | ||
103 | case KWin::AnimationEffect::Saturation: return QStringLiteral("Saturation"); | 117 | case KWin::AnimationEffect::Saturation: return QStringLiteral("Saturation"); | ||
104 | case KWin::AnimationEffect::Scale: return QStringLiteral("Scale"); | 118 | case KWin::AnimationEffect::Scale: return QStringLiteral("Scale"); | ||
105 | case KWin::AnimationEffect::Translation: return QStringLiteral("Translation"); | 119 | case KWin::AnimationEffect::Translation: return QStringLiteral("Translation"); | ||
Show All 17 Lines |