OpendTect  6.3
uisip.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: Bert
8  Date: Oct 2008
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uiiocommon.h"
14 #include "uidialog.h"
15 #include "uigroup.h"
16 #include "ranges.h"
17 
18 class LatLong;
19 class SurveyInfo;
20 class TrcKeyZSampling;
21 class uiDialog;
22 
23 
24 /*\brief Interface for survey info provider
25 
26  The survey setup can be delivered by scanning files (SEG-Y) or by querying
27  data stores like SeisWorks, Petrel, .... Another idea not implemented may be
28  to read a simple ascii file. In any case, this is the interface. The
29  implementation should be added to the factory using
30  uiSurveyInfoEditor::addInfoProvider.
31 
32  The logic is:
33 
34  * User gets list showing - if isAvailable() - your usrText() and icon
35  * User fills in your dialog
36  * On OK, getInfo is called
37  * If getInfo returns true, then you can stuff your own things in the
38  new SurveyInfo's IOPar if you define fillPar().
39 
40  In some cases, the provider can also allow actual data import. After
41  setting up the survey, the user can be automatically put into an import
42  facility. If that is the case, you have to return an IOPar by getImportPars()
43  that, when the time comes, will be used to call startImport().
44 
45  This class delivers everything in SI units.
46 
47  */
48 
50 { mODTextTranslationClass(uiSurvInfoProvider)
51 public:
52 
53  virtual ~uiSurvInfoProvider() {}
54 
55  enum TDInfo { Time, Depth, DepthFeet };
56  static TDInfo getTDInfo(bool istime,bool zinft=false);
57 
58  virtual uiString usrText() const = 0;
59  virtual uiDialog* dialog(uiParent*,TDInfo) = 0;
60  virtual bool getInfo(uiDialog*,TrcKeyZSampling&,
61  Coord crd[3]) = 0;
62  virtual bool getLatLongAnchor(Coord&,LatLong&)
63  { return false; }
64  virtual bool getSRD(float&) { return false; }
66 
67  virtual void fillPar(IOPar&) const {}
68  virtual bool isAvailable() const { return true; }
69 
70  virtual TDInfo tdInfo( bool& isknown ) const
71  { isknown = false; return Time; }
72  virtual bool xyInFeet() const { return false; }
73  virtual const char* iconName() const { return 0; }
74 
75  virtual IOPar* getImportPars() const { return 0; }
76  virtual void startImport(uiParent*,const IOPar&) {}
77  virtual uiString importAskQuestion() const
78  { return uiString::emptyString(); }
79 
80  static const char* sKeySIPName() { return "SIP.Name"; }
81 
82  bool runDialog(uiParent*,TDInfo,SurveyInfo&,
83  bool defdpthinft,bool* havezinfo=0);
84 
85 };
virtual const char * iconName() const
Definition: uisip.h:73
#define mExpClass(module)
Definition: commondefs.h:157
virtual bool getSRD(float &)
return value must be in SI units (meters)
Definition: uisip.h:64
static const uiString & emptyString()
Definition: uistring.h:107
virtual IOPar * getImportPars() const
Definition: uisip.h:75
Definition: uistring.h:88
Definition: uiparent.h:24
Holds survey general information.
Definition: survinfo.h:54
Geographical coordinates, decimal but with conv to deg, min, sec.
Definition: latlong.h:22
Definition: uidialog.h:40
Definition: uisip.h:49
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
virtual bool isAvailable() const
Definition: uisip.h:68
virtual bool getLatLongAnchor(Coord &, LatLong &)
Definition: uisip.h:62
static const char * sKeySIPName()
Definition: uisip.h:80
Definition: uisip.h:55
FixedString Time()
Definition: keystrs.h:129
virtual uiString importAskQuestion() const
Definition: uisip.h:77
virtual void startImport(uiParent *, const IOPar &)
Definition: uisip.h:76
virtual TDInfo tdInfo(bool &isknown) const
Definition: uisip.h:70
mODTextTranslationClass(uiSurvInfoProvider) public
Definition: uisip.h:50
virtual void fillPar(IOPar &) const
Definition: uisip.h:67
2D point or vector class.
Definition: commontypes.h:58
TDInfo
Definition: uisip.h:55
virtual bool xyInFeet() const
Definition: uisip.h:72
FixedString Depth()
Definition: keystrs.h:58

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