OpendTect-6_4  6.4
uiattrsel.h
Go to the documentation of this file.
1 #ifndef uiattrsel_h
2 #define uiattrsel_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: April 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiattributesmod.h"
16 #include "uidialog.h"
17 #include "uiiosel.h"
18 #include "attribdescid.h"
19 #include "datapack.h"
20 #include "survgeom.h"
21 
22 namespace Attrib { class Desc; class DescSet; class SelInfo; class SelSpec; }
23 namespace ZDomain { class Info; }
24 
25 class IOObj;
26 class NLAModel;
27 class TrcKeyZSampling;
28 class uiButtonGroup;
29 class uiGenInput;
30 class uiIOObjInserter;
31 class uiListBox;
32 class uiLabeledComboBox;
33 class uiRadioButton;
34 
39 mExpClass(uiAttributes) uiAttrSelData
40 { mODTextTranslationClass(uiAttrSelData);
41 public:
42 
43  uiAttrSelData(bool is2d,bool fillwithdef=true);
44  uiAttrSelData(const Attrib::DescSet&,
45  bool fillwithdef=true);
46 
49  int outputnr_;
50  int compnr_;
52 
53  bool is2D() const;
54  const Attrib::DescSet& attrSet() const { return *attrset_; }
55  void setAttrSet( const Attrib::DescSet* ds )
56  { if ( ds ) attrset_ = ds; }
57  void fillSelSpec(Attrib::SelSpec&) const;
58 
59 protected:
60 
62 
63 };
64 
65 
77 mExpClass(uiAttributes) uiAttrSelDlg : public uiDialog
79 public:
80 
81  mExpClass(uiAttributes) Setup
82  {
83  public:
84  Setup( const uiString& txt )
85  : seltxt_(txt)
86  , ignoreid_(Attrib::DescID::undef())
87  , isinp4otherattrib_(false)
88  , showsteeringdata_(false)
89  , geomid_(mUdfGeomID)
90  {}
91 
92  mDefSetupMemb(uiString,seltxt)
94  mDefSetupMemb(bool,isinp4otherattrib)
95  mDefSetupMemb(bool,showsteeringdata)
97  };
98 
100  const Setup&);
103  const Setup&);
104  ~uiAttrSelDlg();
105 
106  // if ( go() ) ...
107  Attrib::DescID attribID() const { return attrdata_.attribid_; }
109  int outputNr() const { return attrdata_.outputnr_; }
111  int compNr() const { return attrdata_.compnr_; }
113  const char* zDomainKey() const;
114 
115  bool is2D() const { return attrdata_.is2D(); }
116  const Attrib::DescSet& getAttrSet() const { return attrdata_.attrSet(); }
117  int selType() const;
118  void fillSelSpec(Attrib::SelSpec&) const;
119 
120 protected:
121 
124  bool usedasinput_; //input for another attribute
129 
132 
139 
148 
151 
152  void initAndBuild(const uiString&,Attrib::DescID,bool);
153  void createSelectionButtons();
154  void createSelectionFields();
155 
156  bool getAttrData(bool);
157  void replaceStoredByInMem();
158  void doFinalise( CallBacker* );
159  void selDone(CallBacker*);
160  void filtChg(CallBacker*);
161  void cubeSel(CallBacker*);
162  void objInserted(CallBacker*);
163  virtual bool acceptOK(CallBacker*);
164 };
165 
166 
174 mExpClass(uiAttributes) uiAttrSel : public uiIOSelect
176 public:
178  const char* txt=0,
180  bool isinp4otherattrib = true);
181  uiAttrSel(uiParent*,const char*,const uiAttrSelData&,
182  bool isinp4otherattrib = true);
184 
185  Attrib::DescID attribID() const { return attrdata_.attribid_; }
186  int outputNr() const { return attrdata_.outputnr_; }
187  inline bool is2D() const { return attrdata_.is2D(); }
188  inline bool is3D() const { return !is2D(); }
189 
190  void setDescSet(const Attrib::DescSet*);
192  void setDesc(const Attrib::Desc*);
195  void setSelSpec(const Attrib::SelSpec*);
196  void setNLAModel(const NLAModel*);
197 
198  void setIgnoreDesc(const Attrib::Desc*);
199  void setIgnoreID( Attrib::DescID id ) { ignoreid_ = id; }
200  void setPossibleDataPacks(const TypeSet<DataPack::FullID>&);
201  void showSteeringData( bool yn ) { showsteeringdata_=yn;}
202  void setGeomID( Pos::GeomID id ) { geomid_ = id; }
203  Pos::GeomID getGeomID() const { return geomid_; }
204 
205  virtual void getHistory(const IOPar&);
206  virtual void processInput();
207 
208  const char* errMsg() { return errmsg_.str(); }
209  bool getRanges(TrcKeyZSampling&) const;
211 
212  void fillSelSpec(Attrib::SelSpec&) const;
213  bool checkOutput(const IOObj&) const;
214  const char* getAttrName() const;
215 
216  void setObjectName(const char*);
217  const Attrib::DescSet& getAttrSet() const { return attrdata_.attrSet(); }
218 
219 protected:
220 
222  bool is2d_;
224  bool usedasinput_; //input for another attribute
227  int seltype_;
230 
232 
233  void updateInput();
234  void update2D();
235  void doSel(CallBacker*);
236  virtual const char* userNameFromKey(const char*) const;
237 
238  static uiString cDefLabel();
239 };
240 
241 
247 mExpClass(uiAttributes) uiImagAttrSel : public uiAttrSel
249 public:
250  uiImagAttrSel( uiParent* p, const char* txt,
251  const uiAttrSelData& asd )
252  : uiAttrSel(p,txt,asd) {}
253 
254  inline Attrib::DescID realID() const { return attribID(); }
255  Attrib::DescID imagID() const;
256 
257 };
258 
259 
260 #endif
#define mExpClass(module)
Definition: commondefs.h:160
uiImagAttrSel(uiParent *p, const char *txt, const uiAttrSelData &asd)
Definition: uiattrsel.h:250
bool usedasinput_
Definition: uiattrsel.h:124
TypeSet< DataPack::FullID > dpfids_
Definition: uiattrsel.h:130
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
int seltype_
Definition: uiattrsel.h:227
Attrib::DescID attribID() const
-1 if not selected
Definition: uiattrsel.h:107
uiGenInput * filtfld_
Definition: uiattrsel.h:145
uiAttrSelData attrdata_
Definition: uiattrsel.h:122
Definition: ioobj.h:58
const char * str() const
Definition: odstring.h:48
int outputNr() const
Definition: uiattrsel.h:186
Supplies lists of available attribute input.
Definition: attribsel.h:150
uiAttrSelData attrdata_
Definition: uiattrsel.h:221
const char * errMsg()
Definition: uiattrsel.h:208
int compNr() const
-1 if not selected
Definition: uiattrsel.h:111
Definition: uiattrsel.h:81
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const Attrib::DescSet * attrset_
Definition: uiattrsel.h:61
Minimum Interface for NLA models.
Definition: nlamodel.h:20
bool is2d_
Definition: uiattrsel.h:222
User interface element for getting attribute with both real and imaginary part.
Definition: uiattrsel.h:247
Set of attribute descriptions.
Definition: attribdescset.h:35
uiRadioButton * nlafld_
Definition: uiattrsel.h:137
AttribDesc ID: each Desc has a unique ID in a set; the boolean isstored allows us to know whether thi...
Definition: attribdescid.h:27
const NLAModel * nlamodel_
Definition: uiattrsel.h:48
MultiID insertedobjmid_
Definition: uiattrsel.h:131
uiRadioButton * steerfld_
Definition: uiattrsel.h:135
Attrib::SelInfo * attrinf_
Definition: uiattrsel.h:123
Definition: uistring.h:89
BufferString usrnm_
Definition: uiattrsel.h:226
Definition: uiparent.h:26
Attrib::DescID attribid_
Definition: uiattrsel.h:47
uiListBox * attroutfld_
Definition: uiattrsel.h:142
uiListBox * storoutfld_
Definition: uiattrsel.h:140
uiLabeledComboBox * compfld_
Definition: uiattrsel.h:147
TypeSet< DataPack::FullID > dpfids_
Definition: uiattrsel.h:231
Definition: uidialog.h:42
Setup(const uiString &txt)
Definition: uiattrsel.h:84
ObjectSet< uiIOObjInserter > inserters_
Definition: uiattrsel.h:149
bool in_action_
Definition: uiattrsel.h:125
uiRadioButton * attrfld_
Definition: uiattrsel.h:136
List Box.
Definition: uilistbox.h:75
uiListBox * zdomoutfld_
Definition: uiattrsel.h:144
BufferString zdomainkey_
Definition: uiattrsel.h:127
FixedString Desc()
Definition: keystrs.h:62
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const Attrib::DescSet & getAttrSet() const
Definition: uiattrsel.h:116
Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected.
Definition: attribdesc.h:89
bool showsteerdata_
Definition: uiattrsel.h:126
BufferString errmsg_
Definition: uiattrsel.h:225
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
inserts a new object into the OD data store.
Definition: uiioobjinserter.h:31
General Input Element.
Definition: uigeninput.h:58
bool is2D() const
Definition: uiattrsel.h:187
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Definition: uicombobox.h:133
uiRadioButton * storfld_
Definition: uiattrsel.h:134
bool is3D() const
Definition: uiattrsel.h:188
int compnr_
Definition: uiattrsel.h:50
uiGenInput * attr2dfld_
Definition: uiattrsel.h:146
bool showsteeringdata_
Definition: uiattrsel.h:228
static DescID undef()
Definition: attribdescid.h:58
User Interface (UI) element for selection of Attributes from an attribute set.
Definition: uiattrsel.h:77
Definition: uibuttongroup.h:30
Definition: uibutton.h:114
Index_Type GeomID
Definition: commontypes.h:52
uiListBox * nlaoutfld_
Definition: uiattrsel.h:143
Attrib::DescID realID() const
Definition: uiattrsel.h:254
void setIgnoreID(Attrib::DescID id)
Definition: uiattrsel.h:199
const ZDomain::Info * zdomaininfo_
Definition: uiattrsel.h:51
Attrib::DescID attribID() const
Definition: uiattrsel.h:185
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString errmsg_
Definition: horizontracker.h:119
uiListBox * steeroutfld_
Definition: uiattrsel.h:141
User interface for attribute selection data.
Definition: uiattrsel.h:39
bool is2D(const PicksType &picks)
Definition: pickset.h:142
bool usedasinput_
Definition: uiattrsel.h:224
uiRadioButton * zdomainfld_
Definition: uiattrsel.h:138
User interface element for storing attribute desc selection.
Definition: uiattrsel.h:174
ObjectSet< uiButton > extselbuts_
Definition: uiattrsel.h:150
void setGeomID(Pos::GeomID id)
Definition: uiattrsel.h:202
void showSteeringData(bool yn)
Definition: uiattrsel.h:201
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
Pos::GeomID getGeomID() const
Definition: uiattrsel.h:203
bool is2D() const
Definition: uiattrsel.h:115
#define mUdfGeomID
Definition: survgeom.h:211
void setAttrSet(const Attrib::DescSet *ds)
Definition: uiattrsel.h:55
const Attrib::DescSet & getAttrSet() const
Definition: uiattrsel.h:217
int outputnr_
Definition: uiattrsel.h:49
Pos::GeomID geomid_
Definition: uiattrsel.h:229
~uiAttrSel()
Definition: uiattrsel.h:183
uiButtonGroup * selgrp_
Definition: uiattrsel.h:133
UI element for selection of data objects.
Definition: uiiosel.h:30
Information of z-domain.
Definition: zdomain.h:91
Compound key consisting of ints.
Definition: multiid.h:25
Semblance Attribute.
Definition: attribdataholder.h:25
int outputNr() const
-1 if not selected
Definition: uiattrsel.h:109
const Attrib::DescSet & attrSet() const
Definition: uiattrsel.h:54
Definition: zdomain.h:20
Pos::GeomID geomid_
Definition: uiattrsel.h:128
Attrib::DescID ignoreid_
Definition: uiattrsel.h:223

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