OpendTect  7.0
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
uiUnitSel Class Reference

Selector for UnitOfMeasure's. More...

Inheritance diagram for uiUnitSel:
[legend]

Classes

class  Setup
 

Public Member Functions

 uiUnitSel (uiParent *, const Mnemonic *mn=nullptr)
 
 uiUnitSel (uiParent *, const Setup &)
 
 uiUnitSel (uiParent *, Mnemonic::StdType)
 
mDeprecatedDef uiUnitSel (uiParent *p, const char *lbltxt=nullptr)
 
 ~uiUnitSel ()
 
void fillPar (IOPar &, const char *altkey=nullptr) const
 
mDeprecatedDef double getInternalValue (double uservalue) const
 
mDeprecatedDef float getInternalValue (float uservalue) const
 
const UnitOfMeasuregetUnit () const
 
const char * getUnitName () const
 
mDeprecatedDef double getUserValue (double internalval) const
 
mDeprecatedDef float getUserValue (float internalval) const
 
bool hasMnemonicSelection () const
 
const Mnemonicmnemonic () const
 
Mnemonic::StdType propType () const
 
void setFallbackKey (const char *)
 
void setMnemonic (const Mnemonic &)
 
void setPropType (Mnemonic::StdType)
 
mDeprecatedDef void setUnit (const char *)
 
void setUnit (const UnitOfMeasure *uom=nullptr)
 
const char * tblKey () const
 
bool usePar (const IOPar &, const char *altkey=nullptr)
 
- Public Member Functions inherited from uiGroup
 uiGroup (uiParent *, const char *nm="uiGroup", bool manage=true)
 
virtual ~uiGroup ()
 
uiObjectattachObj ()
 
const uiObjectattachObj () const
 
uiObjecthAlignObj ()
 
uiObjecthCenterObj ()
 
uiMainWinmainwin () override
 
 operator const uiGroupObj * () const
 
 operator const uiObject & () const
 
 operator uiGroupObj * ()
 
 operator uiObject & ()
 
uiParentparent ()
 
const uiParentparent () 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 uiFontfont () const
 
bool hasFocus () const
 
bool isDisplayed () const
 
uiObjectmainObject ()
 
const uiObjectmainObject () const
 
void manageChild (uiBaseObject &, uiObjectBody &)
 
uiParentBodypbody ()
 
const uiParentBodypbody () 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)
 
uiBodybody ()
 
const uiBodybody () 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 CallBackertrueCaller ()
 
- 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_typename () const override
 
