OpendTect
7.0
|
General Input Element. More...
Public Member Functions | |
uiGenInput (uiParent *p, const uiString &, const DataInpSpec &, const DataInpSpec &) | |
uiGenInput (uiParent *p, const uiString &, const DataInpSpec &, const DataInpSpec &, const DataInpSpec &) | |
uiGenInput (uiParent *p, const uiString &disptxt, const char *inputStr=nullptr) | |
uiGenInput (uiParent *p, const uiString &disptxt, const DataInpSpec &) | |
virtual | ~uiGenInput () |
void | addInput (const DataInpSpec &) |
const DataInpSpec * | dataInpSpec (int nr=0) const |
gives access to the actual spec of an input field. More... | |
void | displayField (bool yn=true, int elemnr=-1, int fldnr=-1) |
UserInputObj * | element (int idx) |
returns 0 if not finalized. More... | |
uiObject::SzPolicy | elemSzPol () const |
BinID | getBinID (int nr=0, int undefval=mUdf(int)) const |
bool | getBoolValue (int nr=0, bool undefval=mUdf(bool)) const |
Coord | getCoord (int nr=0, double undefval=mUdf(double)) const |
Interval< double > | getDInterval (double undefval) const |
Interval< double > | getDInterval (int nr=0, double undefval=mUdf(double)) const |
StepInterval< double > | getDStepInterval (double undefval) const |
StepInterval< double > | getDStepInterval (int nr=0, double undefval=mUdf(double)) const |
double | getDValue (double undefval) const |
double | getDValue (int nr=0, double undefval=mUdf(double)) const |
Interval< float > | getFInterval (float undefval) const |
Interval< float > | getFInterval (int nr=0, float undefval=mUdf(float)) const |
StepInterval< float > | getFStepInterval (float undefval) const |
StepInterval< float > | getFStepInterval (int nr=0, float undefval=mUdf(float)) const |
float | getFValue (float undefval) const |
float | getFValue (int nr=0, float undefval=mUdf(float)) const |
Interval< int > | getIInterval (int nr=0, int undefval=mUdf(int)) const |
od_int64 | getInt64Value (int nr=0, od_int64 undefval=mUdf(od_int64)) const |
int | getIntValue (int nr=0, int undefval=mUdf(int)) const |
StepInterval< int > | getIStepInterval (int nr=0, int undefval=mUdf(int)) const |
float | getOffset (int nr=0, float undefval=mUdf(float)) const |
int | getTrcNr (int nr=0, int undefval=mUdf(int)) const |
bool | isCheckable () const |
bool | isChecked () const |
virtual bool | isSingleLine () const |
bool | isUndef (int nr=0) const |
bool | newSpec (const DataInpSpec &nw, int nr) |
makes it possible to change the actual spec for an input field. More... | |
int | nrElements () const |
uiObject * | rightObj () |
for attaching More... | |
void | setChecked (bool yn) |
void | setDefaultTextValidator () |
void | setElemSzPol (uiObject::SzPolicy p) |
void | setEmpty (int nr=-1) |
void | setFilename (const char *) |
void | setNrDecimals (int nrdec, int fldnr=0) |
void | setPrefix (const uiString &r, int fldnr=0) |
void | setReadOnly (bool yn=true, int elemnr=-1, int fldnr=-1) |
void | setRequired (bool yn=true) |
void | setSensitive (bool yn=true, int elemnr=-1, int fldnr=-1) |
void | setText (const char *, int nr=0) |
void | setTexts (const char *v1, const char *v2) |
void | setTextValidator (const uiTextValidator &) |
virtual void | setTitleText (const uiString &) |
void | setToolTip (const uiString &, int ielem=0) |
void | setValue (bool, int nr=0) |
void | setValue (const BinID &b) |
void | setValue (const BinIDValue &) |
void | setValue (const Coord &c) |
void | setValue (const Interval< double > &) |
and StepIntv More... | |
void | setValue (const Interval< float > &) |
and StepIntv More... | |
void | setValue (const Interval< int > &) |
and StepIntv More... | |
void | setValue (double, int nr=0) |
void | setValue (float, int nr=0) |
void | setValue (int, int nr=0) |
void | setValue (od_int64, int nr=0) |
void | setValues (bool v1, bool v2) |
void | setValues (double v1, double v2) |
void | setValues (float v1, float v2) |
void | setValues (int v1, int v2) |
void | setWithCheck (bool yn=true) |
void | setWithSelect (bool yn=true) |
const char * | text (const char *undefval) const |
const char * | text (int nr=0, const char *undefval=mUdf(const char *)) const |
virtual const uiString & | titleText () |
void | updateSpecs () |
update dataInpSpec() from current values on screen. More... | |
Public Member Functions inherited from uiGroup | |
uiGroup (uiParent *, const char *nm="uiGroup", bool manage=true) | |
virtual | ~uiGroup () |
uiObject * | attachObj () |
const uiObject * | attachObj () const |
uiObject * | hAlignObj () |
uiObject * | hCenterObj () |
uiMainWin * | mainwin () override |
operator const uiGroupObj * () const | |
operator const uiObject & () const | |
operator uiGroupObj * () | |
operator uiObject & () | |
uiParent * | parent () |
const uiParent * | parent () const |
Notifier< uiBaseObject > & | postFinalise () override |
Notifier< uiBaseObject > & | postFinalize () override |
Notifier< uiBaseObject > & | preFinalise () override |
Notifier< uiBaseObject > & | preFinalize () override |
void | setBorder (int l, int t, int r, int b) |
void | setBorder (int) |
void | setChildrenSensitive (bool) |
void | setFrame (bool yn=true) |
void | setHAlignObj (uiGroup *o) |
void | setHAlignObj (uiObject *) |
void | setHCenterObj (uiGroup *o) |
void | setHCenterObj (uiObject *) |
void | setHSpacing (int) |
void | setIsMain (bool) |
internal use only. Tells the layout manager it's a toplevel mngr. More... | |
void | setNoBackGround () |
virtual void | setSize (const uiSize &) |
void | setSpacing (int s=0) |
void | setVSpacing (int) |
Public Member Functions inherited from uiParent | |
uiSize | actualsize (bool inclborder=true) const |
uiSize | actualSize (bool include_border) const |
void | addChild (uiBaseObject &) |
void | attach (constraintType t, int margin=-1) |
void | attach (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true) |
void | attach (constraintType t, uiParent *oth, int margin=-1, bool reciprocal=true) |
void | attachChild (constraintType tp, uiObject *child, uiObject *other, int margin, bool reciprocal) |
OD::Color | backgroundColor () const |
const ObjectSet< uiBaseObject > * | childList () const |
void | deepRedraw (CallBacker *=0) |
virtual void | display (bool yn, bool shrk=false, bool maximize=false) |
const uiFont * | font () const |
bool | hasFocus () const |
bool | isDisplayed () const |
uiObject * | mainObject () |
const uiObject * | mainObject () const |
void | manageChild (uiBaseObject &, uiObjectBody &) |
uiParentBody * | pbody () |
const uiParentBody * | pbody () const |
int | prefHNrPics () const |
int | prefVNrPics () const |
virtual void | reDraw (bool deep) |
OD::Color | roBackgroundColor () const |
bool | sensitive () const |
void | setBackgroundColor (const OD::Color &c) |
void | setCaption (const uiString &c) |
void | setCursor (const MouseCursor &c) |
void | setFocus () |
void | setFont (const uiFont &f) |
void | setPrefHeight (int h) |
void | setPrefHeightInChar (float h) |
void | setPrefHeightInChar (int h) |
void | setPrefWidth (int w) |
void | setPrefWidthInChar (float w) |
void | setPrefWidthInChar (int w) |
void | setSensitive (bool yn=true) |
void | setStretch (int h, int v) |
void | shallowRedraw (CallBacker *=0) |
int | stretch (bool h) const |
void | translateText () override |
Public Member Functions inherited from uiBaseObject | |
uiBaseObject (const char *nm, uiBody *=0) | |
virtual | ~uiBaseObject () |
int | beginCmdRecEvent (const BufferString &msg) |
int | beginCmdRecEvent (const char *msg=0) |
int | beginCmdRecEvent (od_uint64 id, const char *msg=0) |
uiBody * | body () |
const uiBody * | body () const |
void | clear () |
void | endCmdRecEvent (int refnr, const char *msg=0) |
void | endCmdRecEvent (od_uint64 id, int refnr, const char *msg=0) |
void | finalise () |
bool | finalised () const |
void | finalize () |
bool | finalized () const |
virtual QWidget * | getWidget () |
const QWidget * | getWidget () const |
Public Member Functions inherited from NamedCallBacker | |
NamedCallBacker (const char *nm=0) | |
NamedCallBacker (const NamedCallBacker &) | |
virtual Notifier< NamedCallBacker > & | objectToBeDeleted () const |
bool | operator== (const NamedCallBacker &oth) const |
bool | operator== (const NamedObject &oth) const |
Public Member Functions inherited from CallBacker | |
CallBacker () | |
CallBacker (const CallBacker &) | |
virtual | ~CallBacker () |
bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
void | detachAllNotifiers () const |
Call from the destructor of your inherited object. More... | |
void | detachCB (const NotifierAccess &, const CallBack &) const |
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
virtual bool | isCapsule () const |
bool | isNotifierAttached (const NotifierAccess *) const |
Only for debugging purposes, don't use. More... | |
void | stopReceivingNotifications () const |
virtual CallBacker * | trueCaller () |
Public Member Functions inherited from NamedObject | |
NamedObject (const char *nm=nullptr) | |
NamedObject (const NamedObject &oth) | |
virtual | ~NamedObject () |
virtual BufferString | getName () const |
bool | getNameFromPar (const IOPar &) |
const name_type & | name () const override |
NamedObject & | operator= (const NamedObject &) |
bool | operator== (const NamedObject &oth) const |
virtual void | setName (const char *nm) |
Public Member Functions inherited from ObjectWithName | |
virtual | ~ObjectWithName () |
bool | hasName (const char *nm) const |
bool | hasName (const name_type &nm) const |
void | putNameInPar (IOPar &) const |
Public Attributes | |
Notifier< uiGenInput > | checked |
Notifier< uiGenInput > | updateRequested |
Notifier< uiGenInput > | valueChanged |
Notifier< uiGenInput > | valuechanged |
Notifier< uiGenInput > | valueChanging |
Notifier< uiGenInput > | valuechanging |
Protected Member Functions | |
void | checkBoxSel (CallBacker *) |
uiGenInputInputFld & | createInpFld (const DataInpSpec &) |
DataInpField factory. More... | |
void | doClear (CallBacker *) |
void | doFinalize (CallBacker *) |
virtual void | doSelect (CallBacker *) |
Select is pressed. Called by doSelect_. More... | |
void | doSelect_ (CallBacker *) |
Select is pressed. Calls virtual doSelect. More... | |
DataInpSpec * | spec (int nr) |
Protected Member Functions inherited from uiGroup | |
void | attach_ (constraintType, uiObject *oth, int margin=-1, bool reciprocal=true) override |
void | bodyDel (CallBacker *) |
uiObject * | mainobject () override |
virtual void | reDraw_ (bool deep) |
void | reSizeChildren (const uiObject *, float, float) |
void | setFrameStyle (int) |
void | setShrinkAllowed (bool) |
bool | shrinkAllowed () |
void | uiobjDel (CallBacker *) |
Protected Member Functions inherited from uiParent | |
uiParent (const char *nm, uiParentBody *) | |
~uiParent () | |
Protected Member Functions inherited from uiBaseObject | |
void | setBody (uiBody *b) |
Protected Member Functions inherited from NamedCallBacker | |
void | sendDelNotif () const |
Protected Attributes | |
uiCheckBox * | cbox_ = nullptr |
bool | finalized_ = false |
ObjectSet< uiGenInputInputFld > | flds_ |
TypeSet< uiGenInputFieldIdx > & | idxes_ |
bool | isrequired_ = false |
uiLabel * | labl_ = nullptr |
uiButton * | selbut_ = nullptr |
uiString | selText_ |
uiTextValidator * | textvl_ = nullptr |
uiString | titletext_ |
bool | withchk_ = false |
Protected Attributes inherited from uiGroup | |
uiGroupParentBody * | body_ |
uiGroupObj * | grpobj_ |
Protected Attributes inherited from NamedCallBacker | |
Threads::Atomic< bool > | delalreadytriggered_ |
Notifier< NamedCallBacker > | delnotif_ |
Protected Attributes inherited from NamedObject | |
BufferString | name_ |
Private Member Functions | |
uiGenInput (const uiString &, uiParent *) | |
double | getdValue (float undefval) const |
double | getdValue (int nr=0, double uv=mUdf(double)) const |
float | getfValue (float undefval) const |
float | getfValue (int nr=0, float udfval=mUdf(float)) const |
uiGenInputInputFld * | getInputFldAndIndex (const int, int &) const |
DataInpSpec * | getInputSpecAndIndex (const int, int &) const |
Private Attributes | |
bool | checked_ = false |
uiObject::SzPolicy | elemszpol_ |
ObjectSet< DataInpSpec > | inputs_ |
bool | rdonly_ = false |
bool | rdonlyset_ = false |
Additional Inherited Members | |
Public Types inherited from ObjectWithName | |
typedef OD::String | name_type |
Static Public Member Functions inherited from uiGroup | |
static uiGroup * | gtDynamicCastToGrp (QWidget *) |
Static Public Member Functions inherited from uiBaseObject | |
static void | addCmdRecorder (const CallBack &) |
static void | removeCmdRecorder (const CallBack &) |
Static Public Member Functions inherited from CallBacker | |
static void | createReceiverForCurrentThread () |
static void | removeReceiverForCurrentThread () |
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
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 finalized yet.
<>
uiGenInput::uiGenInput | ( | uiParent * | p, |
const uiString & | disptxt, | ||
const DataInpSpec & | |||
) |
uiGenInput::uiGenInput | ( | uiParent * | p, |
const uiString & | , | ||
const DataInpSpec & | , | ||
const DataInpSpec & | |||
) |
uiGenInput::uiGenInput | ( | uiParent * | p, |
const uiString & | , | ||
const DataInpSpec & | , | ||
const DataInpSpec & | , | ||
const DataInpSpec & | |||
) |
|
virtual |
void uiGenInput::addInput | ( | const DataInpSpec & | ) |
|
protected |
|
protected |
DataInpField factory.
const DataInpSpec* uiGenInput::dataInpSpec | ( | int | nr = 0 | ) | const |
gives access to the actual spec of an input field.
When the uiGenInput is being finalized, 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.
void uiGenInput::displayField | ( | bool | yn = true , |
int | elemnr = -1 , |
||
int | fldnr = -1 |
||
) |
|
protected |
|
protected |
|
inlineprotectedvirtual |
Select is pressed. Called by doSelect_.
Reimplemented in uiFileInput.
|
protected |
Select is pressed. Calls virtual doSelect.
UserInputObj* uiGenInput::element | ( | int | idx | ) |
returns 0 if not finalized.
|
inline |
BinID uiGenInput::getBinID | ( | int | nr = 0 , |
int | undefval = mUdf(int) |
||
) | const |
bool uiGenInput::getBoolValue | ( | int | nr = 0 , |
bool | undefval = mUdf(bool) |
||
) | const |
Coord uiGenInput::getCoord | ( | int | nr = 0 , |
double | undefval = mUdf(double) |
||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
double uiGenInput::getDValue | ( | int | nr = 0 , |
double | undefval = mUdf(double) |
||
) | const |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
float uiGenInput::getFValue | ( | int | nr = 0 , |
float | undefval = mUdf(float) |
||
) | const |
|
inline |
|
private |
|
private |
od_int64 uiGenInput::getInt64Value | ( | int | nr = 0 , |
od_int64 | undefval = mUdf(od_int64) |
||
) | const |
int uiGenInput::getIntValue | ( | int | nr = 0 , |
int | undefval = mUdf(int) |
||
) | const |
|
inline |
float uiGenInput::getOffset | ( | int | nr = 0 , |
float | undefval = mUdf(float) |
||
) | const |
int uiGenInput::getTrcNr | ( | int | nr = 0 , |
int | undefval = mUdf(int) |
||
) | const |
|
inline |
|
inline |
|
inlinevirtual |
bool uiGenInput::isUndef | ( | int | nr = 0 | ) | const |
bool uiGenInput::newSpec | ( | const DataInpSpec & | nw, |
int | nr | ||
) |
makes it possible to change the actual spec for an input field.
Returns true, if changes are accepted.
int uiGenInput::nrElements | ( | ) | const |
uiObject* uiGenInput::rightObj | ( | ) |
for attaching
void uiGenInput::setChecked | ( | bool | yn | ) |
void uiGenInput::setDefaultTextValidator | ( | ) |
|
inline |
void uiGenInput::setEmpty | ( | int | nr = -1 | ) |
void uiGenInput::setFilename | ( | const char * | ) |
void uiGenInput::setNrDecimals | ( | int | nrdec, |
int | fldnr = 0 |
||
) |
void uiGenInput::setPrefix | ( | const uiString & | r, |
int | fldnr = 0 |
||
) |
void uiGenInput::setReadOnly | ( | bool | yn = true , |
int | elemnr = -1 , |
||
int | fldnr = -1 |
||
) |
void uiGenInput::setRequired | ( | bool | yn = true | ) |
void uiGenInput::setSensitive | ( | bool | yn = true , |
int | elemnr = -1 , |
||
int | fldnr = -1 |
||
) |
void uiGenInput::setText | ( | const char * | , |
int | nr = 0 |
||
) |
|
inline |
void uiGenInput::setTextValidator | ( | const uiTextValidator & | ) |
|
virtual |
void uiGenInput::setToolTip | ( | const uiString & | , |
int | ielem = 0 |
||
) |
void uiGenInput::setValue | ( | bool | , |
int | nr = 0 |
||
) |
|
inline |
|
inline |
|
inline |
void uiGenInput::setValue | ( | const Interval< double > & | ) |
and StepIntv
void uiGenInput::setValue | ( | const Interval< float > & | ) |
and StepIntv
void uiGenInput::setValue | ( | const Interval< int > & | ) |
and StepIntv
void uiGenInput::setValue | ( | double | , |
int | nr = 0 |
||
) |
void uiGenInput::setValue | ( | float | , |
int | nr = 0 |
||
) |
void uiGenInput::setValue | ( | int | , |
int | nr = 0 |
||
) |
void uiGenInput::setValue | ( | od_int64 | , |
int | nr = 0 |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void uiGenInput::setWithSelect | ( | bool | yn = true | ) |
|
inlineprotected |
|
inline |
const char* uiGenInput::text | ( | int | nr = 0 , |
const char * | undefval = mUdf(const char *) |
||
) | const |
|
virtual |
void uiGenInput::updateSpecs | ( | ) |
update dataInpSpec() from current values on screen.
|
protected |
Notifier<uiGenInput> uiGenInput::checked |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
Notifier<uiGenInput> uiGenInput::updateRequested |
Notifier<uiGenInput> uiGenInput::valueChanged |
Notifier<uiGenInput> uiGenInput::valuechanged |
Notifier<uiGenInput> uiGenInput::valueChanging |
Notifier<uiGenInput> uiGenInput::valuechanging |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024