15 , m_startTime(i_seconds)
16 , m_timeLeft(i_seconds)
60 if (!m_isActive && m_startTime > 0) {
65 if (m_timer.isActive()) {
70 Q_EMIT update(m_timeLeft);
82 m_isActive = m_timer.isActive();
93 m_timeLeft = m_startTime;
void setStartTime(unsigned int i_seconds)
Set the countdown start time.
static constexpr int ONE_SECOND
auto reset() -> bool
Reset countdown (reset.
auto start() -> bool
Start countdown.
void elapsed()
Countdown elapsed.
auto stop() -> bool
Stop countdown and check.
void updateTimeLeft()
Start the timer until there is no time left, means.
Countdown(QObject *parent=nullptr, unsigned int i_seconds=0)
Countdown constructor.
auto isActive() const -> bool
Show countdown status.
void update(unsigned int)
Update countdown.