OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
uiObject Class Reference

The base class for most UI elements. More...

Inheritance diagram for uiObject:
[legend]

Public Types

enum  SzPolicy {
  Undef , Small , Medium , Wide ,
  SmallVar , MedVar , WideVar , SmallMax ,
  MedMax , WideMax
}
 How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1. Wide : 4* base sz + 3. The xxVar options specify that the element may have a bigger internal preferred size. In that case, the maximum is taken. The xxMax options specify that the element should take all available space ( stretch = 2 ) More...
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 ~uiObject ()
 
uiSize actualSize (bool include_border=true) const
 
void attach (constraintType, int margin=-1)
 attaches object to another In case the stretched... options are used, margin=-1 (default) stretches the object not to cross the border. margin=-2 stretches the object to fill the parent's border. This looks nice with separators. More...
 
void attach (constraintType, uiObject *, int margin=-1, bool reciprocal=true)
 
void attach (constraintType, uiParent *, int margin=-1, bool reciprocal=true)
 
virtual OD::Color backgroundColor () const
 
virtual const ObjectSet< uiBaseObject > * childList () const
 
void close ()
 
void deepRedraw ()
 
void disabFocus ()
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
const uiFontfont () const
 
QWidget * getWidget () override
 
virtual bool handleLongTabletPress ()
 
bool hasFocus () const
 
virtual int height () const
 Actual size in pixels. More...
 
bool isCursorInside () const
 
bool isDisplayed () const
 
virtual bool isEmpty () const
 
bool isSensitive () const
 
uiMainWinmainwin ()
 
uiParentparent ()
 
const uiParentparent () const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
QWidget * qwidget ()
 
const QWidget * qwidget () const
 
void reDraw (bool deep)
 
void reParent (uiParent *)
 
OD::Color roBackgroundColor () const
 
bool sensitive () const
 
virtual void setBackgroundColor (const OD::Color &)
 
virtual void setBackgroundPixmap (const uiPixmap &)
 
void setCaption (const uiString &)
 
virtual void setCursor (const MouseCursor &)
 
void setFocus ()
 
void setFont (const uiFont &)
 
void setHSzPol (SzPolicy)
 
void setMaximumHeight (int)
 
void setMaximumHeightInChar (int)
 
void setMaximumWidth (int)
 
void setMaximumWidthInChar (int)
 
void setMinimumHeight (int)
 
void setMinimumHeightInChar (int)
 
void setMinimumWidth (int)
 
void setMinimumWidthInChar (int)
 
virtual void setName (const char *) override
 
virtual void setPrefHeight (int)
 
void setPrefHeightInChar (float)
 
void setPrefHeightInChar (int)
 
virtual void setPrefWidth (int)
 
void setPrefWidthInChar (float)
 
void setPrefWidthInChar (int)
 
void setSensitive (bool yn=true)
 
void setStretch (int hor, int ver)
 Sets stretch factors for object If stretch factor is > 1, then object will already grow at pop-up. More...
 
virtual void setStyleSheet (const char *)
 
virtual void setTextColor (const OD::Color &)
 
void setToolTip (const uiString &)
 
void setVSzPol (SzPolicy)
 
void shallowRedraw ()
 
int stretch (bool hor) const
 
SzPolicy szPol (bool hor=true) const
 
const uiStringtoolTip () const
 
void translateText () override
 
bool visible () const
 
virtual int width () const
 Actual size in pixels. More...
 
- 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
 
const QWidget * getWidget () const
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual Notifier< uiBaseObject > & postFinalize ()
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
virtual Notifier< uiBaseObject > & preFinalize ()
 
- 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
 
- 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 int baseFldSize ()
 
static int iconSize ()
 
static void setTabOrder (uiObject *first, uiObject *second)
 
static void updateToolTips ()
 
- 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< uiObjectclosed
 Triggered when object closes. More...
 
CNotifier< uiObject, uiRect & > setGeometry
 triggered when getting a new geometry A reference to the new geometry is passed which can be manipulated, before the geometry is actually set to the QWidget. More...
 

Protected Member Functions

 uiObject (uiParent *, const char *nm)
 
 uiObject (uiParent *, const char *nm, uiObjectBody &)
 
virtual bool closeOK ()
 hook. Accepts/denies closing of window. More...
 
uiObjectBodyobjBody ()
 
const uiObjectBodyobjBody () const
 
void triggerSetGeometry (const i_LayoutItem *, uiRect &)
 setGeometry should be triggered by this's layoutItem More...
 
void updateToolTip (CallBacker *=nullptr)
 
- Protected Member Functions inherited from uiBaseObject
void setBody (uiBody *b)
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

