Plasma
Go to the documentation of this file.
18 #include <plasma/private/effects/ripple_p.h>
24 WaterAnimation::WaterAnimation(
QObject *parent)
25 : EasingAnimation(parent),
30 qint8 WaterAnimation::offset()
const
35 void WaterAnimation::setOffset(qint8 offset)
40 void WaterAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
47 RippleEffect *effect = qobject_cast<RippleEffect*>(widget->graphicsEffect());
49 effect =
new RippleEffect(widget);
50 widget->setGraphicsEffect(effect);
53 if (oldState == Stopped && newState == Running) {
54 effect->setOffset(m_offset);
55 effect->setEnabled(
true);
56 }
else if (newState == Stopped) {
57 effect->setEnabled(
false);
61 void WaterAnimation::updateEffectiveTime(
int currentTime)
64 if (widget && widget->graphicsEffect()) {
65 widget->graphicsEffect()->setProperty(
"opacity", currentTime / qreal(duration()));
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.