qt/LedOK/player/eletimer.h

29 lines
560 B
C
Raw Permalink Normal View History

2023-04-18 14:14:46 +08:00
#ifndef ELETIMER_H
#define ELETIMER_H
2023-10-23 14:58:29 +08:00
#include "gutil/qjson.h"
2023-04-18 14:14:46 +08:00
#include <QWidget>
#include <QDateTime>
class EleTimer : public QWidget {
Q_OBJECT
public:
2023-10-23 14:58:29 +08:00
explicit EleTimer(const JValue &, QWidget *parent = 0);
2023-04-18 14:14:46 +08:00
QDateTime targetTime;
2023-10-23 14:58:29 +08:00
QString title;
QColor textColor;
QColor backColor;
2023-04-27 15:06:24 +08:00
QFont font;
2023-10-23 14:58:29 +08:00
bool isDown;
bool isMultiline;
bool hasDay;
bool hasHour;
bool hasMin;
bool hasSec;
2023-04-18 14:14:46 +08:00
int secs = 0;
protected:
void paintEvent(QPaintEvent *) override;
};
#endif // ELETIMER_H