#ifndef TIMEWIDGET_H
#define TIMEWIDGET_H

#include <QObject>
#include <QWidget>
#include <QTimer>
#include <QLabel>
#include <QDateTime>
#include <QVBoxLayout>

#include <libkydate.h>
#include "klabel.h"

enum dateinfo {
    DATE,
    TIME,
};

class LockDialogModel;
extern float scale;
class TimeWidget : public QWidget
{
    Q_OBJECT
public:
    explicit TimeWidget(LockDialogModel *model, QWidget *parent = nullptr);
    ~TimeWidget();
    void updateUI();

Q_SIGNALS:

public Q_SLOTS:
    void update_datatime();
    void timerStart();
    void timerStop();

private:

    QString getLongFormatDate(int type);


private:
    LockDialogModel *m_modelLockDialog = nullptr;
    QTimer * m_timer = nullptr;
    KLabel * m_t_label = nullptr;
    KLabel * m_d_label = nullptr;
    double m_curFontSize;
    double m_ptToPx = 1.0;
};

#endif // TIMEWIDGET_H
