#pragma once #include #include #include "iPlotCurveT_global.h" class ZxObjBase; // 命令: 移动一个图元 // TODO 为了压力移动时的速度,而更改逻辑 // 如果m_fOffsetX>0,且m_vecPoss为空,则认为是直接对后台的Value进行偏移处理 class I_PLOTCURVE_T_EXPORT ZxCommandMove : public QUndoCommand { public: ZxCommandMove(ZxObjBase* pObj, const QVector& vecPoss, const QVector vecIndexesModified, float fOffsetX = 0.f, float fOffsetY = 0.f, QUndoCommand* parent = 0); virtual void redo(); virtual void undo(); private: ZxObjBase* m_pObj; QVector m_vecPoss; //这是对Brother的处理 float m_fOffsetX; //整体移动时,Brother的偏移量,为了redo/undo float m_fOffsetY; QVector m_vecIndexesModified; };