qt/LedOK/player/eleanaclock.h
2022-08-25 18:37:24 +08:00

25 lines
558 B
C++

#ifndef ELEANACLOCK_H
#define ELEANACLOCK_H
#include <QWidget>
#include <QTimeZone>
#include <QPainterPath>
class EleAnaClock : public QWidget {
Q_OBJECT
public:
explicit EleAnaClock(QString path, const QJsonObject &layer, QWidget *parent = nullptr);
void cal();
QTimeZone timeZone;
QPixmap img;
QColor pinHourColor, pinMinColor, pinSecColor;
QPainterPath sPath, mPath, hPath;
int timerId = 0;
protected:
void paintEvent(QPaintEvent *) override;
void timerEvent(QTimerEvent *) override;
};
#endif // ELEANACLOCK_H