OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
uiGenInput Class Reference

General Input Element. More...

Inheritance diagram for uiGenInput:
[legend]

Public Member Functions

double getdValue (int nr=0, double uv=mUdf(double)) const
 
double getdValue (float undefval) const
 
float getfValue (int nr=0, float udfval=mUdf(float)) const
 
float getfValue (float undefval) const
 
bool isChecked ()
 
bool isCheckable ()
 
- Public Member Functions inherited from uiGroup
 uiGroup (uiParent *, const char *nm="uiGroup", bool manage=true)
 
virtual ~uiGroup ()
 
 operator const uiGroupObj * () const
 
 operator uiGroupObj * ()
 
 operator const uiObject & () const
 
 operator uiObject & ()
 
uiObjectattachObj ()
 
const uiObjectattachObj () const
 
uiParentparent ()
 
const uiParentparent () const
 
void setHSpacing (int)
 
void setVSpacing (int)
 
void setSpacing (int s=0)
 
void setBorder (int)
 
void setFrame (bool yn=true)
 
void setNoBackGround ()
 
uiObjecthAlignObj ()
 
void setHAlignObj (uiObject *o)
 
void setHAlignObj (uiGroup *o)
 
uiObjecthCenterObj ()
 
void setHCenterObj (uiObject *o)
 
void setHCenterObj (uiGroup *o)
 
void setIsMain (bool)
 internal use only. Tells the layout manager it's a toplevel mngr. More...
 
virtual uiMainWinmainwin ()
 
void setChildrenSensitive (bool)
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual void setSize (const uiSize &)
 
- Public Member Functions inherited from uiParent
 uiParent (const char *nm, uiParentBody *)
 
void addChild (uiBaseObject &)
 
void manageChld (uiBaseObject &, uiObjectBody &)
 
void attachChild (constraintType tp, uiObject *child, uiObject *other, int margin, bool reciprocal)
 
const ObjectSet< uiBaseObject > * childList () const
 
uiObjectmainObject ()
 
const uiObjectmainObject () const
 
uiParentBodypbody ()
 
const uiParentBodypbody () const
 
void attach (constraintType t, int margin=-1)
 
void attach (constraintType t, uiParent *oth, int margin=-1, bool reciprocal=true)
 