NamedObjectoperator= (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
 

Static Public Member Functions

static IOParlastUsed ()
 == UnitOfMeasure::currentDefaults() More...
 
- Static Public Member Functions inherited from uiGroup
static uiGroupgtDynamicCastToGrp (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 ()
 

Public Attributes

Notifier< uiUnitSelpropSelChange
 
CNotifier< uiUnitSel, const UnitOfMeasure * > selChange
 Returns previous unit. More...
 

Protected Member Functions

void displayGroup (bool yn)
 
uiString getSelTxt (const UnitOfMeasure *) const
 
const UnitOfMeasuregtUnit () const
 
void initGrp (CallBacker *)
 
void mnSelChg (CallBacker *)
 
void propSelChg (CallBacker *)
 
void selChg (CallBacker *)
 
void setMnemFld (const Mnemonic *)
 
void setPropFld (Mnemonic::StdType)
 
void setUnFld (const UnitOfMeasure *)
 
void update ()
 
- Protected Member Functions inherited from uiGroup
void attach_ (constraintType, uiObject *oth, int margin=-1, bool reciprocal=true) override
 
void bodyDel (CallBacker *)
 
uiObjectmainobject () 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

uiComboBoxinpfld_
 
uiComboBoxmnfld_ = nullptr
 
const UnitOfMeasureprevuom_ = nullptr
 
uiComboBoxpropfld_ = nullptr
 
Setup setup_
 
BufferString tblkey_
 
ObjectSet< const UnitOfMeasureunits_
 
- Protected Attributes inherited from uiGroup
uiGroupParentBodybody_
 
uiGroupObjgrpobj_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

void init ()
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Detailed Description

Selector for UnitOfMeasure's.

Uses the UnitOfMeasure::currentDefaults() to get/set a table of 'last used' unit of measure values. This list provides the start-up seletion. Therefore, make sure the values you display are converted to user values after the uiUnitSel is constructed.

The currentDefaults() key is taken from the label text, if you want no label then you probably want to set a key. If none is known then the name of the Property Type will be used.

<>

Constructor & Destructor Documentation

◆ uiUnitSel() [1/4]

uiUnitSel::uiUnitSel ( uiParent ,
const Setup  
)

◆ uiUnitSel() [2/4]

uiUnitSel::uiUnitSel ( uiParent ,
Mnemonic::StdType   
)

◆ uiUnitSel() [3/4]

uiUnitSel::uiUnitSel ( uiParent ,
const Mnemonic mn = nullptr 
)

◆ ~uiUnitSel()

uiUnitSel::~uiUnitSel ( )

◆ uiUnitSel() [4/4]

mDeprecatedDef uiUnitSel::uiUnitSel ( uiParent p,
const char *  lbltxt = nullptr 
)

Member Function Documentation

◆ displayGroup()

void uiUnitSel::displayGroup ( bool  yn)
protected

◆ fillPar()

void uiUnitSel::fillPar ( IOPar ,
const char *  altkey = nullptr 
) const

◆ getInternalValue() [1/2]

mDeprecatedDef double uiUnitSel::getInternalValue ( double  uservalue) const

◆ getInternalValue() [2/2]

mDeprecatedDef float uiUnitSel::getInternalValue ( float  uservalue) const

◆ getSelTxt()

uiString uiUnitSel::getSelTxt ( const UnitOfMeasure ) const
protected

◆ getUnit()

const UnitOfMeasure* uiUnitSel::getUnit ( ) const

◆ getUnitName()

const char* uiUnitSel::getUnitName ( ) const

◆ getUserValue() [1/2]

mDeprecatedDef double uiUnitSel::getUserValue ( double  internalval) const

◆ getUserValue() [2/2]

mDeprecatedDef float uiUnitSel::getUserValue ( float  internalval) const

◆ gtUnit()

const UnitOfMeasure* uiUnitSel::gtUnit ( ) const
protected

◆ hasMnemonicSelection()

bool uiUnitSel::hasMnemonicSelection ( ) const
inline

◆ init()

void uiUnitSel::init ( )
private

◆ initGrp()

void uiUnitSel::initGrp ( CallBacker )
protected

◆ lastUsed()

static IOPar& uiUnitSel::lastUsed ( )
static

◆ mnemonic()

const Mnemonic* uiUnitSel::mnemonic ( ) const

◆ mnSelChg()

void uiUnitSel::mnSelChg ( CallBacker )
protected

◆ propSelChg()

void uiUnitSel::propSelChg ( CallBacker )
protected

◆ propType()

Mnemonic::StdType uiUnitSel::propType ( ) const
inline

◆ selChg()

void uiUnitSel::selChg ( CallBacker )
protected

◆ setFallbackKey()

void uiUnitSel::setFallbackKey ( const char *  )

◆ setMnemFld()

void uiUnitSel::setMnemFld ( const Mnemonic )
protected

◆ setMnemonic()

void uiUnitSel::setMnemonic ( const Mnemonic )

◆ setPropFld()

void uiUnitSel::setPropFld ( Mnemonic::StdType  )
protected

◆ setPropType()

void uiUnitSel::setPropType ( Mnemonic::StdType  )

◆ setUnFld()

void uiUnitSel::setUnFld ( const UnitOfMeasure )
protected

◆ setUnit() [1/2]

mDeprecatedDef void uiUnitSel::setUnit ( const char *  )

◆ setUnit() [2/2]

void uiUnitSel::setUnit ( const UnitOfMeasure uom = nullptr)

◆ tblKey()

const char* uiUnitSel::tblKey ( ) const

For UnitOfMeasure::currentDefaults() default is prop std nm, else lbltxt

◆ update()

void uiUnitSel::update ( )
protected

◆ usePar()

bool uiUnitSel::usePar ( const IOPar ,
const char *  altkey = nullptr 
)

Member Data Documentation

◆ inpfld_

uiComboBox* uiUnitSel::inpfld_
protected

◆ mnfld_

uiComboBox* uiUnitSel::mnfld_ = nullptr
protected

◆ prevuom_

const UnitOfMeasure* uiUnitSel::prevuom_ = nullptr
mutableprotected

◆ propfld_

uiComboBox* uiUnitSel::propfld_ = nullptr
protected

◆ propSelChange

Notifier<uiUnitSel> uiUnitSel::propSelChange

◆ selChange

CNotifier<uiUnitSel,const UnitOfMeasure*> uiUnitSel::selChange

Returns previous unit.

◆ setup_

Setup uiUnitSel::setup_
protected

◆ tblkey_

BufferString uiUnitSel::tblkey_
protected

◆ units_

ObjectSet<const UnitOfMeasure> uiUnitSel::units_
protected

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