#pragma once #include #include #include "Defines.h" #include "iPlotCurveT_global.h" class ZxPaintParam; // 8控制点管理器 class I_PLOTCURVE_T_EXPORT ZxHandleHelper { public: ZxHandleHelper(); ZxHandleHelper(const QRectF& rt); public: // 边界 virtual void setBounds(const QRectF& rt); virtual QRectF getBounds() const; // handle virtual RectPos hitTest(const QPointF& pt, double fHdlSize = 2.2f); static QVector getEightPoints(const QRectF& rtBound); static QPointF getOnePointOf(const QRectF& rtBound, RectPos o); // 光标 virtual QCursor getCursor(RectPos o); // 绘制 virtual void paintBack(QPainter* painter, const ZxPaintParam& param, RectPos oActive = OUTER); private: QRectF m_rtBound; };