OpendTect-6_4  6.4
uiodviewer2dposgrp.h
Go to the documentation of this file.
1 #ifndef uiodviewer2dposgrp_h
2 #define uiodviewer2dposgrp_h
3 
4 /*+
5 ________________________________________________________________________
6 
7 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8 Author: Bruno/Satyaki
9 Date: Aug 2010
10 RCS: $Id: uiwellcorrstartdlg.h,v 1.1 2009-01-19 13:02:33 cvsbruno Exp
11 $
12 ________________________________________________________________________
13 
14 -*/
15 
16 
17 #include "uiodmainmod.h"
18 #include "uigroup.h"
19 #include "uislicesel.h"
20 #include "uistring.h"
21 
22 #include "attribsel.h"
23 #include "multiid.h"
24 #include "survgeom.h"
25 #include "survinfo.h"
26 #include "trckeyzsampling.h"
27 
28 class IOObj;
29 class uiAttrSel;
30 class uiLabeledComboBox;
31 class uiIOObjSel;
32 class uiODMain;
33 class uiODApplMgr;
34 class uiPushButton;
35 class uiSeis2DSubSel;
36 class uiSliceSel;
37 
38 namespace Geometry { class RandomLine; }
39 
40 mStruct(uiODMain) Viewer2DPosDataSel
41 {
42  enum PosType {InLine=0, CrossLine=1, Line2D=2, ZSlice=3, RdmLine=4 };
43  mDeclareEnumUtils(PosType);
44 
45  Viewer2DPosDataSel() { clean(); }
46  virtual ~Viewer2DPosDataSel() {}
47  Viewer2DPosDataSel(const Viewer2DPosDataSel& sd)
48  {
49  postype_ = sd.postype_;
50  selspec_ = sd.selspec_;
51  tkzs_ = sd.tkzs_;
52  rdmlineid_ = sd.rdmlineid_;
53  rdmlinemultiid_ = sd.rdmlinemultiid_;
54  geomid_ = sd.geomid_;
55  selectdata_ = sd.selectdata_;
56  }
57 
58  virtual void clean()
59  {
60  postype_ = SI().has3D() ? Viewer2DPosDataSel::InLine
61  : Viewer2DPosDataSel::Line2D;
62  selspec_ = Attrib::SelSpec();
63  tkzs_ = TrcKeyZSampling(true);
64  rdmlineid_ = -1;
65  rdmlinemultiid_ = MultiID::udf();
66  rdmlineid_ = mUdf(int);
68  selectdata_ = true;
69  }
70 
71  PosType postype_;
72  Attrib::SelSpec selspec_;
73  TrcKeyZSampling tkzs_;
74  Pos::GeomID geomid_;
75  MultiID rdmlinemultiid_;
76  int rdmlineid_;
77  bool selectdata_;
78 
79  static const char* sKeyRdmLineMultiID(){ return "Random Line MultiID"; }
80  static const char* sKeyRdmLineID() { return "Random Line ID"; }
81  static const char* sKeySelectData() { return "Select Data"; }
82 
83  virtual void fillPar(IOPar&) const;
84  virtual void usePar(const IOPar&);
85 };
86 
87 
90 public:
91 
93  Viewer2DPosDataSel*,
94  bool onlyvertical,
95  bool withpostype=false);
96  // Viewer2DPosDataSel objects becomes mine
97 
99 
100  bool is2D() const;
101  Viewer2DPosDataSel::PosType selPosType() const
102  { return posdatasel_->postype_; }
103  void showDataSelField(bool yn);
104  void setApplSceneMgr(uiODMain&);
105  virtual void fillPar(IOPar&) const;
106  virtual void usePar(const IOPar&);
107  Viewer2DPosDataSel& posDataSel() { return *posdatasel_; }
108  const Viewer2DPosDataSel& posDataSel() const { return *posdatasel_; }
109  virtual bool commitSel( bool emiterror );
110 
112 
113 protected:
114 
116  Viewer2DPosDataSel* posdatasel_;
117 
119 
128  uiGroup* topgrp_;
129  uiGroup* botgrp_;
130 
131  IOObj* get2DObj();
132  void init(bool);
133  void updateFlds();
134  void updateDataSelFld();
135  void updatePosFlds();
136  void updateTrcKeySampFld();
137  void createSliceSel(uiSliceSel::Type);
138 
139  void gen2DLine(CallBacker*);
140  void genRdmLine(CallBacker*);
141  void rdmLineDlgClosed(CallBacker*);
142  void inpSel(CallBacker*);
143  void attr2DSelected(CallBacker*);
144 
145  void getSelAttrSamp(TrcKeyZSampling&);
146 };
147 
148 #endif
Definition: uigroup.h:54
Viewer2DPosDataSel & posDataSel()
Definition: uiodviewer2dposgrp.h:107
#define mExpClass(module)
Definition: commondefs.h:160
bool onlyvertical_
Definition: uiodviewer2dposgrp.h:115
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: ioobj.h:58
Definition: uislicesel.h:29
static Geometry::ID cUndefGeomID()
Definition: survgeom.h:136
Application level manager - ties part servers together.
Definition: uiodapplmgr.h:55
is the base class for all buttons.
Definition: uibutton.h:83
OpendTect application top level object.
Definition: uiodmain.h:41
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Viewer2DPosDataSel::PosType selPosType() const
Definition: uiodviewer2dposgrp.h:101
Definition: uiseissubsel.h:90
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
uiAttrSel * inp2dfld_
Definition: uiodviewer2dposgrp.h:121
uiGroup * botgrp_
Definition: uiodviewer2dposgrp.h:129
Definition: uiparent.h:26
Definition: oduicommon.h:36
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:258
const Viewer2DPosDataSel & posDataSel() const
Definition: uiodviewer2dposgrp.h:108
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
uiPushButton * genrdmlinebut_
Definition: uiodviewer2dposgrp.h:126
static const MultiID & udf()
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
Index_Type GeomID
Definition: commontypes.h:52
Type
Definition: uislicesel.h:33
const SurveyInfo & SI()
Viewer2DPosDataSel * posdatasel_
Definition: uiodviewer2dposgrp.h:116
uiIOObjSel * rdmlinefld_
Definition: uiodviewer2dposgrp.h:123
bool is2D(const PicksType &picks)
Definition: pickset.h:142
User interface element for storing attribute desc selection.
Definition: uiattrsel.h:174
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
uiLabeledComboBox * postypefld_
Definition: uiodviewer2dposgrp.h:120
ObjectSet< uiSliceSel > sliceselflds_
Definition: uiodviewer2dposgrp.h:127
Definition: uiodviewer2dposgrp.h:88
uiODApplMgr * applmgr_
Definition: uiodviewer2dposgrp.h:118
uiPushButton * gen2dlinebut_
Definition: uiodviewer2dposgrp.h:125
Definition: arraytesselator.h:21
uiAttrSel * inp3dfld_
Definition: uiodviewer2dposgrp.h:122
Compound key consisting of ints.
Definition: multiid.h:25
uiGroup * topgrp_
Definition: uiodviewer2dposgrp.h:128
uiSeis2DSubSel * subsel2dfld_
Definition: uiodviewer2dposgrp.h:124
Notifier< uiODViewer2DPosGrp > inpSelected
Definition: uiodviewer2dposgrp.h:111
bool has3D() const

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