#pragma once #include class ZxRenderItem; /// 区域缩放和滚轮缩放 class I_PLOTBASE_EXPORT ZxZoomTool : public ZxSimpleTool { Q_OBJECT public: ZxZoomTool(); ZxZoomTool(const ZxZoomTool& c); protected: virtual bool onLeftDown(const QPointF& pt); virtual bool onLeftUp(const QPointF& pt); virtual bool onMouseMove(const QPointF& pt); virtual bool onMouseWheel(const QPointF& pt, int delta); virtual void onPaint(QPainter* painter, const ZxPaintParam& param); protected: bool m_bTracking; QRectF m_rtTracker; };