OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
uiToolBar Class Reference
Inheritance diagram for uiToolBar:
[legend]

Public Types

enum  ToolBarArea {
  Left =0x1 , Right =0x2 , Top =0x4 , Bottom =0x8 ,
  None =0 , All =0xf
}
 ToolBar Dock Identifier. More...
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 uiToolBar (uiParent *, const char *nm, ToolBarArea d=Top, bool newline=false)
 
 uiToolBar (uiParent *, const uiString &nm, ToolBarArea d=Top, bool newline=false)
 
 ~uiToolBar ()
 
int addButton (const char *fnm, const uiString &tooltip, const CallBack &=CallBack(), bool toggle=false, int id=-1)
 
int addButton (const MenuItem &)
 
int addButton (const uiToolButtonSetup &)
 
void addButton (uiButton *)
 
void addObject (uiObject *)
 
void addSeparator ()
 
void clear ()
 
void display (bool yn=true, bool s=false, bool m=false) override
 
uiString getDispNm () const
 
void getEntityList (ObjectSet< const CallBacker > &) const
 CmdDriver functionality, not for casual use. More...
 
OD::Orientation getOrientation () const
 
bool hasObject (const uiObject *) const
 
bool isHidden () const
 
bool isOn (int id) const
 
bool isSensitive () const
 
bool isVisible () const
 
uiParentparent ()
 
ToolBarArea prefArea () const
 
QToolBar * qwidget ()
 
void removeObject (uiObject *)
 
void setButtonMenu (int, uiMenu *, uiToolButton::PopupMode=uiToolButton::MenuButtonPopup)
 Menu will be owned by uiToolButton. More...
 
void setIcon (int id, const char *)
 
void setIcon (int id, const uiIcon &)
 
void setLabel (const uiString &)
 
void setSensitive (bool yn)
 
void setSensitive (int id, bool yn)
 
void setShortcut (int id, const char *)
 
void setTabOrder (uiObject *, uiObject *)
 
void setToggle (int id, bool)
 
void setToolBarMenuAction (uiAction *)
 
void setToolTip (int id, const uiString &)
 
void translateText () override
 
void turnOn (int id, bool yn)
 
- Public Member Functions inherited from uiActionContainer
virtual ~uiActionContainer ()
 
const ObjectSet< uiAction > & actions () const
 
uiMenuaddMenu (uiMenu *, const uiAction *before)
 
uiMenuaddMenu (uiMenu *, const uiMenu *before=0)
 
const uiActionfindAction (const char *itmtxt) const
 
const uiActionfindAction (const StringView &fs) const
 
const uiActionfindAction (const uiActionSeparString &) const
 
const uiActionfindAction (const uiMenu *) const
 
const uiActionfindAction (const uiString &itmtxt) const
 The full string of the text will be used. More...
 
const uiActionfindAction (int id) const
 
int getID (const QAction *) const
 
int getID (const uiAction *) const
 
bool hasSharedActions () const
 
int insertAction (const MenuItem &)
 
int insertAction (uiAction *act, int id=-1, const uiAction *before=0)
 
int insertItem (uiAction *a, int id=-1, const uiAction *before=0)
 
int insertItem (uiMenu *mnu)
 
uiActioninsertSeparator ()
 
bool isEmpty () const
 
bool isMenu () const
 
int nrActions () const
 
void reloadIcons ()
 
void removeAction (int id)
 
void removeAction (uiAction *)
 
void removeAllActions ()
 
void removeItem (int id)
 Legacy. More...
 
void removeItem (uiAction *a)
 Legacy. More...
 
bool removeMenu (uiMenu &)
 
void shareActionsFrom (const uiActionContainer *)
 
- 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)
 
const uiFontfont () const
 
bool hasFocus () const
 
bool isDisplayed () const
 
uiObjectmainObject ()
 
const uiObjectmainObject () const
 
virtual uiMainWinmainwin ()
 
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
 
- 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
 
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
 
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 ToolBarArea pluginArea ()
 
static ObjectSet< uiToolBar > & toolBars ()
 
- 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

CNotifier< uiToolBar, int > buttonClicked
 
