#pragma once #include class IxGridAlign; /// 移动工具 class I_PLOTBASE_EXPORT ZxMoveTool : public ZxSimpleTool { Q_OBJECT public: ZxMoveTool(); protected: bool onLeftUp(const QPointF& pt); bool onMouseMove(const QPointF& pt); void onPaint(QPainter* painter, const ZxPaintParam& param); QPointF caclSnapPos(QPointF pt, ZxRenderItem* item); protected: bool m_bMoving; QPointF m_ptOutlinePos; QPointF m_ptMouseItemOffset; ZxSelectionOutline m_outline; IxGridAlign* m_pSnapGrid; };