File indexing completed on 2025-04-27 10:17:25
0001 /*************************************************************************** 0002 cmapcmdelementcreate.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 CMAPCMDELEMENTCREATE_H 0019 #define CMAPCMDELEMENTCREATE_H 0020 0021 #include <QList> 0022 #include <qstringlist.h> 0023 #include <qfont.h> 0024 #include <qpoint.h> 0025 #include <qstring.h> 0026 0027 #include "cmapcommand.h" 0028 #include "cmapelementutil.h" 0029 0030 #include "kmemconfig.h" 0031 0032 class CMapElement; 0033 class CMapManager; 0034 class CMapLevel; 0035 class CMapRoom; 0036 class CMapZone; 0037 class CMapText; 0038 class CMapPath; 0039 0040 class CMapCmdElementCreate : public CMapCommand,CMapElementUtil 0041 { 0042 public: 0043 CMapCmdElementCreate(CMapManager *mapManager,QString name); 0044 ~CMapCmdElementCreate() override; 0045 void redo() override; 0046 void undo() override; 0047 0048 void addElement(KMemConfig *newElementProperties,QString grp = "Properties"); 0049 0050 QList<CMapElement *> *getElements(); 0051 0052 private: 0053 /** The number of elements stored in the command */ 0054 int groups; 0055 /** A Pointer to the map manager */ 0056 CMapManager *manager; 0057 /** Contains all the properties need to create the element */ 0058 KMemConfig *properties; 0059 /** This contains a list of elements that have been create by the execute method */ 0060 QList<CMapElement *> elements; 0061 bool executed; 0062 }; 0063 0064 #endif