OpendTect-6_4  6.4
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 Member Functions

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

Public Attributes

CNotifier< uiToolBar, int > buttonClicked
 
Notifier< uiToolBarorientationChanged
 

Protected Member Functions

void doInsertMenu (mQtclass(QMenu)*, mQtclass(QAction)*before)
 
void doInsertAction (mQtclass(QAction)*, mQtclass(QAction)*before)
 
void doInsertSeparator (mQtclass(QAction)*before)
 
void doRemoveAction (mQtclass(QAction)*)
 
void doClear ()
 
void handleFinalise (bool pre)
 
 mQtclass (QToolBar *) qtoolbar_
 
int getButtonID (mQtclass(QAction *))
 
- Protected Member Functions inherited from uiActionContainer
 uiActionContainer ()
 
int getFreeID () const
 
- Protected Member Functions inherited from uiParent
virtual void attach_ (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual uiObjectmainobject ()
 

Protected Attributes

uiAction * toolbarmenuaction_
 
i_ToolBarMessengermsgr_
 
ToolBarArea tbarea_
 
ObjectSet< uiObjectaddedobjects_
 
uiString label_
 
uiParentparent_
 
- Protected Attributes inherited from uiActionContainer
ObjectSet< uiAction > actions_
 
TypeSet< int > ids_
 

Friends

class i_ToolBarMessenger
 
class uiMainWinBody
 

Detailed Description

Member Enumeration Documentation

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::uiToolBar ( uiParent ,
const uiString nm,
ToolBarArea  d = Top,
bool  newline = false 
)
uiToolBar::~uiToolBar ( )

Member Function Documentation

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

Legacy, use addObject instead.

void uiToolBar::addObject ( uiObject )
void uiToolBar::addSeparator ( )
inline
void uiToolBar::clear ( )
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.

void uiToolBar::doClear ( )
protectedvirtual

Implements uiActionContainer.

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

Implements uiActionContainer.

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

Implements uiActionContainer.

void uiToolBar::doInsertSeparator ( mQtclass(QAction)*  before)
protectedvirtual

Implements uiActionContainer.

void uiToolBar::doRemoveAction ( mQtclass(QAction)*  )
protectedvirtual

Implements uiActionContainer.

int uiToolBar::getButtonID ( mQtclass(QAction *)  )
protected
uiString uiToolBar::getDispNm ( )
void uiToolBar::getEntityList ( ObjectSet< const CallBacker > &  ) const

CmdDriver functionality, not for casual use.

OD::Orientation uiToolBar::getOrientation ( ) const
void uiToolBar::handleFinalise ( bool  pre)
protected
bool uiToolBar::isHidden ( ) const
bool uiToolBar::isOn ( int  id) const

Does only work on toggle-buttons

bool uiToolBar::isSensitive ( ) const
bool uiToolBar::isVisible ( ) const
uiToolBar::mQtclass ( QToolBar *  )
inline
uiToolBar::mQtclass ( QToolBar *  )
protected
uiParent* uiToolBar::parent ( )
inline
static ToolBarArea uiToolBar::pluginArea ( )
inlinestatic
ToolBarArea uiToolBar::prefArea ( ) const
inline
void uiToolBar::setButtonMenu ( int  ,
uiMenu ,
uiToolButton::PopupMode  = uiToolButton::MenuButtonPopup 
)

Menu will be owned by uiToolButton.

void uiToolBar::setIcon ( int  id,
const char *   
)
void uiToolBar::setIcon ( int  id,
const uiIcon &   
)
void uiToolBar::setLabel ( const uiString )
void uiToolBar::setSensitive ( int  id,
bool  yn 
)

Does only work on buttons

void uiToolBar::setSensitive ( bool  yn)

Works on complete toolbar

void uiToolBar::setShortcut ( int  id,
const char *   
)
void uiToolBar::setToggle ( int  id,
bool   
)
void uiToolBar::setToolBarMenuAction ( uiAction *  )
void uiToolBar::setToolTip ( int  id,
const uiString  
)
static ObjectSet<uiToolBar>& uiToolBar::toolBars ( )
static
void uiToolBar::translateText ( )

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

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

Does only work on toggle-buttons

Friends And Related Function Documentation

friend class i_ToolBarMessenger
friend
friend class uiMainWinBody
friend

Member Data Documentation

ObjectSet<uiObject> uiToolBar::addedobjects_
protected
CNotifier<uiToolBar,int> uiToolBar::buttonClicked
uiString uiToolBar::label_
protected
i_ToolBarMessenger* uiToolBar::msgr_
protected
Notifier<uiToolBar> uiToolBar::orientationChanged
uiParent* uiToolBar::parent_
protected
ToolBarArea uiToolBar::tbarea_
protected
uiAction* uiToolBar::toolbarmenuaction_
protected

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