#pragma once #include #include class QPointF; class ZxRenderItem; /// 控制点编辑工具 class I_PLOTBASE_EXPORT ZxHandleTool : public ZxSimpleTool { Q_OBJECT public: ZxHandleTool(); protected: bool onLeftDown(const QPointF& pt); bool onLeftUp(const QPointF& pt); bool onMouseMove(const QPointF& pt); bool onLeftDoubleClick(const QPointF& pt); virtual void onSelectionChanged(ZxSelection& selection); virtual void onActivated(); virtual void onDeactivated(); ZxHandleRef findHandle(ZxSceneItem* pScene, const QPointF& pt, float fHandleSize); protected slots: void onItemDetached(ZxRenderItem* p); private: bool m_bMoving; ZxHandleRef m_handleMove; ZxHandleRef m_handleHover; };