void attach (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual void display (bool yn, bool shrk=false, bool maximize=false)
 
bool isDisplayed () const
 
void setFocus ()
 
bool hasFocus () const
 
void setSensitive (bool yn=true)
 
bool sensitive () const
 
const uiFontfont () const
 
void setFont (const uiFont &f)
 
void setCaption (const uiString &c)
 
void setCursor (const MouseCursor &c)
 
uiSize actualsize (bool include_border) const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
void setPrefHeight (int h)
 
void setPrefWidth (int w)
 
void setPrefHeightInChar (int h)
 
void setPrefHeightInChar (float h)
 
void setPrefWidthInChar (float w)
 
void setPrefWidthInChar (int w)
 
virtual void reDraw (bool deep)
 
void shallowRedraw (CallBacker *=0)
 
void deepRedraw (CallBacker *=0)
 
void setStretch (int h, int v)
 
Color backgroundColor () const
 
Color roBackgroundColor () const
 
void setBackgroundColor (const Color &c)
 
void translateText ()
 

Protected Member Functions

void doSelect_ (CallBacker *)
 Select is pressed. Calls virtual doSelect. More...
 
virtual void doSelect (CallBacker *)
 Select is pressed. Called by doSelect_. More...
 
void doClear (CallBacker *)
 
void checkBoxSel (CallBacker *)
 
uiGenInputInputFldcreateInpFld (const DataInpSpec &)
 DataInpField factory. More...
 
void doFinalise (CallBacker *)
 
DataInpSpecspec (int nr)
 
- Protected Member Functions inherited from uiGroup
virtual uiObjectmainobject ()
 
virtual void attach_ (constraintType, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual void reDraw_ (bool deep)
 
void setShrinkAllowed (bool)
 
bool shrinkAllowed ()
 
void bodyDel (CallBacker *)
 
void uiobjDel (CallBacker *)
 
void setFrameStyle (int)
 
void reSizeChildren (const uiObject *, float, float)
 

Protected Attributes

ObjectSet< uiGenInputInputFldflds_
 
TypeSet< uiGenInputFieldIdx > & idxes_
 
bool finalised_
 
uiString selText_
 
bool withchk_
 
bool isrequired_
 
uiLabellabl_
 
uiString titletext_
 
uiCheckBoxcbox_
 
uiButton * selbut_
 
- Protected Attributes inherited from uiGroup
uiGroupObjgrpobj_
 
uiGroupParentBodybody_
 

Private Member Functions

mODTextTranslationClass(uiGenInput) public uiGenInput (uiParent *p, const uiString &disptxt, const DataInpSpec &)
 
 uiGenInput (uiParent *p, const uiString &, const DataInpSpec &, const DataInpSpec &)
 
 uiGenInput (uiParent *p, const uiString &, const DataInpSpec &, const DataInpSpec &, const DataInpSpec &)
 
virtual ~uiGenInput ()
 
void addInput (const DataInpSpec &)
 
const DataInpSpecdataInpSpec (int nr=0) const
 gives access to the actual spec of an input field. More...
 
bool newSpec (const DataInpSpec &nw, int nr)
 makes it possible to change the actual spec for an input field. More...
 
void updateSpecs ()
 update dataInpSpec() from current values on screen. More...
 
bool isUndef (int nr=0) const
 
const char * text (int nr=0, const char *undefval=mUdf(const char *)) const
 
const char * text (const char *undefval) const
 
int getIntValue (int nr=0, int undefval=mUdf(int)) const
 
bool getBoolValue (int nr=0, bool undefval=mUdf(bool)) const
 
double getDValue (int nr=0, double undefval=mUdf(double)) const
 
double getDValue (double undefval) const
 
float getFValue (int nr=0, float undefval=mUdf(float)) const
 
float getFValue (float undefval) const
 
Interval< int > getIInterval (int nr=0, int undefval=mUdf(int)) const
 
Interval< float > getFInterval (int nr=0, float undefval=mUdf(float)) const
 
Interval< float > getFInterval (float undefval) const
 
Interval< double > getDInterval (int nr=0, double undefval=mUdf(double)) const
 
Interval< double > getDInterval (double undefval) const
 
StepInterval< int > getIStepInterval (int nr=0, int undefval=mUdf(int)) const
 
StepInterval< float > getFStepInterval (int nr=0, float undefval=mUdf(float)) const
 
StepInterval< float > getFStepInterval (float undefval) const
 
StepInterval< double > getDStepInterval (int nr=0, double undefval=mUdf(double)) const
 
StepInterval< double > getDStepInterval (double undefval) const
 
Coord getCoord (int nr=0, double undefval=mUdf(double)) const
 
BinID getBinID (int nr=0, int undefval=mUdf(int)) const
 
int getTrcNr (int nr=0, int undefval=mUdf(int)) const
 
float getOffset (int nr=0, float undefval=mUdf(float)) const
 
void setText (const char *, int nr=0)
 
void setValue (int, int nr=0)
 
void setValue (double, int nr=0)
 
void setValue (float, int nr=0)
 
void setValue (bool, int nr=0)
 
void setTexts (const char *v1, const char *v2)
 
void setValues (int v1, int v2)
 
void setValues (double v1, double v2)
 
void setValues (float v1, float v2)
 
void setValues (bool v1, bool v2)
 
void setValue (const Coord &c)
 
void setValue (const BinID &b)
 
void setValue (const BinIDValue &)
 
void setValue (const Interval< int > &)
 and StepIntv More...
 
void setValue (const Interval< float > &)
 and StepIntv More...
 
void setValue (const Interval< double > &)
 and StepIntv More...
 
void displayField (bool yn=true, int elemnr=-1, int fldnr=-1)
 
void setReadOnly (bool yn=true, int elemnr=-1, int fldnr=-1)
 
void setSensitive (bool yn=true, int elemnr=-1, int fldnr=-1)
 
void setEmpty (int nr=-1)
 
UserInputObjelement (int idx)
 returns 0 if not finalised. More...
 
uiObjectrightObj ()
 for attaching More...
 
int nrElements () const
 
void setElemSzPol (uiObject::SzPolicy p)
 
uiObject::SzPolicy elemSzPol () const
 
void setToolTip (const uiString &, int ielem=0)
 
virtual const uiStringtitleText ()
 
virtual void setTitleText (const uiString &)
 
void setChecked (bool yn)
 
bool isChecked () const
 
bool isCheckable () const
 
virtual bool isSingleLine () const
 
void setWithCheck (bool yn=true)
 
void setWithSelect (bool yn=true)
 
void setNrDecimals (int nrdec, int fldnr=0)
 
void setRequired (bool yn=true)
 
DataInpSpecgetInputSpecAndIndex (const int, int &) const
 
uiGenInputInputFldgetInputFldAndIndex (const int, int &) const
 

Private Attributes

Notifier< uiGenInputchecked
 
Notifier< uiGenInputvaluechanging
 
Notifier< uiGenInputvaluechanged
 
Notifier< uiGenInputupdateRequested
 
bool checked_
 
bool rdonly_
 
bool rdonlyset_
 
ObjectSet< DataInpSpecinputs_
 
uiObject::SzPolicy elemszpol_
 

Additional Inherited Members

- Static Public Member Functions inherited from uiGroup
static uiGroupgtDynamicCastToGrp (mQtclass(QWidget *))
 

Detailed Description

General Input Element.

The General Input line consists of a number of input elements, optionally accompanied with either a label or a checkbox.

The uiGeninput is constructed with a number of DataInpSpec's, which determine what kind of input field is going to be under the hood.

The usage of the DataInpSpec keeps the constructor for uiGenInput very simple and also it's most common use. For example, to define a uiGenInput that inputs a string, you'd do something like

uiGenInput* xx = new uiGenInput( this,"Input name", StringInpSpec("Initial"));

For more complicated inputs, you'd have to explicitely construct a DataInpSpec sub-class, and fill in it's details, like allowed range, etc.

When passed to the constructor of a uiGenInput, the DataInpSpec objects are copied. You can use uiGenInput::getInpSpec to get a hold of them, but only if the uiGenInput has not been finalised yet.

Constructor & Destructor Documentation

mODTextTranslationClass (uiGenInput) public uiGenInput::uiGenInput ( uiParent p,
const uiString disptxt,
const DataInpSpec  
)
private
uiGenInput::uiGenInput ( uiParent p,
const uiString ,
const DataInpSpec ,
const DataInpSpec  
)
private
uiGenInput::uiGenInput ( uiParent p,
const uiString ,
const DataInpSpec ,
const DataInpSpec ,
const DataInpSpec  
)
private
virtual uiGenInput::~uiGenInput ( )
privatevirtual

Member Function Documentation

void uiGenInput::addInput ( const DataInpSpec )
private
void uiGenInput::checkBoxSel ( CallBacker )
protected
uiGenInputInputFld& uiGenInput::createInpFld ( const DataInpSpec )
protected

DataInpField factory.

const DataInpSpec* uiGenInput::dataInpSpec ( int  nr = 0) const
private

gives access to the actual spec of an input field.

When the uiGenInput is being finalised, the actual input fields are constructed. The fields make a clone of their input spec, which are used for range checking, etc.

The purpose of this is to be able to store the actual current spec's, instead of the intial specs, which might have been updated with newSpec(). For example, limits might have been set/changed.

See also
bool newSpec(DataInpSpec* nw, int nr)
void uiGenInput::displayField ( bool  yn = true,
int  elemnr = -1,
int  fldnr = -1 
)
private
void uiGenInput::doClear ( CallBacker )
protected
void uiGenInput::doFinalise ( CallBacker )
protected
virtual void uiGenInput::doSelect ( CallBacker )
inlineprotectedvirtual

Select is pressed. Called by doSelect_.

Reimplemented in uiFileInput.

void uiGenInput::doSelect_ ( CallBacker )
protected

Select is pressed. Calls virtual doSelect.

UserInputObj* uiGenInput::element ( int  idx)
private

returns 0 if not finalised.

uiObject::SzPolicy uiGenInput::elemSzPol ( ) const
inlineprivate
BinID uiGenInput::getBinID ( int  nr = 0,
int  undefval = mUdf(int) 
) const
private
bool uiGenInput::getBoolValue ( int  nr = 0,
bool  undefval = mUdf(bool) 
) const
private
Coord uiGenInput::getCoord ( int  nr = 0,
double  undefval = mUdf(double) 
) const
private
Interval<double> uiGenInput::getDInterval ( int  nr = 0,
double  undefval = mUdf( double ) 
) const
inlineprivate
Interval<double> uiGenInput::getDInterval ( double  undefval) const
inlineprivate
StepInterval<double> uiGenInput::getDStepInterval ( int  nr = 0,
double  undefval = mUdf( double ) 
) const
inlineprivate
StepInterval<double> uiGenInput::getDStepInterval ( double  undefval) const
inlineprivate
double uiGenInput::getDValue ( int  nr = 0,
double  undefval = mUdf(double) 
) const
private
double uiGenInput::getDValue ( double  undefval) const
inlineprivate
double uiGenInput::getdValue ( int  nr = 0,
double  uv = mUdf(double) 
) const
inline
double uiGenInput::getdValue ( float  undefval) const
inline
Interval<float> uiGenInput::getFInterval ( int  nr = 0,
float  undefval = mUdf( float ) 
) const
inlineprivate
Interval<float> uiGenInput::getFInterval ( float  undefval) const
inlineprivate
StepInterval<float> uiGenInput::getFStepInterval ( int  nr = 0,
float  undefval = mUdf( float ) 
) const
inlineprivate
StepInterval<float> uiGenInput::getFStepInterval ( float  undefval) const
inlineprivate
float uiGenInput::getFValue ( int  nr = 0,
float  undefval = mUdf(float) 
) const
private
float uiGenInput::getFValue ( float  undefval) const
inlineprivate
float uiGenInput::getfValue ( int  nr = 0,
float  udfval = mUdf(float) 
) const
inline
float uiGenInput::getfValue ( float  undefval) const
inline
Interval<int> uiGenInput::getIInterval ( int  nr = 0,
int  undefval = mUdf( int ) 
) const
inlineprivate
uiGenInputInputFld* uiGenInput::getInputFldAndIndex ( const int  ,
int &   
) const
private
DataInpSpec* uiGenInput::getInputSpecAndIndex ( const int  ,
int &   
) const
private
int uiGenInput::getIntValue ( int  nr = 0,
int  undefval = mUdf(int) 
) const
private
StepInterval<int> uiGenInput::getIStepInterval ( int  nr = 0,
int  undefval = mUdf( int ) 
) const
inlineprivate
float uiGenInput::getOffset ( int  nr = 0,
float  undefval = mUdf(float) 
) const
private
int uiGenInput::getTrcNr ( int  nr = 0,
int  undefval = mUdf(int) 
) const
private
bool uiGenInput::isCheckable ( ) const
inlineprivate
bool uiGenInput::isCheckable ( )
inline
bool uiGenInput::isChecked ( ) const
inlineprivate
bool uiGenInput::isChecked ( )
virtual bool uiGenInput::isSingleLine ( ) const
inlineprivatevirtual
bool uiGenInput::isUndef ( int  nr = 0) const
private
bool uiGenInput::newSpec ( const DataInpSpec nw,
int  nr 
)
private

makes it possible to change the actual spec for an input field.

Returns true, if changes are accepted.

int uiGenInput::nrElements ( ) const
private
uiObject* uiGenInput::rightObj ( )
private

for attaching

void uiGenInput::setChecked ( bool  yn)
private
void uiGenInput::setElemSzPol ( uiObject::SzPolicy  p)
inlineprivate
void uiGenInput::setEmpty ( int  nr = -1)
private
void uiGenInput::setNrDecimals ( int  nrdec,
int  fldnr = 0 
)
private
void uiGenInput::setReadOnly ( bool  yn = true,
int  elemnr = -1,
int  fldnr = -1 
)
private
void uiGenInput::setRequired ( bool  yn = true)
private
void uiGenInput::setSensitive ( bool  yn = true,
int  elemnr = -1,
int  fldnr = -1 
)
private
void uiGenInput::setText ( const char *  ,
int  nr = 0 
)
private
void uiGenInput::setTexts ( const char *  v1,
const char *  v2 
)
inlineprivate
virtual void uiGenInput::setTitleText ( const uiString )
privatevirtual
void uiGenInput::setToolTip ( const uiString ,
int  ielem = 0 
)
private
void uiGenInput::setValue ( int  ,
int  nr = 0 
)
private
void uiGenInput::setValue ( double  ,
int  nr = 0 
)
private
void uiGenInput::setValue ( float  ,
int  nr = 0 
)
private
void uiGenInput::setValue ( bool  ,
int  nr = 0 
)
private
void uiGenInput::setValue ( const Coord c)
inlineprivate
void uiGenInput::setValue ( const BinID b)
inlineprivate
void uiGenInput::setValue ( const BinIDValue )
inlineprivate
void uiGenInput::setValue ( const Interval< int > &  )
private

and StepIntv

void uiGenInput::setValue ( const Interval< float > &  )
private

and StepIntv

void uiGenInput::setValue ( const Interval< double > &  )
private

and StepIntv

void uiGenInput::setValues ( int  v1,
int  v2 
)
inlineprivate
void uiGenInput::setValues ( double  v1,
double  v2 
)
inlineprivate
void uiGenInput::setValues ( float  v1,
float  v2 
)
inlineprivate
void uiGenInput::setValues ( bool  v1,
bool  v2 
)
inlineprivate
void uiGenInput::setWithCheck ( bool  yn = true)
inlineprivate
void uiGenInput::setWithSelect ( bool  yn = true)
private
DataInpSpec* uiGenInput::spec ( int  nr)
inlineprotected
const char* uiGenInput::text ( int  nr = 0,
const char *  undefval = mUdf(const char *) 
) const
private
const char* uiGenInput::text ( const char *  undefval) const
inlineprivate
virtual const uiString& uiGenInput::titleText ( )
privatevirtual
void uiGenInput::updateSpecs ( )
private

update dataInpSpec() from current values on screen.

Member Data Documentation

uiCheckBox* uiGenInput::cbox_
protected
Notifier<uiGenInput> uiGenInput::checked
private
bool uiGenInput::checked_
private
uiObject::SzPolicy uiGenInput::elemszpol_
private
bool uiGenInput::finalised_
protected
ObjectSet<uiGenInputInputFld> uiGenInput::flds_
protected
TypeSet<uiGenInputFieldIdx>& uiGenInput::idxes_
protected
ObjectSet<DataInpSpec> uiGenInput::inputs_
private
bool uiGenInput::isrequired_
protected
uiLabel* uiGenInput::labl_
protected
bool uiGenInput::rdonly_
private
bool uiGenInput::rdonlyset_
private
uiButton* uiGenInput::selbut_
protected
uiString uiGenInput::selText_
protected
uiString uiGenInput::titletext_
protected
Notifier<uiGenInput> uiGenInput::updateRequested
private
Notifier<uiGenInput> uiGenInput::valuechanged
private
Notifier<uiGenInput> uiGenInput::valuechanging
private
bool uiGenInput::withchk_
protected

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