uiString tooltip_
 
uiObjEventFilter * uiobjeventfilter_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Attributes

uiParentparent_
 

Friends

class i_LayoutItem
 
class uiObjectBody
 

Detailed Description

The base class for most UI elements.

<>

Member Enumeration Documentation

◆ SzPolicy

How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1. Wide : 4* base sz + 3. The xxVar options specify that the element may have a bigger internal preferred size. In that case, the maximum is taken. The xxMax options specify that the element should take all available space ( stretch = 2 )

Enumerator
Undef 
Small 
Medium 
Wide 
SmallVar 
MedVar 
WideVar 
SmallMax 
MedMax 
WideMax 

Constructor & Destructor Documentation

◆ ~uiObject()

uiObject::~uiObject ( )

◆ uiObject() [1/2]

uiObject::uiObject ( uiParent ,
const char *  nm 
)
protected

◆ uiObject() [2/2]

uiObject::uiObject ( uiParent ,
const char *  nm,
uiObjectBody  
)
protected

Member Function Documentation

◆ actualSize()

uiSize uiObject::actualSize ( bool  include_border = true) const

◆ attach() [1/3]

void uiObject::attach ( constraintType  ,
int  margin = -1 
)

attaches object to another In case the stretched... options are used, margin=-1 (default) stretches the object not to cross the border. margin=-2 stretches the object to fill the parent's border. This looks nice with separators.

◆ attach() [2/3]

void uiObject::attach ( constraintType  ,
uiObject ,
int  margin = -1,
bool  reciprocal = true 
)

◆ attach() [3/3]

void uiObject::attach ( constraintType  ,
uiParent ,
int  margin = -1,
bool  reciprocal = true 
)

◆ backgroundColor()

virtual OD::Color uiObject::backgroundColor ( ) const
virtual

Reimplemented in uiGraphicsViewBase.

◆ baseFldSize()

static int uiObject::baseFldSize ( )
static

◆ childList()

virtual const ObjectSet<uiBaseObject>* uiObject::childList ( ) const
inlinevirtual

Reimplemented in uiGroupObj.

◆ close()

void uiObject::close ( )

◆ closeOK()

virtual bool uiObject::closeOK ( )
inlineprotectedvirtual

hook. Accepts/denies closing of window.

◆ deepRedraw()

void uiObject::deepRedraw ( )
inline

◆ disabFocus()

void uiObject::disabFocus ( )

◆ display()

void uiObject::display ( bool  yn,
bool  shrink = false,
bool  maximized = false 
)

◆ font()

const uiFont* uiObject::font ( ) const

◆ getWidget()

QWidget* uiObject::getWidget ( )
inlineoverridevirtual

Reimplemented from uiBaseObject.

◆ handleLongTabletPress()

virtual bool uiObject::handleLongTabletPress ( )
virtual

◆ hasFocus()

bool uiObject::hasFocus ( ) const

◆ height()

virtual int uiObject::height ( ) const
virtual

Actual size in pixels.

Reimplemented in uiGraphicsViewBase.

◆ iconSize()

static int uiObject::iconSize ( )
static

◆ isCursorInside()

bool uiObject::isCursorInside ( ) const

◆ isDisplayed()

bool uiObject::isDisplayed ( ) const

◆ isEmpty()

virtual bool uiObject::isEmpty ( ) const
inlinevirtual

Reimplemented in uiTreeView, and uiComboBox.

◆ isSensitive()

bool uiObject::isSensitive ( ) const
inline

◆ mainwin()

uiMainWin* uiObject::mainwin ( )

◆ objBody() [1/2]

uiObjectBody* uiObject::objBody ( )
protected

◆ objBody() [2/2]

const uiObjectBody* uiObject::objBody ( ) const
protected

◆ parent() [1/2]

uiParent* uiObject::parent ( )
inline

◆ parent() [2/2]

const uiParent* uiObject::parent ( ) const
inline

◆ prefHNrPics()

int uiObject::prefHNrPics ( ) const

◆ prefVNrPics()

int uiObject::prefVNrPics ( ) const

◆ qwidget() [1/2]

QWidget* uiObject::qwidget ( )

◆ qwidget() [2/2]

const QWidget* uiObject::qwidget ( ) const
inline

◆ reDraw()

void uiObject::reDraw ( bool  deep)

◆ reParent()

void uiObject::reParent ( uiParent )

◆ roBackgroundColor()

OD::Color uiObject::roBackgroundColor ( ) const

◆ sensitive()

bool uiObject::sensitive ( ) const

◆ setBackgroundColor()

virtual void uiObject::setBackgroundColor ( const OD::Color )
virtual

