File indexing completed on 2024-12-08 06:46:38

0001 /***************************************************************************
0002                                cmapcmdtogglepathtwoway.h
0003                              -------------------
0004     begin                : Thu Mar 7 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 CMAPCMDTOGGLEPATHTWOWAY_H
0019 #define CMAPCMDTOGGLEPATHTWOWAY_H
0020 
0021 #include <qstring.h>
0022 
0023 #include "cmapelementutil.h"
0024 
0025 #include "cmapcommand.h"
0026 
0027 class CMapPath;
0028 class CMapManager;
0029 class CMapLevel;
0030 class CMapManager;
0031 
0032 /**
0033   *@author Kmud Developer Team
0034   */
0035 class CMapCmdTogglePathTwoWay : public CMapCommand,CMapElementUtil
0036 {
0037 public:
0038     CMapCmdTogglePathTwoWay(CMapManager *mapManager,QString name,CMapPath *path);
0039     ~CMapCmdTogglePathTwoWay() override;
0040     
0041     void redo() override;
0042     void undo() override;
0043 
0044 private:
0045     void togglePath(CMapPath *path);
0046 
0047     CMapManager *m_mapManager;
0048 
0049     int m_srcRoom;
0050     int m_srcLevel;
0051     directionTyp m_srcDir;
0052     QString m_specialCmd;
0053 };
0054 
0055 #endif