File indexing completed on 2024-12-08 06:46:37
0001 /*************************************************************************** 0002 cmapcmdelementdelete.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 CMAPCMDELEMENTDELETE_H 0019 #define CMAPCMDELEMENTDELETE_H 0020 0021 #include <qstringlist.h> 0022 #include <qfont.h> 0023 #include <qpoint.h> 0024 0025 #include "cmapcommand.h" 0026 #include "cmapelementutil.h" 0027 0028 class CMapElement; 0029 class CMapManager; 0030 class CMapLevel; 0031 class CMapRoom; 0032 class CMapZone; 0033 class CMapText; 0034 class CMapPath; 0035 0036 class CMapCmdElementDelete : public CMapCommand,CMapElementUtil 0037 { 0038 public: 0039 CMapCmdElementDelete(CMapManager *mapManager,QString name,bool delOpsite = true); 0040 ~CMapCmdElementDelete() override; 0041 void redo() override; 0042 void undo() override; 0043 0044 void addElement(KMemConfig *newElementProperties); 0045 0046 private: 0047 /** The number of elements stored in the command */ 0048 int groups; 0049 /** A Pointer to the map manager */ 0050 CMapManager *manager; 0051 /** Contains all the properties need to create the element */ 0052 KMemConfig *properties; 0053 /** If this is false and element is a path don't delete the opsite path */ 0054 bool m_delOpsite; 0055 }; 0056 0057 0058 #endif