#pragma once #include "ZxTool.h" class ZxCompoundTool; /// 简单图形工具 class I_PLOTBASE_EXPORT ZxSimpleTool : public ZxTool { Q_OBJECT public: ZxSimpleTool(); public: /// 获取所属的复合工具 ZxCompoundTool* getCompoundTool(); //virtual ZxSimpleTool* clone() const = 0; /// 从所属的复合工具中移除 virtual void detach(); /// 根据上下管件关联时,选上面的bottom问题而处理 virtual bool rehitTest(const QPointF& pt); protected: virtual bool onLeftDown(const QPointF& pt); virtual bool onLeftUp(const QPointF& pt); virtual bool onRightDown(const QPointF& pt); virtual bool onRightUp(const QPointF& pt); virtual bool onMouseWheel(const QPointF& pt, int delta); virtual bool onMouseMove(const QPointF& pt); virtual bool onLeftDoubleClick(const QPointF& pt); private: void _callOnActivated(); void _callOnDeactivated(); public: // 目前暂无好的方法,处理光标 bool m_bHitTestMoving; friend class ZxCompoundTool; };