OpendTect-6_4  6.4
uiiosurface.h
Go to the documentation of this file.
1 #ifndef uiiosurface_h
2 #define uiiosurface_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: July 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiearthmodelmod.h"
16 #include "uicompoundparsel.h"
17 #include "uidialog.h"
18 #include "uigroup.h"
19 
20 #include "bufstringset.h"
21 #include "faulttrace.h"
22 #include "trckeysampling.h"
23 #include "posinfo2dsurv.h"
24 #include "emposid.h"
25 
26 class CtxtIOObj;
27 class IODirEntryList;
28 class IOObj;
29 
30 class uiCheckBox;
31 class uiColorInput;
32 class uiFaultOptSel;
33 class uiGenInput;
34 class uiIOObjSel;
35 class uiIOSelect;
36 class uiListBox;
37 class uiPosSubSel;
38 class uiPushButton;
39 class uiStratLevelSel;
40 
41 namespace EM { class Surface; class SurfaceIODataSelection; }
42 
43 
46 mExpClass(uiEarthModel) uiIOSurface : public uiGroup
48 public:
49  ~uiIOSurface();
50 
51  const IOObj* selIOObj() const;
52  void getSelection(EM::SurfaceIODataSelection&) const;
53  void getSelAttributes( BufferStringSet&) const;
54  void setInput(const MultiID&) const;
55  void setSelAttributes(const BufferStringSet&) const;
56 
57  virtual bool processInput() { return true; }
58 
60  bool haveAttrSel() const;
61  uiIOObjSel* getObjSel() { return objfld_; }
62  uiPosSubSel* getPosSubSel() { return rgfld_; }
63 
64 protected:
65  uiIOSurface(uiParent*,bool forread,
66  const char* type);
67 
68  bool fillFields(const MultiID&,bool showerrmsg=true);
69  void fillFields(const EM::ObjectID&);
70  void fillSectionFld(const BufferStringSet&);
71  void fillAttribFld(const BufferStringSet&);
72  void fillRangeFld(const TrcKeySampling&);
73 
74  void mkAttribFld(bool);
75  void mkSectionFld(bool);
76  void mkRangeFld(bool multiss=false);
77  void mkObjFld(const uiString&);
78 
79  void objSel(CallBacker*);
80  void attrSel(CallBacker*);
81  virtual void ioDataSelChg(CallBacker*) {}
82 
87 
89  bool forread_;
90 
91  virtual void inpChanged() {}
92 };
93 
94 
95 mExpClass(uiEarthModel) uiSurfaceWrite : public uiIOSurface
97 public:
98 
99  mExpClass(uiEarthModel) Setup
100  {
101  public:
102  Setup( const char* surftyp, const uiString& type_name )
103  : typ_(surftyp)
104  , typname_( type_name )
105  , withsubsel_(false)
106  , withcolorfld_(false)
107  , withstratfld_(false)
108  , withdisplayfld_(false)
109  , displaytext_(tr("Replace in tree"))
110  {}
111 
113  mDefSetupMemb(uiString,typname)
114  mDefSetupMemb(bool,withsubsel)
115  mDefSetupMemb(bool,withcolorfld)
116  mDefSetupMemb(bool,withstratfld)
117  mDefSetupMemb(bool,withdisplayfld)
118  mDefSetupMemb(uiString,displaytext)
119  };
120 
122  const uiSurfaceWrite::Setup& setup);
124  const uiSurfaceWrite::Setup& setup);
125 
126  virtual bool processInput();
127  int getStratLevelID() const;
128  void setColor(const Color&);
129  Color getColor() const;
130  bool replaceInTree() const;
131 
132  uiCheckBox* getDisplayFld() { return displayfld_; }
133 
134 protected:
135  void stratLvlChg(CallBacker*);
136  void ioDataSelChg(CallBacker*);
137 
142 };
143 
144 
145 mExpClass(uiEarthModel) uiSurfaceRead : public uiIOSurface
147 public:
148  mExpClass(uiEarthModel) Setup
149  {
150  public:
151  Setup( const char* surftyp )
152  : typ_(surftyp)
153  , withattribfld_(true)
154  , withsectionfld_(true)
155  , withsubsel_(false)
156  , multisubsel_(false)
157  , multiattribsel_(true)
158  {}
159 
161  mDefSetupMemb(bool,withattribfld)
162  mDefSetupMemb(bool,withsectionfld)
163  mDefSetupMemb(bool,withsubsel)
164  mDefSetupMemb(bool,multisubsel)
165  mDefSetupMemb(bool,multiattribsel)
166  };
167 
168  uiSurfaceRead(uiParent*,const Setup&);
169 
170  virtual bool processInput();
171  void setIOObj(const MultiID&);
172 
174 
175 protected:
176 
177  void inpChanged() { inpChange.trigger(); }
178 
179 };
180 
181 
184 public:
185  uiHorizonParSel(uiParent*,bool is2d,
186  bool withclear=false);
187  ~uiHorizonParSel();
188 
189  void setSelected(const TypeSet<MultiID>&);
190  const TypeSet<MultiID>& getSelected() const;
191 
192  void fillPar(IOPar&) const;
193  bool usePar(const IOPar&);
194 
195  BufferString getSummary() const;
196 
197 protected:
198 
199  void clearPush(CallBacker*);
200  void doDlg(CallBacker*);
201 
202  bool is2d_;
204 };
205 
206 
209 public:
210  uiFaultParSel(uiParent*,bool is2d,
211  bool use_act_option=false);
212  ~uiFaultParSel();
213 
214  /*Set my own options on selected, optional*/
215  void setActOptions(const BufferStringSet&,
216  int defaultoptidx=0);
217  const TypeSet<int>& getSelectedOptIndies() const { return optids_; }
218 
219  void setSelectedFaults(const TypeSet<MultiID>&,
220  const TypeSet<FaultTrace::Act>* =0);
221  BufferString getSummary() const;
222  const TypeSet<MultiID>& selFaultIDs() const { return selfaultids_; }
223 
224  void setEmpty();
225  void setGeomIDs(const TypeSet<Pos::GeomID>&);
226  /*<for FaultStickSet picked from 2D lines.*/
227 
228  void hideClearButton(bool yn=true);
229  void updateOnSelChg(bool isfltset=false);
230 
232 
233 protected:
234 
235  friend class uiFaultOptSel;
236  void clearPush(CallBacker*);
237  void doDlg(CallBacker*);
238  void updateOnSelChgCB(CallBacker*);
239  bool is2d_;
243 
249 };
250 
251 mExpClass(uiEarthModel) uiAuxDataGrp : public uiGroup
253 public:
254  uiAuxDataGrp(uiParent*,bool forread);
255  ~uiAuxDataGrp();
256 
257  void setKey(const MultiID&);
258  void setDataName(const char*);
259  const char* getDataName() const;
260 
261 protected:
262  void selChg(CallBacker*);
263 
266 };
267 
268 
269 mExpClass(uiEarthModel) uiAuxDataSel : public uiGroup
271 public:
272  uiAuxDataSel(uiParent*,const char* type,
273  bool withobjsel);
274  ~uiAuxDataSel();
275 
276  void setKey(const MultiID&);
277  void setDataName(const char*);
278  MultiID getKey() const;
279  const char* getDataName() const;
280 
281 protected:
284 
285  void finalizeCB(CallBacker*);
286  void objSelCB(CallBacker*);
287  void auxSelCB(CallBacker*);
291 };
292 
293 #endif
Definition: uigroup.h:54
uiCheckBox * getDisplayFld()
Definition: uiiosurface.h:132
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
BufferString objtype_
Definition: uiiosurface.h:288
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
FixedString Setup()
Definition: keystrs.h:116
Definition: ioobj.h:58
Single-line element allowing multi-parameter to be set via a dialog.
Definition: uicompoundparsel.h:31
is the base class for all buttons.
Definition: uibutton.h:83
bool forread_
Definition: uiiosurface.h:89
BufferStringSet optnms_
Definition: uiiosurface.h:245
virtual void ioDataSelChg(CallBacker *)
Definition: uiiosurface.h:81
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Group to capture a user&#39;s position subselection wishes.
Definition: uipossubsel.h:33
TypeSet< Pos::GeomID > geomids_
Definition: uiiosurface.h:242
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Selector for stratigraphic levels.
Definition: uistratlvlsel.h:24
TypeSet< int > optids_
Definition: uiiosurface.h:246
Definition: uiiosurface.h:95
virtual bool processInput()
Definition: uiiosurface.h:57
Definition: uiiosurface.h:269
const TypeSet< MultiID > & selFaultIDs() const
Definition: uiiosurface.h:222
Definition: uistring.h:89
const TypeSet< int > & getSelectedOptIndies() const
Definition: uiiosurface.h:217
Definition: uiparent.h:26
Set of BufferString objects.
Definition: bufstringset.h:28
TypeSet< MultiID > selids_
Definition: uiiosurface.h:203
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
bool is2d_
Definition: uiiosurface.h:239
uiIOObjSel * objfld_
Definition: uiiosurface.h:282
uiIOObjSel * objfld_
Definition: uiiosurface.h:86
List Box.
Definition: uilistbox.h:75
TypeSet< MultiID > selfaultids_
Definition: uiiosurface.h:241
CtxtIOObj * ctio_
Definition: uiiosurface.h:88
Definition: uiiosurface.h:182
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
uiPosSubSel * getPosSubSel()
Definition: uiiosurface.h:62
Notifier< uiFaultParSel > selChange
Definition: uiiosurface.h:231
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
Base group for Surface input and output.
Definition: uiiosurface.h:46
General Input Element.
Definition: uigeninput.h:58
void trigger(T &t)
Definition: callback.h:258
uiIOSelect * auxdatafld_
Definition: uiiosurface.h:283
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
uiListBox * attribfld_
Definition: uiiosurface.h:84
int defaultoptidx_
Definition: uiiosurface.h:247
Definition: uiiosurface.h:145
uiStratLevelSel * stratlvlfld_
Definition: uiiosurface.h:140
Definition: uiiosurface.h:207
User Interface (UI) element for selection of IOObjs.
Definition: uiioobjsel.h:38
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
bool is2d_
Definition: uiiosurface.h:202
list of dir entries.
Definition: iodirentry.h:38
uiListBox * sectionfld_
Definition: uiiosurface.h:83
uiGenInput * inpfld_
Definition: uiiosurface.h:265
TrcKeySampling surfrange_
Definition: uiiosurface.h:141
Notifier< uiIOSurface > attrSelChange
Definition: uiiosurface.h:59
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
small element for color selection. Has no text label.
Definition: uicolor.h:44
FixedString Surface()
Definition: keystrs.h:126
uiListBox * listfld_
Definition: uiiosurface.h:264
bool useoptions_
Definition: uiiosurface.h:244
void inpChanged()
Definition: uiiosurface.h:177
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Notifier< uiIOSurface > inpChange
Definition: uiiosurface.h:173
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
uiColorInput * colbut_
Definition: uiiosurface.h:139
BufferStringSet selfaultnms_
Definition: uiiosurface.h:240
Surface I/O data selection.
Definition: emsurfaceiodata.h:62
virtual void inpChanged()
Definition: uiiosurface.h:91
uiCheckBox * displayfld_
Definition: uiiosurface.h:138
Definition: uibutton.h:134
BufferString seldatanm_
Definition: uiiosurface.h:290
Definition: uiiosurface.h:251
uiIOObjSel * getObjSel()
Definition: uiiosurface.h:61
uiPushButton * clearbut_
Definition: uiiosurface.h:248
UI element for selection of data objects.
Definition: uiiosel.h:30
MultiID key_
Definition: uiiosurface.h:289
Compound key consisting of ints.
Definition: multiid.h:25
uiPosSubSel * rgfld_
Definition: uiiosurface.h:85

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