qt/LedOK/player/eletimer.h
2023-10-23 14:58:29 +08:00

29 lines
560 B
C++

#ifndef ELETIMER_H
#define ELETIMER_H
#include "gutil/qjson.h"
#include <QWidget>
#include <QDateTime>
class EleTimer : public QWidget {
Q_OBJECT
public:
explicit EleTimer(const JValue &, QWidget *parent = 0);
QDateTime targetTime;
QString title;
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