You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iPlot/iPlotCurveT/Commands/ZxCommandMove.h

43 lines
942 B
C

#pragma once
#include <QPointF>
#include <QUndoCommand>
#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<QPointF>& vecPoss,
const QVector<int> vecIndexesModified,
double fOffsetX = 0.f,
double fOffsetY = 0.f,
QUndoCommand* parent = 0);
virtual void redo();
virtual void undo();
private:
ZxObjBase* m_pObj;
QVector<QPointF> m_vecPoss;
//这是对Brother的处理
double m_fOffsetX; //整体移动时Brother的偏移量为了redo/undo
double m_fOffsetY;
QVector<int> m_vecIndexesModified;
};