#pragma once #include #include #include "iPlotCurveT_global.h" class ZxObjBase; class ZxRenderItem; // 命令: 添加一个图元 class I_PLOTCURVE_T_EXPORT ZxCommandAdd : public QUndoCommand { public: ZxCommandAdd(QVector* pVecAllObjs, ZxObjBase* pObj, int nIndex = -1, bool bNeedLayout = true, QUndoCommand* parent = 0); ~ZxCommandAdd(); virtual void redo(); virtual void undo(); private: QVector* m_pVecAllObjs; ZxObjBase* m_pObj; int m_nIndex; bool m_bNeedLayout; bool m_bShowSubObjs; ZxRenderItem* m_pParent; };