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

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