Notifier< uiToolBarorientationChanged
 

Protected Member Functions

void doClear () override
 
void doInsertAction (QAction *, QAction *before) override
 
void doInsertMenu (QMenu *, QAction *before) override
 
void doInsertSeparator (QAction *before) override
 
void doRemoveAction (QAction *) override
 
int getButtonID (QAction *)
 
void handleFinalise (bool pre)
 
void handleFinalize (bool pre)
 
uiActionmyFindAction (int id)
 
const uiActionmyFindAction (int id) const
 
- Protected Member Functions inherited from uiActionContainer
 uiActionContainer ()
 
int getFreeID () const
 
- Protected Member Functions inherited from uiParent
 uiParent (const char *nm, uiParentBody *)
 
 ~uiParent ()
 
virtual void attach_ (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual uiObjectmainobject ()
 
- Protected Member Functions inherited from uiBaseObject
void setBody (uiBody *b)
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

ObjectSet< uiObjectaddedobjects_
 
uiString label_
 
i_ToolBarMessengermsgr_
 
uiParentparent_
 
QToolBar * qtoolbar_
 
ToolBarArea tbarea_
 
uiActiontoolbarmenuaction_
 
- Protected Attributes inherited from uiActionContainer
ObjectSet< uiActionactions_
 
bool hassharedactions_ = false
 
TypeSet< int > ids_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Friends

class i_ToolBarMessenger
 
class uiMainWinBody
 

Detailed Description

<>

Member Enumeration Documentation

◆ ToolBarArea

ToolBar Dock Identifier.

Enumerator
Left 

To the left of the central uiGroup.

Right 

To the right of the central uiGroup.

Top 

Above the central uiGroup, below the menubar.

Bottom 

Below the central uiGroup, above the status bar.

None 

No toolbar area.

All 

All areas.

Constructor & Destructor Documentation

◆ uiToolBar() [1/2]

uiToolBar::uiToolBar ( uiParent ,
const uiString nm,
ToolBarArea  d = Top,
bool  newline = false 
)

◆ uiToolBar() [2/2]

uiToolBar::uiToolBar ( uiParent ,
const char *  nm,
ToolBarArea  d = Top,
bool  newline = false 
)

◆ ~uiToolBar()

uiToolBar::~uiToolBar ( )

Member Function Documentation

◆ addButton() [1/4]

int uiToolBar::addButton ( const char *  fnm,
const uiString tooltip,
const CallBack = CallBack(),
bool  toggle = false,
int  id = -1 
)

◆ addButton() [2/4]

int uiToolBar::addButton ( const MenuItem )

◆ addButton() [3/4]

int uiToolBar::addButton ( const uiToolButtonSetup )

◆ addButton() [4/4]

void uiToolBar::addButton ( uiButton )

◆ addObject()

void uiToolBar::addObject ( uiObject )

◆ addSeparator()

void uiToolBar::addSeparator ( )
inline

◆ clear()

void uiToolBar::clear ( )

◆ display()

void uiToolBar::display ( bool  yn = true,
bool  s = false,
bool  m = false 
)
overridevirtual

you must call this after all buttons are added s and m are not used.

Reimplemented from uiParent.

◆ doClear()

void uiToolBar::doClear ( )
overrideprotectedvirtual

Implements uiActionContainer.

◆ doInsertAction()

void uiToolBar::doInsertAction ( QAction *  ,
QAction *  before 
)
overrideprotectedvirtual

Implements uiActionContainer.

◆ doInsertMenu()

void uiToolBar::doInsertMenu ( QMenu *  ,
QAction *  before 
)
overrideprotectedvirtual

Implements uiActionContainer.

◆ doInsertSeparator()

void uiToolBar::doInsertSeparator ( QAction *  before)
overrideprotectedvirtual

Implements uiActionContainer.

◆ doRemoveAction()

void uiToolBar::doRemoveAction ( QAction *  )
overrideprotectedvirtual

Implements uiActionContainer.

◆ getButtonID()

int uiToolBar::getButtonID ( QAction *  )
protected

◆ getDispNm()

uiString uiToolBar::getDispNm ( ) const

◆ getEntityList()

void uiToolBar::getEntityList ( ObjectSet< const CallBacker > &  ) const

CmdDriver functionality, not for casual use.

◆ getOrientation()

OD::Orientation uiToolBar::getOrientation ( ) const

◆ handleFinalise()

void uiToolBar::handleFinalise ( bool  pre)
inlineprotected

◆ handleFinalize()

void uiToolBar::handleFinalize ( bool  pre)
protected

◆ hasObject()

bool uiToolBar::hasObject ( const uiObject ) const

◆ isHidden()

bool uiToolBar::isHidden ( ) const

◆ isOn()

bool uiToolBar::isOn ( int  id) const

Does only work on toggle-buttons

◆ isSensitive()

bool uiToolBar::isSensitive ( ) const

◆ isVisible()

bool uiToolBar::isVisible ( ) const

◆ myFindAction() [1/2]

uiAction* uiToolBar::myFindAction ( int  id)
protected

◆ myFindAction() [2/2]

const uiAction* uiToolBar::myFindAction ( int  id) const
protected

◆ parent()

uiParent* uiToolBar::parent ( )
inline

◆ pluginArea()

static ToolBarArea uiToolBar::pluginArea ( )
inlinestatic

◆ prefArea()

ToolBarArea uiToolBar::prefArea ( ) const
inline

◆ qwidget()

QToolBar* uiToolBar::qwidget ( )
inline

◆ removeObject()

void uiToolBar::removeObject ( uiObject )

◆ setButtonMenu()

void uiToolBar::setButtonMenu ( int  ,
uiMenu ,
uiToolButton::PopupMode  = uiToolButton::MenuButtonPopup 
)

Menu will be owned by uiToolButton.

◆ setIcon() [1/2]

void uiToolBar::setIcon ( int  id,
const char *   
)

◆ setIcon() [2/2]

void uiToolBar::setIcon ( int  id,
const uiIcon  
)

◆ setLabel()

void uiToolBar::setLabel ( const uiString )

◆ setSensitive() [1/2]

void uiToolBar::setSensitive ( bool  yn)

Works on complete toolbar

◆ setSensitive() [2/2]

void uiToolBar::setSensitive ( int  id,
bool  yn 
)

Does only work on buttons

◆ setShortcut()

void uiToolBar::setShortcut ( int  id,
const char *   
)

◆ setTabOrder()

void uiToolBar::setTabOrder ( uiObject ,
uiObject  
)

◆ setToggle()

void uiToolBar::setToggle ( int  id,
bool   
)

◆ setToolBarMenuAction()

void uiToolBar::setToolBarMenuAction ( uiAction )

◆ setToolTip()

void uiToolBar::setToolTip ( int  id,
const uiString  
)

◆ toolBars()

static ObjectSet<uiToolBar>& uiToolBar::toolBars ( )
static

◆ translateText()

void uiToolBar::translateText ( )
overridevirtual

The actions will be checked/unchecked as toolbar is displayed/hidden

Reimplemented from uiParent.

◆ turnOn()

void uiToolBar::turnOn ( int  id,
bool  yn 
)

Does only work on toggle-buttons

Friends And Related Function Documentation

◆ i_ToolBarMessenger

friend class i_ToolBarMessenger
friend

◆ uiMainWinBody

friend class uiMainWinBody
friend

Member Data Documentation

◆ addedobjects_

ObjectSet<uiObject> uiToolBar::addedobjects_
protected

◆ buttonClicked

CNotifier<uiToolBar,int> uiToolBar::buttonClicked

◆ label_

uiString uiToolBar::label_
protected

◆ msgr_

i_ToolBarMessenger* uiToolBar::msgr_
protected

◆ orientationChanged

Notifier<uiToolBar> uiToolBar::orientationChanged

◆ parent_

uiParent* uiToolBar::parent_
protected

◆ qtoolbar_

QToolBar* uiToolBar::qtoolbar_
protected

◆ tbarea_

ToolBarArea uiToolBar::tbarea_
protected

◆ toolbarmenuaction_

uiAction* uiToolBar::toolbarmenuaction_
protected

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