#ifndef __DNDMODECOUNTDOWNITEM_H__ #define __DNDMODECOUNTDOWNITEM_H__ #include #include class QLabel; class DndModeCountDownItem : public QWidget { Q_OBJECT public: DndModeCountDownItem(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); void setEndTime(const std::chrono::system_clock::time_point &endTime); protected: void timerEvent(QTimerEvent *event) final; private: QLabel *m_label = nullptr; std::chrono::system_clock::time_point m_endTime; int m_timerId = -1; }; #endif // __DNDMODECOUNTDOWNITEM_H__