OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
uiMenu Class Reference
Inheritance diagram for uiMenu:
[legend]

Public Member Functions

 uiMenu (const uiString &txt=uiString::emptyString(), const char *iconnm=0)
 
 uiMenu (const MenuItem &)
 
 ~uiMenu ()
 
void addItems (const ObjectSet< MenuItem > &)
 
bool isStandAlone () const
 
bool isCheckable () const
 
void setCheckable (bool)
 
bool isEnabled () const
 
void setEnabled (bool)
 
bool isChecked () const
 
void setChecked (bool)
 
int exec ()
 pops-up at mouse position More...
 
void setText (const uiString &)
 
const uiStringtext () const
 
void clear ()
 
void setIcon (const uiIcon &)
 
void setIcon (const char *iconnm)
 
const char * getIconName () const
 
 mQtclass (QMenu)*getQMenu()
 
 mQtclass (QWidget *) getWidget()
 
void doIntercept (bool yn, uiAction *activateitm=0)
 
 uiMenu (uiParent *, const uiString &txt=uiString::emptyString(), const char *iconfilenm=0)
 
- 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...
 

Static Public Member Functions

static void addInterceptor (const CallBack &)
 Not for casual use. More...
 
static void removeInterceptor (const CallBack &)
 

Private Member Functions

 mODTextTranslationClass (uiMenu)
 
void setAction (uiAction *)
 
 mQtclass (QMenu)*qmenu_
 
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 useStyleSheet ()
 

Private Attributes

uiString text_
 
BufferString iconnm_
 
uiActionsubmenuaction_
 
uiActioninterceptaction_
 
bool dointercept_
 

Friends

class uiAction
 

Additional Inherited Members

- Protected Member Functions inherited from uiActionContainer
 uiActionContainer ()
 
int getFreeID () const
 
- Protected Attributes inherited from uiActionContainer
ObjectSet< uiAction > actions_
 
TypeSet< int > ids_
 

Detailed Description

< Works on complete menubar

A standard menu. If you create one yourself, you own it and should delete it. If you insert it into a menu or toolbar, ownership is transfered.

Constructor & Destructor Documentation

uiMenu::uiMenu ( const uiString txt = uiString::emptyString(),
const char *  iconnm = 0 
)
uiMenu::uiMenu ( const MenuItem )
uiMenu::~uiMenu ( )
uiMenu::uiMenu ( uiParent ,
const uiString txt = uiString::emptyString(),
const char *  iconfilenm = 0 
)

Member Function Documentation

static void uiMenu::addInterceptor ( const CallBack )
static

Not for casual use.

void uiMenu::addItems ( const ObjectSet< MenuItem > &  )
void uiMenu::clear ( )
inline
void uiMenu::doClear ( )
privatevirtual

Implements uiActionContainer.

void uiMenu::doInsertAction ( mQtclass(QAction)*  ,
mQtclass(QAction)*  before 
)
privatevirtual

Implements uiActionContainer.

void uiMenu::doInsertMenu ( mQtclass(QMenu)*  ,
mQtclass(QAction)*  before 
)
privatevirtual

Implements uiActionContainer.

void uiMenu::doInsertSeparator ( mQtclass(QAction)*  before)
privatevirtual

Implements uiActionContainer.

void uiMenu::doIntercept ( bool  yn,
uiAction activateitm = 0 
)
void uiMenu::doRemoveAction ( mQtclass(QAction)*  )
privatevirtual

Implements uiActionContainer.

int uiMenu::exec ( )

pops-up at mouse position

The return code is the id of the selected item in either the popup menu or one of its submenus, or -1 if no item is selected (normally because the user presses Escape).

const char* uiMenu::getIconName ( ) const
bool uiMenu::isCheckable ( ) const
Returns
true if this menu is not inserted into a menu with an item that owns it.
bool uiMenu::isChecked ( ) const
bool uiMenu::isEnabled ( ) const
bool uiMenu::isStandAlone ( ) const
inline
uiMenu::mODTextTranslationClass ( uiMenu  )
private
uiMenu::mQtclass ( QMenu  )
inline
uiMenu::mQtclass ( QWidget *  )
uiMenu::mQtclass ( QMenu  )
private
static void uiMenu::removeInterceptor ( const CallBack )
static
void uiMenu::setAction ( uiAction )
private
void uiMenu::setCheckable ( bool  )
void uiMenu::setChecked ( bool  )
void uiMenu::setEnabled ( bool  )
void uiMenu::setIcon ( const uiIcon &  )
void uiMenu::setIcon ( const char *  iconnm)
void uiMenu::setText ( const uiString )
const uiString& uiMenu::text ( ) const
void uiMenu::useStyleSheet ( )
private

Friends And Related Function Documentation

friend class uiAction
friend

Member Data Documentation

bool uiMenu::dointercept_
private
BufferString uiMenu::iconnm_
private
uiAction* uiMenu::interceptaction_
private
uiAction* uiMenu::submenuaction_
private
uiString uiMenu::text_
private

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