#ifndef COUNTDOWNWIDGET_H
#define COUNTDOWNWIDGET_H

#include <QWidget>
#include <QTimer>
#include <QPainter>

class CountdownWidget : public QWidget
{
    Q_OBJECT
public:
    explicit CountdownWidget(QWidget *parent = nullptr);
    ~CountdownWidget();

protected:
    void paintEvent(QPaintEvent *event) override;

signals:
    void countdownFinished();

private slots:
    void onTimerTimeout();

private:
    QTimer *m_timer;
    int m_remainingSeconds;
};

#endif // COUNTDOWNWIDGET_H
