ZKQRCode.h 751 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * ZKQRCode.h
  3. *
  4. * Created on: Oct 9, 2017
  5. * Author: guoxs
  6. */
  7. #ifndef _CONTROL_ZKQRCODE_H_
  8. #define _CONTROL_ZKQRCODE_H_
  9. #include "ZKBase.h"
  10. class ZKQRCodePrivate;
  11. /**
  12. * @brief 二维码控件
  13. */
  14. class ZKQRCode : public ZKBase {
  15. ZK_DECLARE_PRIVATE(ZKQRCode)
  16. public:
  17. ZKQRCode(ZKBase *pParent);
  18. virtual ~ZKQRCode();
  19. /**
  20. * @brief 加载二维码数据
  21. */
  22. bool loadQRCode(const char *pStr);
  23. protected:
  24. ZKQRCode(ZKBase *pParent, ZKBasePrivate *pBP);
  25. virtual void onBeforeCreateWindow(const Json::Value &json);
  26. virtual const char* getClassName() const { return ZK_QRCODE; }
  27. virtual void onDraw(ZKCanvas *pCanvas);
  28. private:
  29. void parseQRCodeAttributeFromJson(const Json::Value &json);
  30. };
  31. #endif /* _CONTROL_ZKQRCODE_H_ */