OpendTect  6.6
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 uiString &nm, ToolBarArea d=Top, bool newline=false)
 
 uiToolBar (uiParent *p, const char *nm, ToolBarArea d=Top, bool newline=false)
 
 ~uiToolBar ()
 
int addButton (const char *fnm, const char *tooltip, const CallBack &cb=CallBack(), bool toggle=false, int id=-1)
 
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 ()
 
virtual void display (bool yn=true, bool s=false, bool m=false)
 
uiString getDispNm () const
 
void getEntityList (ObjectSet< const CallBacker > &) const
 CmdDriver functionality, not for casual use. More...
 
OD::Orientation getOrientation () const
 
bool isHidden () const
 
bool isOn (int id) const
 
bool isSensitive () const
 
bool isVisible () const
 
uiParentparent ()
 
ToolBarArea prefArea () const
 
QToolBar * qwidget ()
 
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 setToggle (int id, bool)
 
void setToolBarMenuAction (uiAction *)
 
void setToolTip (int id, const uiString &)
 
void translateText ()
 
void turnOn (int id, bool yn)
 
- Public Member Functions inherited from uiActionContainer
virtual ~uiActionContainer ()
 
const ObjectSet< uiAction > & actions () const
 
uiMenuaddMenu (uiMenu *, const uiMenu *before=0)
 
uiActionfindAction (const char *itmtxt)
 
uiActionfindAction (const FixedString &fs)
 
uiActionfindAction (const uiActionSeparString &)
 
uiActionfindAction (const uiMenu *)
 
uiActionfindAction (const uiString &itmtxt)
 The full string of the text will be used. More...
 
uiActionfindAction (int id)
 
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
 
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...
 
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)
 
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 manageChld (uiBaseObject &, uiObjectBody &)
 
uiParentBodypbody ()
 
const uiParentBodypbody () const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
virtual void reDraw (bool deep)
 
Color roBackgroundColor () const
 
bool sensitive () const
 
void setBackgroundColor (const 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 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
 
virtual QWidget * getWidget ()
 
const QWidget * getWidget () const
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
- 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
 
- 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 &)
 
virtual const name_typename () const
 
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 ()
 
void doInsertAction (QAction *, QAction *before)
 
void doInsertMenu (QMenu *, QAction *before)
 
void doInsertSeparator (QAction *before)
 
void doRemoveAction (QAction *)
 
int getButtonID (QAction *)
 
void handleFinalise (bool pre)
 
- Protected Member Functions inherited from uiActionContainer
 uiActionContainer ()
 
int getFreeID () const
 
- Protected Member Functions inherited from uiParent
 uiParent (const char *nm, uiParentBody *)
 
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_
 
TypeSet< int > ids_
 
- Protected Attributes inherited from uiBaseObject
Notifier< uiBaseObjectfinaliseDone
 triggered when finalising finished More...
 
Notifier< uiBaseObjectfinaliseStart
 triggered when about to start finalising More...
 
- 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 p,
const char *  nm,
ToolBarArea  d = Top,
bool  newline = false 
)
inline

◆ ~uiToolBar()

uiToolBar::~uiToolBar ( )

Member Function Documentation

◆ addButton() [1/5]

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

◆ addButton() [2/5]

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

◆ addButton() [3/5]

int uiToolBar::addButton ( const MenuItem )

◆ addButton() [4/5]

int uiToolBar::addButton ( const uiToolButtonSetup )

◆ addButton() [5/5]

void uiToolBar::addButton ( uiButton )

◆ addObject()

void uiToolBar::addObject ( uiObject )

◆ addSeparator()

void uiToolBar::addSeparator ( )
inline

◆ clear()

void uiToolBar::clear ( )

◆ display()

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

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

Reimplemented from uiParent.

◆ doClear()

void uiToolBar::doClear ( )
protectedvirtual

Implements uiActionContainer.

◆ doInsertAction()

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

Implements uiActionContainer.

◆ doInsertMenu()

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

Implements uiActionContainer.

◆ doInsertSeparator()

void uiToolBar::doInsertSeparator ( QAction *  before)
protectedvirtual

Implements uiActionContainer.

◆ doRemoveAction()

void uiToolBar::doRemoveAction ( QAction *  )
protectedvirtual

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)
protected

◆ 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

◆ parent()

uiParent* uiToolBar::parent ( )
inline

◆ pluginArea()

static ToolBarArea uiToolBar::pluginArea ( )
inlinestatic

◆ prefArea()

ToolBarArea uiToolBar::prefArea ( ) const
inline

◆ qwidget()

QToolBar* uiToolBar::qwidget ( )
inline

◆ 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 *   
)

◆ 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 ( )
virtual

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-2022