File indexing completed on 2024-12-01 06:51:42
0001 /*************************************************************************** 0002 cmapcmdgroup.h 0003 ------------------- 0004 begin : Wed Feb 27 2002 0005 copyright : (C) 2002 by Kmud Developer Team 0006 email : kmud-devel@kmud.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef CMAPCMDGROUP_H 0019 #define CMAPCMDGROUP_H 0020 0021 #include <QList> 0022 0023 #include "cmapcommand.h" 0024 0025 class CMapManager; 0026 0027 class CMapCmdGroup : public CMapCommand 0028 { 0029 public: 0030 CMapCmdGroup(CMapManager *mapManager,QString name); 0031 ~CMapCmdGroup() override; 0032 void redo() override; 0033 void undo() override; 0034 void addCommand(CMapCommand *command); 0035 CMapCmdGroup *getPreviousGroup(void); 0036 void setPreviousGroup(CMapCmdGroup *group); 0037 0038 private: 0039 CMapManager *m_mapManager; 0040 /** A list of commands in the group */ 0041 QList<CMapCommand *> commands; 0042 /** A pointer to the group above this, NULL if it's the main history */ 0043 CMapCmdGroup *previousGroup; 0044 }; 0045 0046 0047 #endif