qt/LedOK/player/eletimer.h
2023-04-27 15:06:24 +08:00

28 lines
575 B
C++

#ifndef ELETIMER_H
#define ELETIMER_H
#include <QWidget>
#include <QDateTime>
class EleTimer : public QWidget {
Q_OBJECT
public:
explicit EleTimer(const QJsonObject&, QWidget *parent = 0);
QDateTime targetTime;
QString text;
QColor textColor;
QColor backColor;
QFont font;
bool isDown;
bool isMultiline;
bool hasDay;
bool hasHour;
bool hasMin;
bool hasSec;
int secs = 0;
protected:
void paintEvent(QPaintEvent *) override;
};
#endif // ELETIMER_H