File indexing completed on 2024-12-08 06:46:37
0001 /*************************************************************************** 0002 cmapcmdmovemap.h 0003 ------------------- 0004 begin : Thu Feb 28 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 CMAPCMDMOVEMAP_H 0019 #define CMAPCMDMOVEMAP_H 0020 0021 #include <qpoint.h> 0022 0023 #include "cmapcommand.h" 0024 0025 class CMapManager; 0026 0027 /**This command is used to move all elements in the current zone 0028 *@author Kmud Developer Team 0029 */ 0030 class CMapCmdMoveMap : public CMapCommand 0031 { 0032 public: 0033 CMapCmdMoveMap(CMapManager *manager,QPoint offset,QString name); 0034 ~CMapCmdMoveMap() override; 0035 0036 void redo() override; 0037 void undo() override; 0038 0039 private: 0040 /** This method is used to move the elements in a zone by the given vector */ 0041 void moveMap(QPoint inc); 0042 0043 private: 0044 /** The map manager */ 0045 CMapManager *m_manager; 0046 /** The offset to move the elements */ 0047 QPoint m_Offset; 0048 0049 }; 0050 0051 #endif