OpendTect  6.3
uigeninputdlg.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: A.H. Bril
8  Date: May 2002
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uitoolsmod.h"
14 #include "uidialog.h"
15 #include "uigroup.h"
16 #include "datainpspec.h"
17 #include "uistring.h"
18 class uiGenInput;
19 
23 { mODTextTranslationClass(uiGenInputDlgEntry);
24 public:
26  DataInpSpec* s )
28  : txt(t), spec(s?s:new StringInpSpec)
29  , allowundef(false) {}
30  ~uiGenInputDlgEntry() { delete spec; }
31 
34  bool allowundef;
35 
36 };
37 
38 
39 mExpClass(uiTools) uiGenInputGrp : public uiGroup
41 public:
42  uiGenInputGrp(uiParent*,const char* grpname,
43  uiString fldtxt,DataInpSpec* s=0);
45  uiGenInputGrp(uiParent*,const char* grpname,
48  ~uiGenInputGrp() { deepErase(*entries); }
49 
50  const char* text(int i=0);
51  int getIntValue(int i=0);
52  float getFValue(int i=0);
53  double getDValue(int i=0);
54  bool getBoolValue(int i=0);
55 
56  int nrFlds() const { return flds.size(); }
57  uiGenInput* getFld( int idx=0 ) { return flds[idx]; }
58 
59  bool acceptOK();
60  NotifierAccess* enterClose();
66 protected:
67 
70 
71 private:
72 
73  void build();
74 
75 public:
76  mDeprecated float getfValue(int i=0) { return getFValue(i); }
77  mDeprecated double getdValue(int i=0) { return getDValue(i); }
78 };
79 
80 
81 
84 mExpClass(uiTools) uiGenInputDlg : public uiDialog
86 public:
87  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
88  uiString fldtxt,DataInpSpec* s=0);
90  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
93  ~uiGenInputDlg() { delete group; }
94 
95  const char* text(int i=0);
96  int getIntValue(int i=0);
97  float getFValue(int i=0);
98  double getDValue(int i=0);
99  bool getBoolValue(int i=0);
100 
101  int nrFlds() const;
102  uiGenInput* getFld( int idx=0 );
103 
104 protected:
105  void setEnterClose(CallBacker*);
106  bool acceptOK();
108 
109 public:
110  mDeprecated float getfValue(int i=0) { return getFValue(i); }
111  mDeprecated double getdValue(int i=0) { return getDValue(i); }
112 };
Definition: uigroup.h:53
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
Definition: uigeninputdlg.h:39
~uiGenInputGrp()
Definition: uigeninputdlg.h:48
mDeprecated double getdValue(int i=0)
Definition: uigeninputdlg.h:77
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
Interface class for Notifier. See comments there.
Definition: notify.h:20
uiGenInput * getFld(int idx=0)
Definition: uigeninputdlg.h:57
Definition: uistring.h:88
Definition: uiparent.h:24
ObjectSet< uiGenInputDlgEntry > * entries
Definition: uigeninputdlg.h:69
float getFValue(int nr=0, float undefval=mUdf(float)) const
DataInpSpec * spec
Definition: uigeninputdlg.h:33
const char * text(int nr=0, const char *undefval=mUdf(const char *)) const
Definition: uidialog.h:40
Specifications for character string inputs.
Definition: datainpspec.h:584
uiGenInputGrp * group
Definition: uigeninputdlg.h:107
Specification of input characteristics.
Definition: datainpspec.h:88
~uiGenInputDlg()
Definition: uigeninputdlg.h:93
ObjectSet< uiGenInput > flds
Definition: uigeninputdlg.h:68
General Input Element.
Definition: uigeninput.h:56
~uiGenInputDlgEntry()
Definition: uigeninputdlg.h:30
int getIntValue(int nr=0, int undefval=mUdf(int)) const
bool allowundef
Definition: uigeninputdlg.h:34
mDeprecated float getfValue(int i=0)
Definition: uigeninputdlg.h:76
DataInpSpec * spec(int nr)
Definition: uigeninput.h:259
int nrFlds() const
Definition: uigeninputdlg.h:56
double getDValue(int nr=0, double undefval=mUdf(double)) const
#define mDeprecated
Definition: plfdefs.h:213
uiString txt
Definition: uigeninputdlg.h:32
uiGenInputDlgEntry(const uiString &t, DataInpSpec *s)
Definition: uigeninputdlg.h:25
bool getBoolValue(int nr=0, bool undefval=mUdf(bool)) const
mDeprecated float getfValue(int i=0)
Definition: uigeninputdlg.h:110
dialog with only uiGenInputs
Definition: uigeninputdlg.h:84
specifies how to get input from user - for uiGenInputDlg
Definition: uigeninputdlg.h:22
mDeprecated double getdValue(int i=0)
Definition: uigeninputdlg.h:111
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:122

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