#pragma once #include "Defines.h" #include "ZxObjLineTool.h" // 特征线工具 class I_PLOTCURVE_T_EXPORT ZxObjLineSlrTool : public ZxObjLineTool { Q_OBJECT public: ZxObjLineSlrTool(); //ZxObjLineSlrTool(const ZxObjLineSlrTool& c); public: // 注意:由于线两个点的handle本身有大小,当拖动handle移动时, // m_ptStart选的是handle中点中的位置,而不是线的端点位置 // 所以这样常常会导致,斜率会无法保持一致 // 故需要对m_ptStart进行校正 virtual bool onLeftDown(const QPointF& pt); virtual bool onLeftUp(const QPointF& pt); virtual bool onMouseMove(const QPointF& pt); virtual void onPaint(QPainter* painter, const ZxPaintParam& param); //protected: // virtual Qt::CursorShape getCursorBy(const int& nOption, // const int& nSubIndex); };