#ifndef ELEANACLOCK_H #define ELEANACLOCK_H #include "gutil/qjson.h" #include #include #include class EleAnaClock : public QWidget { Q_OBJECT public: explicit EleAnaClock(double w, double h, QString path, const JValue &layer, QWidget *parent); void cal(); QTimeZone timeZone; QPixmap img; QColor pinHourColor, pinMinColor, pinSecColor; QPointF hPoses[3]{}, mPoses[3]{}, sPoses[3]{}; double hAngle, mAngle, sAngle; QPen pen; int timerId{0}; bool showSecHand{true}; protected: void paintEvent(QPaintEvent *) override; void timerEvent(QTimerEvent *) override; }; #endif // ELEANACLOCK_H