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

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