ZKDigitalClock.h 847 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * ZKDigitalClock.h
  3. *
  4. * Created on: Sep 19, 2017
  5. * Author: guoxs
  6. */
  7. #ifndef _CONTROL_ZKDIGITALCLOCK_H_
  8. #define _CONTROL_ZKDIGITALCLOCK_H_
  9. #include "ZKTextView.h"
  10. class ZKDigitalClockPrivate;
  11. /**
  12. * @brief 数字时钟控件
  13. */
  14. class ZKDigitalClock : public ZKTextView {
  15. ZK_DECLARE_PRIVATE(ZKDigitalClock)
  16. public:
  17. ZKDigitalClock(ZKBase *pParent);
  18. virtual ~ZKDigitalClock();
  19. protected:
  20. ZKDigitalClock(ZKBase *pParent, ZKBasePrivate *pBP);
  21. virtual void onBeforeCreateWindow(const Json::Value &json);
  22. virtual void onAfterCreateWindow(const Json::Value &json);
  23. virtual const char* getClassName() const { return ZK_DIGITALCLOCK; }
  24. virtual void onDraw(ZKCanvas *pCanvas);
  25. virtual void onTimer(int id);
  26. private:
  27. void parseDigitalClockAttributeFromJson(const Json::Value &json);
  28. };
  29. #endif /* _CONTROL_ZKDIGITALCLOCK_H_ */