OpendTect-6_4  6.4
uiseissel.h
Go to the documentation of this file.
1 #ifndef uiseissel_h
2 #define uiseissel_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Bril
8  Date: July 2001
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uiseismod.h"
15 #include "uiioobjsel.h"
16 #include "uiioobjseldlg.h"
17 #include "uicompoundparsel.h"
18 #include "seistype.h"
19 #include "ctxtioobj.h"
20 
21 class uiSeisIOObjInfo;
22 class uiLabeledComboBox;
23 class uiListBox;
24 class uiCheckBox;
25 
26 mExpClass(uiSeis) uiSeisSel : public uiIOObjSel
28 public:
29 
30  struct Setup : public uiIOObjSel::Setup
31  {
32  enum SteerPol { NoSteering=0, OnlySteering=1, InclSteer=2 };
33 
35  : geom_(gt)
36  , allowsetdefault_(true)
37  , steerpol_(NoSteering)
38  , enabotherdomain_(false)
39  , survdefsubsel_( 0 )
40  , allowsetsurvdefault_(false)
41  , explprepost_(false)
42  , selectcomp_(false) {}
43  Setup( bool is2d, bool isps )
44  : geom_(Seis::geomTypeOf(is2d,isps))
45  , allowsetdefault_(true)
46  , steerpol_(NoSteering)
47  , enabotherdomain_(false)
48  , survdefsubsel_( 0 )
49  , allowsetsurvdefault_(false)
50  , explprepost_(false)
51  , selectcomp_(false) {}
52 
54  mDefSetupMemb(bool,allowsetdefault)
55  mDefSetupMemb(bool,enabotherdomain)
56  mDefSetupMemb(SteerPol,steerpol)
58  mDefSetupMemb(const char*,survdefsubsel)
59  mDefSetupMemb(bool,allowsetsurvdefault)
60  mDefSetupMemb(bool,explprepost)
61  mDefSetupMemb(bool,selectcomp)
62 
63  Setup& wantSteering( bool yn=true )
64  {
65  steerpol_ = yn ? OnlySteering : NoSteering;
66  return *this;
67  }
68  };
69 
70  uiSeisSel(uiParent*,const IOObjContext&,const Setup&);
71  ~uiSeisSel();
72 
73  virtual bool fillPar(IOPar&) const;
74  virtual void usePar(const IOPar&);
75 
76  inline Seis::GeomType geomType() const { return seissetup_.geom_; }
77  inline bool is2D() const { return Seis::is2D(seissetup_.geom_); }
78  inline bool isPS() const { return Seis::isPS(seissetup_.geom_); }
79 
80  void setCompNr(int);
81  int compNr() const { return compnr_; }
82  virtual void processInput();
83  virtual bool existingTyped() const;
84  virtual void updateInput();
85 
86  static IOObjContext ioContext(Seis::GeomType,bool forread);
87 
88 protected:
89 
91  int compnr_;
95 
96  Setup mkSetup(const Setup&,bool forread);
97  virtual void fillDefault();
98  virtual void newSelection(uiIOObjRetDlg*);
99  virtual void commitSucceeded();
100  virtual const char* userNameFromKey(const char*) const;
101  virtual const char* compNameFromKey(const char*) const;
102  virtual uiIOObjRetDlg* mkDlg();
103  void mkOthDomBox();
104 
105  virtual const char* getDefaultKey(Seis::GeomType) const;
106 
107 };
108 
109 
112 public:
113 
115  const uiSeisSel::Setup&);
116 
117  virtual void fillPar(IOPar&) const;
118  virtual void usePar(const IOPar&);
119 
120 protected:
121 
126 
127  void entrySel(CallBacker*);
128  const char* getDataType();
129  void getComponentNames(BufferStringSet&) const;
130 private:
131  static uiString gtSelTxt(const uiSeisSel::Setup& setup,bool forread);
132  friend class uiSeisSel;
133 };
134 
135 
138 public:
139 
140  uiSteerCubeSel(uiParent*,bool is2d,
141  bool forread=true,
142  const uiString& txt=
143  toUiString("%1 %2")
144  .arg(uiStrings::sSteering())
145  .arg(uiStrings::sData()));
146 
147 protected:
148 
149  virtual const char* getDefaultKey(Seis::GeomType gt) const;
150 
151 };
152 
153 
154 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
int steerpol_
Definition: uiseissel.h:123
BufferString notalloweddatatype_
Definition: uiseissel.h:124
Definition: uiioobjsel.h:42
Definition: uiseisioobjinfo.h:18
bool is2D() const
Definition: uiseissel.h:77
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Dialog letting the user select an object. It returns an IOObj* after successful go().
Definition: uiioobjseldlg.h:22
Export_Basic uiString toUiString(ViewStyle)
virtual const char * getDefaultKey(Seis::GeomType) const
bool is2D(GeomType gt)
Definition: seistype.h:34
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
BufferString curusrnm_
Definition: uiseissel.h:92
int compnr_
Definition: uiseissel.h:91
Definition: uistring.h:89
Definition: uiparent.h:26
uiLabeledComboBox * compfld_
Definition: uiseissel.h:122
Set of BufferString objects.
Definition: bufstringset.h:28
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
Definition: uiseissel.h:110
Setup(bool is2d, bool isps)
Definition: uiseissel.h:43
Definition: uiioobjseldlg.h:35
List Box.
Definition: uilistbox.h:75
bool isPS() const
Definition: uiseissel.h:78
Setup(Seis::GeomType gt)
Definition: uiseissel.h:34
GeomType
Definition: seistype.h:33
bool isPS(GeomType gt)
Definition: seistype.h:38
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Definition: uiseissel.h:26
Definition: uiseissel.h:136
uiCheckBox * othdombox_
Definition: uiseissel.h:94
static uiString sData()
Definition: uiseissel.h:30
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Definition: uicombobox.h:133
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
IOPar dlgiopar_
Definition: uiseissel.h:93
BufferString zdomainkey_
Definition: uiseissel.h:125
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
static uiString sSteering()
Definition: uistrings.h:464
int compNr() const
Definition: uiseissel.h:81
SteerPol
Definition: uiseissel.h:32
Seis::GeomType geomType() const
Definition: uiseissel.h:76
GeomType geomTypeOf(const char *)
Definition: uibutton.h:134
Setup seissetup_
Definition: uiseissel.h:90
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62

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