FaceAccess/Linguist/utility/DndModeCountDownItem.h
2024-07-11 11:27:12 +08:00

23 lines
574 B
C++

#ifndef __DNDMODECOUNTDOWNITEM_H__
#define __DNDMODECOUNTDOWNITEM_H__
#include <QWidget>
#include <chrono>
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__