Reimplemented in ui3DViewer, and uiGraphicsViewBase.

◆ setBackgroundPixmap()

virtual void uiObject::setBackgroundPixmap ( const uiPixmap )
virtual

◆ setCaption()

void uiObject::setCaption ( const uiString )

◆ setCursor()

virtual void uiObject::setCursor ( const MouseCursor )
virtual

Reimplemented in uiObjectItemView.

◆ setFocus()

void uiObject::setFocus ( )

◆ setFont()

void uiObject::setFont ( const uiFont )

◆ setHSzPol()

void uiObject::setHSzPol ( SzPolicy  )

◆ setMaximumHeight()

void uiObject::setMaximumHeight ( int  )

◆ setMaximumHeightInChar()

void uiObject::setMaximumHeightInChar ( int  )

◆ setMaximumWidth()

void uiObject::setMaximumWidth ( int  )

◆ setMaximumWidthInChar()

void uiObject::setMaximumWidthInChar ( int  )

◆ setMinimumHeight()

void uiObject::setMinimumHeight ( int  )

◆ setMinimumHeightInChar()

void uiObject::setMinimumHeightInChar ( int  )

◆ setMinimumWidth()

void uiObject::setMinimumWidth ( int  )

◆ setMinimumWidthInChar()

void uiObject::setMinimumWidthInChar ( int  )

◆ setName()

virtual void uiObject::setName ( const char *  )
overridevirtual

Reimplemented from NamedObject.

◆ setPrefHeight()

virtual void uiObject::setPrefHeight ( int  )
virtual

◆ setPrefHeightInChar() [1/2]

void uiObject::setPrefHeightInChar ( float  )

◆ setPrefHeightInChar() [2/2]

void uiObject::setPrefHeightInChar ( int  )

◆ setPrefWidth()

virtual void uiObject::setPrefWidth ( int  )
virtual

◆ setPrefWidthInChar() [1/2]

void uiObject::setPrefWidthInChar ( float  )

◆ setPrefWidthInChar() [2/2]

void uiObject::setPrefWidthInChar ( int  )

◆ setSensitive()

void uiObject::setSensitive ( bool  yn = true)

◆ setStretch()

void uiObject::setStretch ( int  hor,
int  ver 
)

Sets stretch factors for object If stretch factor is > 1, then object will already grow at pop-up.

◆ setStyleSheet()

virtual void uiObject::setStyleSheet ( const char *  )
virtual

◆ setTabOrder()

static void uiObject::setTabOrder ( uiObject first,
uiObject second 
)
static

◆ setTextColor()

virtual void uiObject::setTextColor ( const OD::Color )
virtual

◆ setToolTip()

void uiObject::setToolTip ( const uiString )

◆ setVSzPol()

void uiObject::setVSzPol ( SzPolicy  )

◆ shallowRedraw()

void uiObject::shallowRedraw ( )
inline

◆ stretch()

int uiObject::stretch ( bool  hor) const

◆ szPol()

SzPolicy uiObject::szPol ( bool  hor = true) const

◆ toolTip()

const uiString& uiObject::toolTip ( ) const

◆ translateText()

void uiObject::translateText ( )
overridevirtual

Triggers translation of object and all members to current language.

Reimplemented from uiBaseObject.

Reimplemented in uiTreeView, and uiSpinBox.

◆ triggerSetGeometry()

void uiObject::triggerSetGeometry ( const i_LayoutItem ,
uiRect  
)
protected

setGeometry should be triggered by this's layoutItem

◆ updateToolTip()

void uiObject::updateToolTip ( CallBacker = nullptr)
protected

◆ updateToolTips()

static void uiObject::updateToolTips ( )
static

◆ visible()

bool uiObject::visible ( ) const

◆ width()

virtual int uiObject::width ( ) const
virtual

Actual size in pixels.

Reimplemented in uiGraphicsViewBase.

Friends And Related Function Documentation

◆ i_LayoutItem

friend class i_LayoutItem
friend

◆ uiObjectBody

friend class uiObjectBody
friend

Member Data Documentation

◆ closed

Notifier<uiObject> uiObject::closed

Triggered when object closes.

◆ parent_

uiParent* uiObject::parent_
private

◆ setGeometry

CNotifier<uiObject,uiRect&> uiObject::setGeometry

triggered when getting a new geometry A reference to the new geometry is passed which can be manipulated, before the geometry is actually set to the QWidget.

◆ tooltip_

uiString uiObject::tooltip_
protected

◆ uiobjeventfilter_

uiObjEventFilter* uiObject::uiobjeventfilter_
protected

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