Plasma
Go to the documentation of this file.
18#include <plasma/private/effects/ripple_p.h>
24WaterAnimation::WaterAnimation(
QObject *parent)
25 : EasingAnimation(parent),
30qint8 WaterAnimation::offset()
const
35void WaterAnimation::setOffset(qint8 offset)
40void 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);
61void WaterAnimation::updateEffectiveTime(
int currentTime)
64 if (widget && widget->graphicsEffect()) {
65 widget->graphicsEffect()->setProperty(
"opacity", currentTime / qreal(duration()));
Namespace for everything in libplasma.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.