|
ORE Studio 0.0.4
|
Manages the pulsing animation for recently-changed items in models. More...
#include <RecencyPulseManager.hpp>
Inherits QObject.

Signals | |
| void | pulse_state_changed (bool is_on) |
| Emitted whenever the pulse state changes. | |
| void | pulsing_complete () |
| Emitted when the pulsing animation completes all cycles. | |
Public Member Functions | |
| RecencyPulseManager (QObject *parent=nullptr, int pulse_interval_ms=500, int max_pulse_cycles=6) | |
| Constructs a RecencyPulseManager. | |
| void | start_pulsing () |
| Start or restart the pulsing animation. | |
| bool | is_pulse_on () const |
| Check if the pulse is currently in the "on" (highlighted) state. | |
| bool | is_pulsing () const |
| Check if the manager is currently pulsing. | |
| void | stop_pulsing () |
| Stop the pulsing animation immediately. | |
Manages the pulsing animation for recently-changed items in models.
This class provides a consistent pulsing mechanism for highlighting newly added or modified items in table models. The pulse alternates between on and off states for a configurable number of cycles.
Usage:
|
explicit |
Constructs a RecencyPulseManager.
| parent | Parent QObject |
| pulse_interval_ms | Interval between pulse state changes (default 500ms) |
| max_pulse_cycles | Number of complete on/off cycles (default 6) |
| void start_pulsing | ( | ) |
Start or restart the pulsing animation.
Resets the pulse count and starts the timer. If already pulsing, restarts from the beginning.
| bool is_pulse_on | ( | ) | const |
Check if the pulse is currently in the "on" (highlighted) state.
Use this in your model's data() method for ForegroundRole to determine if a recently-changed item should be highlighted.
| bool is_pulsing | ( | ) | const |
Check if the manager is currently pulsing.
|
signal |
Emitted whenever the pulse state changes.
Connect this to your model's dataChanged signal to update the view. The parameter indicates the new pulse state (true = highlighted).
|
signal |
Emitted when the pulsing animation completes all cycles.
Connect this to a slot that clears your recency tracking data (e.g., recent_codes_.clear()).