#ifndef ZTIMEEDIT_H
#define ZTIMEEDIT_H

#include <QWidget>
#include <QTimeEdit>
#include <QPushButton>
#include <QLabel>

QT_BEGIN_NAMESPACE
class QPushButton;
class QComboBox;
class QGroupBox;
class QLineEdit;
class QDate;
class QGridLayout;
class QHBoxLayout;
class QVBoxLayout;

class Event;
class DataBase;
QT_END_NAMESPACE

class DayLabel;
class CalendarWidget;

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

    void setDisplayFormat(const QString &format);

private:
    QPushButton *m_popupButton=nullptr;
    CalendarWidget* m_pCldrWgt;
    QDateTime m_dateTime;
    QString m_strFormat;

public slots:
    void showCalendarWidget();

protected slots:
    void slotDayClicked(const QDateTime & dt);
};

#endif // ZTIMEEDIT_H
