OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitoolsmod.h"
15 #include "uidialog.h"
16 #include "uigroup.h"
17 #include "datainpspec.h"
18 #include "uistring.h"
19 class uiGenInput;
20 
25 public:
27  DataInpSpec* s )
29  : txt(t), spec(s?s:new StringInpSpec)
30  , allowundef(false) {}
31  ~uiGenInputDlgEntry() { delete spec; }
32 
35  bool allowundef;
36 
37 };
38 
39 
40 mExpClass(uiTools) uiGenInputGrp : public uiGroup
42 public:
43  uiGenInputGrp(uiParent*,const char* grpname,
44  uiString fldtxt,DataInpSpec* s=0);
46  uiGenInputGrp(uiParent*,const char* grpname,
49  ~uiGenInputGrp() { deepErase(*entries); }
50 
51  const char* text(int i=0);
52  int getIntValue(int i=0);
53  float getFValue(int i=0);
54  double getDValue(int i=0);
55  bool getBoolValue(int i=0);
56 
57  int nrFlds() const { return flds.size(); }
58  uiGenInput* getFld( int idx=0 ) { return flds[idx]; }
59 
67 protected:
68 
71 
72 private:
73 
74  void build();
75 
76 public:
77  mDeprecated ("Use getFValue")
78  float getfValue(int i=0) { return getFValue(i); }
79  mDeprecated ("Use getDValue")
80  double getdValue(int i=0) { return getDValue(i); }
81 };
82 
83 
84 
87 mExpClass(uiTools) uiGenInputDlg : public uiDialog
89 public:
90  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
91  uiString fldtxt,DataInpSpec* s=0);
93  uiGenInputDlg(uiParent*,const uiString& dlgtitle,
96  ~uiGenInputDlg() { delete group; }
97 
98  const char* text(int i=0);
99  int getIntValue(int i=0);
100  float getFValue(int i=0);
101  double getDValue(int i=0);
102  bool getBoolValue(int i=0);
103 
104  int nrFlds() const;
105  uiGenInput* getFld( int idx=0 );
106 
107 protected:
111 
112 public:
113  mDeprecated ("Use uiString")
114  uiGenInputDlg( uiParent* p, const char* dlgtitle,
115  const char* fldtxt, DataInpSpec* s=0 )
116  : uiGenInputDlg(p,toUiString(dlgtitle),
117  toUiString(fldtxt),s) {}
118  mDeprecated ("Use uiString")
119  uiGenInputDlg( uiParent* p, const char* dlgtitle,
121  : uiGenInputDlg(p,toUiString(dlgtitle),dles) {}
122 
123  mDeprecated ("Use getFValue")
124  float getfValue(int i=0) { return getFValue(i); }
125  mDeprecated ("Use getDValue")
126  double getdValue(int i=0) { return getDValue(i); }
127 
128 };
129 
uiGenInputDlg::text
const char * text(int i=0)
uiGenInputDlg::uiGenInputDlg
mODTextTranslationClass(uiGenInputDlg) public uiGenInputDlg(uiParent *, const uiString &dlgtitle, ObjectSet< uiGenInputDlgEntry > *)
< DataInpSpec becomes mine
uiGenInputDlg::getDValue
double getDValue(int i=0)
uistring.h
uiGenInputGrp::acceptOK
bool acceptOK(CallBacker *)
uiGenInputGrp::getIntValue
int getIntValue(int i=0)
ObjectSet< uiGenInputDlgEntry >
uiGenInputDlg::getFValue
float getFValue(int i=0)
File::toUiString
Export_Basic uiString toUiString(ViewStyle)
uiGenInputGrp
Definition: uigeninputdlg.h:41
uiGenInputGrp::getDValue
double getDValue(int i=0)
uiGenInputGrp::mDeprecated
mDeprecated("Use getDValue") double getdValue(int i=0)
Definition: uigeninputdlg.h:79
uiGenInputGrp::mDeprecated
mDeprecated("Use getFValue") float getfValue(int i=0)
Definition: uigeninputdlg.h:77
uiGenInputGrp::enterClose
NotifierAccess * enterClose()
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
uiGenInputDlg::acceptOK
bool acceptOK(CallBacker *)
confirm accept
uiGenInput::getFValue
float getFValue(int nr=0, float undefval=mUdf(float)) const
uiGenInputDlg::group
uiGenInputGrp * group
Definition: uigeninputdlg.h:110
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
uiGenInput::spec
DataInpSpec * spec(int nr)
Definition: uigeninput.h:258
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
uiGenInputDlg::mDeprecated
mDeprecated("Use uiString") uiGenInputDlg(uiParent *p
uigroup.h
uiGenInput
General Input Element.
Definition: uigeninput.h:59
uiGenInputGrp::getBoolValue
bool getBoolValue(int i=0)
uiGenInputDlgEntry::spec
DataInpSpec * spec
Definition: uigeninputdlg.h:34
uiGenInput::getDValue
double getDValue(int nr=0, double undefval=mUdf(double)) const
uiGroup
Definition: uigroup.h:54
NotifierAccess
Interface class for Notifier. See comments there.
Definition: notify.h:22
mDeprecated
#define mDeprecated(msg)
Definition: plfdefs.h:215
DataInpSpec
Specification of input characteristics.
Definition: datainpspec.h:90
uidialog.h
datainpspec.h
uiGenInputGrp::nrFlds
int nrFlds() const
Definition: uigeninputdlg.h:57
uiGenInputDlg::getFld
uiGenInput * getFld(int idx=0)
uiGenInputDlgEntry::mODTextTranslationClass
mODTextTranslationClass(uiGenInputDlgEntry)
deepErase
void deepErase(BufferStringSet &)
uiGenInputDlg::setEnterClose
void setEnterClose(CallBacker *)
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
uiGenInputDlg::getIntValue
int getIntValue(int i=0)
uiGenInputDlgEntry::allowundef
bool allowundef
Definition: uigeninputdlg.h:35
uiGenInputDlgEntry::~uiGenInputDlgEntry
~uiGenInputDlgEntry()
Definition: uigeninputdlg.h:31
uiGenInputGrp::entries
ObjectSet< uiGenInputDlgEntry > * entries
Definition: uigeninputdlg.h:70
uiGenInputDlg
dialog with only uiGenInputs
Definition: uigeninputdlg.h:88
uiParent
Definition: uiparent.h:26
uiGenInputGrp::getFValue
float getFValue(int i=0)
uiGenInputDlgEntry::txt
uiString txt
Definition: uigeninputdlg.h:33
uiGenInputGrp::text
const char * text(int i=0)
StringInpSpec
Specifications for character string inputs.
Definition: datainpspec.h:588
uiDialog
Definition: uidialog.h:42
uiGenInputGrp::getFld
uiGenInput * getFld(int idx=0)
Definition: uigeninputdlg.h:58
uiGenInputGrp::build
void build()
uiGenInputGrp::~uiGenInputGrp
~uiGenInputGrp()
Definition: uigeninputdlg.h:49
uiGenInputDlg::getBoolValue
bool getBoolValue(int i=0)
uiGenInputDlgEntry
specifies how to get input from user - for uiGenInputDlg
Definition: uigeninputdlg.h:24
uiGenInputDlg::~uiGenInputDlg
~uiGenInputDlg()
Definition: uigeninputdlg.h:96
uiGenInputDlgEntry::uiGenInputDlgEntry
uiGenInputDlgEntry(const uiString &t, DataInpSpec *s)
Definition: uigeninputdlg.h:26
uiGenInputDlg::nrFlds
int nrFlds() const
uiGenInputGrp::uiGenInputGrp
mODTextTranslationClass(uiGenInputGrp) public uiGenInputGrp(uiParent *, const char *grpname, ObjectSet< uiGenInputDlgEntry > *)
< DataInpSpec becomes mine
uiGenInputGrp::flds
ObjectSet< uiGenInput > flds
Definition: uigeninputdlg.h:69

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