OpendTect-6_4  6.4
uigeninputdlg.h
Go to the documentation of this file.
1 #ifndef uigeninputdlg_h
2 #define uigeninputdlg_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: May 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "uidialog.h"
17 #include "uigroup.h"
18 #include "datainpspec.h"
19 #include "uistring.h"
20 class uiGenInput;
21 
25 { mODTextTranslationClass(uiGenInputDlgEntry);
26 public:
28  DataInpSpec* s )
30  : txt(t), spec(s?s:new StringInpSpec)
31  , allowundef(false) {}
32  ~uiGenInputDlgEntry() { delete spec; }
33 
36  bool allowundef;
37 
38 };
39 
40 
41 mExpClass(uiTools) uiGenInputGrp : public uiGroup
43 public:
44  uiGenInputGrp(uiParent*,const char* grpname,
45  uiString fldtxt,DataInpSpec* s=0);
47  uiGenInputGrp(uiParent*,const char* grpname,
50  ~uiGenInputGrp() { deepErase(*entries); }
51 
52  const char* text(int i=0);
53  int getIntValue(int i=0);
54  float getFValue(int i=0);
55  double getDValue(int i=0);
56  bool getBoolValue(int i=0);
57 
58  int nrFlds() const { return flds.size(); }
59  uiGenInput* getFld( int idx=0 ) { return flds[idx]; }
60 
61  bool acceptOK(CallBacker*);
62  NotifierAccess* enterClose();
68 protected:
69 
72 
73 private:
74 
75  void build();
76 
77 public:
78  /*mDeprecated*/ float getfValue(int i=0) { return getFValue(i); }
79  /*mDeprecated*/ double getdValue(int i=0) { return getDValue(i); }
80 };
81 
82 
83 
86 mExpClass(uiTools) uiGenInputDlg : public uiDialog
88 public:
89  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
90  uiString fldtxt,DataInpSpec* s=0);
92  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
95  ~uiGenInputDlg() { delete group; }
96 
97  const char* text(int i=0);
98  int getIntValue(int i=0);
99  float getFValue(int i=0);
100  double getDValue(int i=0);
101  bool getBoolValue(int i=0);
102 
103  int nrFlds() const;
104  uiGenInput* getFld( int idx=0 );
105 
106 protected:
107  void setEnterClose(CallBacker*);
108  bool acceptOK(CallBacker*);
110 
111 public:
112  /*mDeprecated*/ float getfValue(int i=0) { return getFValue(i); }
113  /*mDeprecated*/ double getdValue(int i=0) { return getDValue(i); }
114 };
115 
116 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: uigeninputdlg.h:41
~uiGenInputGrp()
Definition: uigeninputdlg.h:50
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Interface class for Notifier. See comments there.
Definition: callback.h:161
uiGenInput * getFld(int idx=0)
Definition: uigeninputdlg.h:59
Definition: uistring.h:89
Definition: uiparent.h:26
ObjectSet< uiGenInputDlgEntry > * entries
Definition: uigeninputdlg.h:71
float getFValue(int nr=0, float undefval=mUdf(float)) const
DataInpSpec * spec
Definition: uigeninputdlg.h:35
const char * text(int nr=0, const char *undefval=mUdf(const char *)) const
Definition: uidialog.h:42
Specifications for character string inputs.
Definition: datainpspec.h:577
uiGenInputGrp * group
Definition: uigeninputdlg.h:109
Specification of input characteristics.
Definition: datainpspec.h:89
~uiGenInputDlg()
Definition: uigeninputdlg.h:95
ObjectSet< uiGenInput > flds
Definition: uigeninputdlg.h:70
General Input Element.
Definition: uigeninput.h:58
~uiGenInputDlgEntry()
Definition: uigeninputdlg.h:32
float getfValue(int i=0)
Definition: uigeninputdlg.h:112
int getIntValue(int nr=0, int undefval=mUdf(int)) const
float getfValue(int i=0)
Definition: uigeninputdlg.h:78
bool allowundef
Definition: uigeninputdlg.h:36
double getdValue(int i=0)
Definition: uigeninputdlg.h:79
DataInpSpec * spec(int nr)
Definition: uigeninput.h:252
int nrFlds() const
Definition: uigeninputdlg.h:58
double getDValue(int nr=0, double undefval=mUdf(double)) const
uiString txt
Definition: uigeninputdlg.h:34
double getdValue(int i=0)
Definition: uigeninputdlg.h:113
uiGenInputDlgEntry(const uiString &t, DataInpSpec *s)
Definition: uigeninputdlg.h:27
bool getBoolValue(int nr=0, bool undefval=mUdf(bool)) const
dialog with only uiGenInputs
Definition: uigeninputdlg.h:86
specifies how to get input from user - for uiGenInputDlg
Definition: uigeninputdlg.h:24
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118

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