ZKPointer.h 854 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * ZKPointer.h
  3. *
  4. * Created on: Jul 17, 2017
  5. * Author: guoxs
  6. */
  7. #ifndef _CONTROL_ZKPOINTER_H_
  8. #define _CONTROL_ZKPOINTER_H_
  9. #include "ZKBase.h"
  10. class ZKPointerPrivate;
  11. /**
  12. * @brief 指针控件
  13. */
  14. class ZKPointer : public ZKBase {
  15. ZK_DECLARE_PRIVATE(ZKPointer)
  16. public:
  17. ZKPointer(ZKBase *pParent);
  18. virtual ~ZKPointer();
  19. /**
  20. * @brief 设置旋转角度
  21. */
  22. void setTargetAngle(float angle);
  23. protected:
  24. ZKPointer(ZKBase *pParent, ZKBasePrivate *pBP);
  25. virtual void onBeforeCreateWindow(const Json::Value &json);
  26. virtual const char* getClassName() const { return ZK_POINTER; }
  27. virtual bool onInterceptMessage(const struct _message_t *pMsg);
  28. virtual void onDraw(ZKCanvas *pCanvas);
  29. virtual void onTimer(int id);
  30. private:
  31. void parsePointerAttributeFromJson(const Json::Value &json);
  32. };
  33. #endif /* _CONTROL_ZKPOINTER_H_ */