23 lines
574 B
C++
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__
|