Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / landscape_editor / landscape_actions.h
blob9579417d088a7d3843ab40f662b49018b688984c
1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef LANDSCAPE_ACTIONS_H
21 #define LANDSCAPE_ACTIONS_H
23 // Project includes
24 #include "builder_zone.h"
25 #include "landscape_scene.h"
27 // NeL includes
29 // Qt includes
30 #include <QtGui/QUndoCommand>
31 #include <QtGui/QGraphicsScene>
32 #include <QtGui/QGraphicsItem>
34 namespace LandscapeEditor
37 /**
38 @class LigoTileCommand
39 @brief
40 @details
42 class LigoTileCommand: public QUndoCommand
44 public:
45 LigoTileCommand(const LigoData &data, const ZonePosition &zonePos,
46 ZoneBuilder *zoneBuilder, LandscapeScene *scene,
47 QUndoCommand *parent = 0);
48 virtual ~LigoTileCommand();
50 virtual void undo();
51 virtual void redo();
53 private:
54 ZonePosition m_zonePos;
55 LigoData m_newLigoData;
56 LigoData m_oldLigoData;
57 ZoneBuilder *m_zoneBuilder;
58 LandscapeScene *m_scene;
61 /**
62 @class UndoScanRegionCommand
63 @brief
64 @details
66 class UndoScanRegionCommand: public QUndoCommand
68 public:
69 UndoScanRegionCommand(bool direction, ZoneBuilder *zoneBuilder, LandscapeScene *scene, QUndoCommand *parent = 0);
70 virtual ~UndoScanRegionCommand();
72 void setScanList(const QList<ZonePosition> &zonePositionList);
73 virtual void undo();
74 virtual void redo();
76 private:
77 void applyChanges();
79 bool m_direction;
80 QList<ZonePosition> m_zonePositionList;
81 ZoneBuilder *m_zoneBuilder;
82 LandscapeScene *m_scene;
85 /**
86 @class LigoResizeCommand
87 @brief
88 @details
90 class LigoResizeCommand: public QUndoCommand
92 public:
93 LigoResizeCommand(int index, sint32 newMinX, sint32 newMaxX,
94 sint32 newMinY, sint32 newMaxY, ZoneBuilder *zoneBuilder,
95 QUndoCommand *parent = 0);
96 virtual ~LigoResizeCommand();
98 virtual void undo();
99 virtual void redo();
101 private:
102 int m_index;
103 sint32 m_newMinX;
104 sint32 m_newMaxX;
105 sint32 m_newMinY;
106 sint32 m_newMaxY;
107 NLLIGO::CZoneRegion m_oldZoneRegion;
108 ZoneBuilder *m_zoneBuilder;
111 } /* namespace LandscapeEditor */
113 #endif // LANDSCAPE_ACTIONS_H