MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / FadingLabel

Method FadingLabel

src/interface/FadingLabel.cpp:7–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <QSequentialAnimationGroup>
6
7FadingLabel::FadingLabel(QWidget* parent) : QLabel(parent)
8{
9 effect = new QGraphicsOpacityEffect(this);
10 effect->setOpacity(0.0);
11 this->setGraphicsEffect(effect);
12
13 fadeInOut = new QSequentialAnimationGroup(this);
14 fadeIn = new QPropertyAnimation(effect, "opacity");
15 fadeIn->setDuration(150);
16 fadeIn->setEasingCurve(QEasingCurve::Type::OutCurve);
17 fadeIn->setStartValue(0);
18 fadeIn->setEndValue(1.0);
19 fadeOut = new QPropertyAnimation(effect, "opacity");
20 fadeOut->setDuration(150);
21 fadeOut->setEasingCurve(QEasingCurve::Type::OutCurve);
22 fadeOut->setStartValue(1.0);
23 fadeOut->setEndValue(0.0);
24
25 fadeInOut->addAnimation(fadeIn);
26 fadeInOut->addPause(3000);
27 fadeInOut->addAnimation(fadeOut);
28}
29
30void FadingLabel::setAnimatedText(const QString &msg, bool highPriority)
31{

Callers

nothing calls this directly

Calls 2

setDurationMethod · 0.80
setEasingCurveMethod · 0.80

Tested by

no test coverage detected