File indexing completed on 2024-05-12 04:03:59
0001 /*************************************************************************** 0002 cmapcmdmoveelements.h 0003 ------------------- 0004 begin : Mon Jun 17 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 CMAPCMDMOVEELEMENTS_H 0019 #define CMAPCMDMOVEELEMENTS_H 0020 0021 #include "../../cmapcommand.h" 0022 0023 #include <list> 0024 #include <QPoint> 0025 0026 0027 class CMapManager; 0028 class CMapElement; 0029 0030 /** 0031 *@author Kmud Developer Team 0032 */ 0033 0034 class CMapCmdMoveElements : public CMapCommand 0035 { 0036 public: 0037 CMapCmdMoveElements(CMapManager *mapManager,QPoint offset); 0038 ~CMapCmdMoveElements() override; 0039 0040 void addElement(CMapElement *element); 0041 0042 void redo() override; 0043 void undo() override; 0044 0045 private: 0046 struct elemProp 0047 { 0048 int level; 0049 QPoint pos; 0050 int labelPos; 0051 }; 0052 0053 std::list<elemProp> elements; 0054 CMapManager *m_mapManager; 0055 QPoint m_offset; 0056 }; 0057 0058 #endif