#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 RectBoundPos hitTest(const QPointF& pt, double dHandleSize = 2.2); static QVector getEightPoints(const QRectF& rtBound); static QPointF getOnePointOf(const QRectF& rtBound, RectBoundPos o); // 光标 virtual QCursor getCursor(RectBoundPos o); // 绘制 virtual void paintBack(QPainter* painter, const ZxPaintParam& param, RectBoundPos oActive = RBP_Outer); private: QRectF m_rtBound; };