OpendTect-6_4  6.4
emundo.h
Go to the documentation of this file.
1 #ifndef emundo_h
2 #define emundo_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "undo.h"
18 #include "emposid.h"
19 #include "coord.h"
20 #include "color.h"
21 
22 namespace Geometry { class ParametricSurface; }
23 template <class T> class Array2D;
24 
25 namespace EM
26 {
27 class Horizon3D;
28 
33 mExpClass(EarthModel) EMUndo : public Undo
34 {
35 public:
36 
37  ObjectID getCurrentEMObjectID(bool forredo) const;
38 };
39 
40 
41 mExpClass(EarthModel) EMUndoEvent : public UndoEvent
42 {
43 public:
44 
45  virtual ObjectID getObjectID() const =0;
46 };
47 
48 
50 {
51 public:
52  SetPosUndoEvent(const Coord3& oldpos,const EM::PosID&);
53 
54  const char* getStandardDesc() const;
55  bool unDo();
56  bool reDo();
57  ObjectID getObjectID() const { return posid_.objectID(); }
58 
59 protected:
62 
63  static const char* savedposstr_;
64 };
65 
66 
72 {
73 public:
77  Array2D<float>*,const RowCol& oldorigin);
78 
79  const char* getStandardDesc() const;
80  bool unDo();
81  bool reDo();
82  ObjectID getObjectID() const;
83 
84 protected:
85  bool setArray(const Array2D<float>&, const RowCol& origin);
87 
94 };
95 
96 
102 {
103 public:
104  SetPosAttribUndoEvent(const EM::PosID&,int attrib,
105  bool yn );
106 
107  const char* getStandardDesc() const;
108  bool unDo();
109  bool reDo();
110  ObjectID getObjectID() const { return posid_.objectID(); }
111 
112 protected:
114  bool yn_;
115  int attrib_;
116 };
117 
118 
124 {
125 public:
126  PosIDChangeEvent(const EM::PosID& from,
127  const EM::PosID& to,
128  const Coord3& tosprevpos);
129 
130  const char* getStandardDesc() const;
131  bool unDo();
132  bool reDo();
133  ObjectID getObjectID() const { return to_.objectID(); }
134 
135 protected:
137  const EM::PosID to_;
139 };
140 
141 
147 {
148 public:
150  const Color& oldcol,
151  const Color& newcol);
152  const char* getStandardDesc() const;
153  bool unDo();
154  bool reDo();
155  ObjectID getObjectID() const { return objectid_; }
156 
157 protected:
161 };
162 
163 } // namespace EM
164 
165 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
const EM::PosID to_
Definition: emundo.h:137
const Color oldcolor_
Definition: emundo.h:159
static const char * savedposstr_
Definition: emundo.h:63
T to(const F &fr)
Definition: convert.h:33
Definition: emundo.h:49
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
const EM::ObjectID objectid_
Definition: emundo.h:158
Coord3 savedpos_
Definition: emundo.h:61
const Color newcolor_
Definition: emundo.h:160
UndoEvent for setting position attribute.
Definition: emundo.h:101
int attrib_
Definition: emundo.h:115
Coord3 savedpos_
Definition: emundo.h:138
ObjectID getObjectID() const
Definition: emundo.h:155
EM::PosID posid_
Definition: emundo.h:113
ObjectID getObjectID() const
Definition: emundo.h:110
Class to handle undo/redo information.
Definition: undo.h:42
Definition: emundo.h:41
Saves information from a EMObject::changePosID call.
Definition: emundo.h:123
EM::SectionID sid_
Definition: emundo.h:89
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
RowCol oldorigin_
Definition: emundo.h:90
Array2D< float > * newarr_
Definition: emundo.h:93
bool yn_
Definition: emundo.h:114
Set position UndoEvent.
Definition: emundo.h:33
Holds the information on how to undo/redo something.
Definition: undo.h:104
A cartesian coordinate in 3D space.
Definition: coord.h:72
EM::Horizon3D * horizon_
Definition: emundo.h:88
IdxPair used for its row() and col().
Definition: rowcol.h:25
ObjectID getObjectID() const
Definition: emundo.h:57
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
UndoEvent to set preferred Color.
Definition: emundo.h:146
Array2D< float > * oldarr_
Definition: emundo.h:92
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
EM::PosID posid_
Definition: emundo.h:60
Definition: arraytesselator.h:21
UndoEvent for setting all positions on a EM::Horizon3D section.
Definition: emundo.h:71
ObjectID getObjectID() const
Definition: emundo.h:133
RowCol neworigin_
Definition: emundo.h:91
const EM::PosID from_
Definition: emundo.h:136

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019