#pragma once #include #include "iPlotBase_global.h" class ZxRenderItem; /// 命令: 删除一个图元 class I_PLOTBASE_EXPORT ZxDeleteCommand : public QUndoCommand { public: ZxDeleteCommand(ZxRenderItem* pItem, \ bool bKeepPlace = false, \ bool bNeedLayout = true, \ QUndoCommand *parent = 0); ~ZxDeleteCommand(); virtual void redo(); virtual void undo(); private: ZxRenderItem* m_pParent; ZxRenderItem* m_pItem; int m_nIndex; bool m_bKeepPlace : 1; bool m_bDeleted : 1; bool m_bNeedLayout : 1; };