OpendTect-6_4  6.4
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 Setup &)
 
 uiUnitSel (uiParent *, PropertyRef::StdType)
 
 uiUnitSel (uiParent *, const char *lbltxt=0)
 For survey Z unit. More...
 
void setUnit (const UnitOfMeasure *uom=0)
 
void setUnit (const char *)
 
const UnitOfMeasuregetUnit () const
 
const char * getUnitName () const
 
float getUserValue (float internalval) const
 
double getUserValue (double internalval) const
 
float getInternalValue (float uservalue) const
 
double getInternalValue (double uservalue) const
 
PropertyRef::StdType propType () const
 
void setPropType (PropertyRef::StdType)
 
uiComboBoxinpFld () const
 
void fillPar (IOPar &, const char *altkey=0) const
 
bool usePar (const IOPar &, const char *altkey=0)
 
const char * tblKey () const
 
void setFallbackKey (const char *)
 
- 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 ()
 

Static Public Member Functions

static IOParlastUsed ()
 == UnitOfMeasure::currentDefaults() More...
 
- Static Public Member Functions inherited from uiGroup
static uiGroupgtDynamicCastToGrp (mQtclass(QWidget *))
 

Public Attributes

Notifier< uiUnitSelselChange
 
Notifier< uiUnitSelpropSelChange
 

Protected Member Functions

void selChg (CallBacker *)
 
void propSelChg (CallBacker *)
 
void setPropFld (PropertyRef::StdType)
 
void setUnFld (const UnitOfMeasure *)
 
void update ()
 
uiString getSelTxt (const UnitOfMeasure *) const
 
const UnitOfMeasuregtUnit () const
 
- 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

Setup setup_
 
ObjectSet< const UnitOfMeasureunits_
 
BufferString tblkey_
 
uiComboBoxinpfld_
 
uiComboBoxpropfld_
 
- Protected Attributes inherited from uiGroup
uiGroupObjgrpobj_
 
uiGroupParentBodybody_
 

Private Member Functions

void init ()
 

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::uiUnitSel ( uiParent ,
const Setup  
)
uiUnitSel::uiUnitSel ( uiParent ,
PropertyRef::StdType   
)
uiUnitSel::uiUnitSel ( uiParent ,
const char *  lbltxt = 0 
)

For survey Z unit.

Member Function Documentation

void uiUnitSel::fillPar ( IOPar ,
const char *  altkey = 0 
) const
float uiUnitSel::getInternalValue ( float  uservalue) const
double uiUnitSel::getInternalValue ( double  uservalue) const
uiString uiUnitSel::getSelTxt ( const UnitOfMeasure ) const
protected
const UnitOfMeasure* uiUnitSel::getUnit ( ) const
const char* uiUnitSel::getUnitName ( ) const
float uiUnitSel::getUserValue ( float  internalval) const
double uiUnitSel::getUserValue ( double  internalval) const
const UnitOfMeasure* uiUnitSel::gtUnit ( ) const
protected
void uiUnitSel::init ( )
private
uiComboBox* uiUnitSel::inpFld ( ) const
inline
static IOPar& uiUnitSel::lastUsed ( )
static
void uiUnitSel::propSelChg ( CallBacker )
protected
PropertyRef::StdType uiUnitSel::propType ( ) const
inline
void uiUnitSel::selChg ( CallBacker )
inlineprotected
void uiUnitSel::setFallbackKey ( const char *  )
void uiUnitSel::setPropFld ( PropertyRef::StdType  )
protected
void uiUnitSel::setPropType ( PropertyRef::StdType  )
void uiUnitSel::setUnFld ( const UnitOfMeasure )
protected
void uiUnitSel::setUnit ( const UnitOfMeasure uom = 0)
void uiUnitSel::setUnit ( const char *  )
const char* uiUnitSel::tblKey ( ) const

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

void uiUnitSel::update ( )
protected
bool uiUnitSel::usePar ( const IOPar ,
const char *  altkey = 0 
)

Member Data Documentation

uiComboBox* uiUnitSel::inpfld_
protected
uiComboBox* uiUnitSel::propfld_
protected
Notifier<uiUnitSel> uiUnitSel::propSelChange
Notifier<uiUnitSel> uiUnitSel::selChange
Setup uiUnitSel::setup_
protected
BufferString uiUnitSel::tblkey_
protected
ObjectSet<const UnitOfMeasure> uiUnitSel::units_
protected

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