1#ifndef ELECTRONIC_SHUTDOWN_EFFECT_H
2#define ELECTRONIC_SHUTDOWN_EFFECT_H
5#include <QGraphicsEffect>
57 void draw(QPainter *painter)
override;
void SetProgress(qreal progress)
Sets the progress of the shutdown animation. Clamps the value between 0.0 and 1.0 and triggers an upd...
Definition electronic_shutdown_effect.cpp:12
qreal GetProgress() const
Gets the current progress of the shutdown animation.
Definition electronic_shutdown_effect.h:42
ElectronicShutdownEffect(QObject *parent=nullptr)
Constructs an ElectronicShutdownEffect. Initializes the effect, sets up the result cache,...
Definition electronic_shutdown_effect.cpp:7
qreal last_progress_
Stores the progress value from the last time the cache was updated, used to optimize cache usage.
Definition electronic_shutdown_effect.h:63
void draw(QPainter *painter) override
Overridden draw method that renders the shutdown effect. Retrieves the source pixmap....
Definition electronic_shutdown_effect.cpp:17
QCache< QString, QPixmap > result_cache_
Cache storing pre-rendered effect pixmaps keyed by progress level string for performance.
Definition electronic_shutdown_effect.h:65
qreal progress
Property controlling the progress of the shutdown animation (0.0 to 1.0). Animatable.
Definition electronic_shutdown_effect.h:21
qreal progress_
Current progress level of the shutdown animation (0.0 to 1.0).
Definition electronic_shutdown_effect.h:61