#ifndef TIMEPLAYEDWIDGET_H
#define TIMEPLAYEDWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>

class TimePlayedWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TimePlayedWidget(QWidget* parent = nullptr);

public slots:
    void setDuration(qint64 ms);
    void setPosition(qint64 ms);
    void reset();

private:
    QLabel* label_;
    qint64 duration_ = 0;

    QString formatTime(qint64 ms) const;
};

#endif // TIMEPLAYEDWIDGET_H
