#ifndef TIMEWIDGET_H
#define TIMEWIDGET_H

#include <QWidget>
#include <QTimer>
#include <QDateTime>

class QHBoxLayout;
class QLabel;
class QLCDNumber;

class LedText;

class TimeWidget : public QWidget
{
    Q_OBJECT

public:
    TimeWidget(QWidget *parent = nullptr);
    ~TimeWidget();

    void start();
    void stop();

private:
    void initUI();
    void connects();

private slots:
    void updateTimeDisplay();

private:
    QHBoxLayout* mTimeHLayout;
    QLabel* mStartTimeLabel;
    QLCDNumber* mStartTimeLCDNumber;
    QLabel* mEndTimeLabel;
    QLCDNumber* mEndTimeLCDNumber;
    QLabel* mTimeSpanLabel;
    LedText* mTimeSpanLedText;

    QTimer mTimer;
    QDateTime mStartTime;
    QDateTime mEndTime;

};
#endif // TIMEWIDGET_H
