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

Public Member Functions

 uiAction (const MenuItem &)
 
 uiAction (const uiString &)
 
 uiAction (const uiString &, const CallBack &)
 
 uiAction (const uiString &, const CallBack &, const char *icon_identifier)
 
 uiAction (const uiString &, const CallBack &, const uiIcon &)
 
 uiAction (const uiString &, const char *icon_identifier)
 
 uiAction (QAction *)
 
 ~uiAction ()
 
int beginCmdRecEvent (const BufferString &msg)
 
int beginCmdRecEvent (const char *msg=0)
 
void endCmdRecEvent (int refnr, const char *msg=0)
 
const uiActionContainergetContainer () const
 
const char * getIconName () const
 
int getID () const
 
uiMenugetMenu ()
 
const uiMenugetMenu () const
 
const uiStringiconText () const
 
bool isCheckable () const
 
bool isChecked () const
 
bool isEnabled () const
 
bool isSeparator () const
 
bool isVisible () const
 
QAction * qaction ()
 
const QAction * qaction () const
 
void reloadIcon ()
 
void setCheckable (bool)
 
void setChecked (bool)
 
void setEnabled (bool)
 
void setIcon (const char *identifier)
 
void setIcon (const uiIcon &)
 
void setIconText (const uiString &)
 
void setMenu (uiMenu *)
 Becomes mine. More...
 
void setParentContainer (const uiActionContainer *)
 
void setPixmap (const uiPixmap &)
 
void setSeparator (bool)
 
void setShortcut (const char *)
 
void setText (const uiString &)
 
void setToolTip (const uiString &)
 
void setVisible (bool)
 
const uiStringtext () const
 
const uiStringtoolTip () 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 ()
 

Static Public Member Functions

static void addCmdRecorder (const CallBack &)
 Not for casual use. More...
 
static void removeCmdRecorder (const CallBack &)
 
static void updateToolTips ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

Notifier< uiActiontoggled
 
Notifier< uiActiontriggered
 

Protected Member Functions

void translateCB (CallBacker *)
 
virtual void trigger (bool checked)
 
void updateCheckable (CallBacker *=0)
 
void updateChecked (CallBacker *=0)
 
void updateEnabled (CallBacker *=0)
 
void updateToolTip (CallBacker *=0)
 
void updateVisible (CallBacker *=0)
 

Protected Attributes

bool checkable_
 
bool enabled_
 
uiString icontext_
 
bool ischecked_
 
uiString text_
 
uiString tooltip_
 
bool visible_
 

Private Member Functions

 uiAction ()
 
void init (const uiString &)
 

Private Attributes

bool checked_
 
int cmdrecrefnr_ = 0
 
BufferString iconfile_
 
uiMenumenu_ = nullptr
 
i_ActionMessengermsgr_ = nullptr
 
const uiActionContainerparentcontainer_ = nullptr
 
QAction * qaction_
 

Friends

class i_ActionMessenger
 

Detailed Description

Represents either a menu item, or a toolbar item that can be clicked by a user .

<>

Constructor & Destructor Documentation

◆ uiAction() [1/8]

uiAction::uiAction ( const uiString )

◆ uiAction() [2/8]

uiAction::uiAction ( const uiString ,
const CallBack  
)

◆ uiAction() [3/8]

uiAction::uiAction ( const uiString ,
const CallBack ,
const uiIcon  
)

◆ uiAction() [4/8]

uiAction::uiAction ( const uiString ,
const CallBack ,
const char *  icon_identifier 
)

◆ uiAction() [5/8]

uiAction::uiAction ( const uiString ,
const char *  icon_identifier 
)

◆ uiAction() [6/8]

uiAction::uiAction ( const MenuItem )

◆ uiAction() [7/8]

uiAction::uiAction ( QAction *  )

◆ ~uiAction()

uiAction::~uiAction ( )

◆ uiAction() [8/8]

uiAction::uiAction ( )
private

Member Function Documentation

◆ addCmdRecorder()

static void uiAction::addCmdRecorder ( const CallBack )
static

Not for casual use.

◆ beginCmdRecEvent() [1/2]

int uiAction::beginCmdRecEvent ( const BufferString msg)

◆ beginCmdRecEvent() [2/2]

int uiAction::beginCmdRecEvent ( const char *  msg = 0)

◆ endCmdRecEvent()

void uiAction::endCmdRecEvent ( int  refnr,
const char *  msg = 0 
)

◆ getContainer()

const uiActionContainer* uiAction::getContainer ( ) const

◆ getIconName()

const char* uiAction::getIconName ( ) const
inline

◆ getID()

int uiAction::getID ( ) const

Only works if parent is set.

◆ getMenu() [1/2]

uiMenu* uiAction::getMenu ( )
inline

◆ getMenu() [2/2]

const uiMenu* uiAction::getMenu ( ) const
inline

◆ iconText()

const uiString& uiAction::iconText ( ) const
Note
Use before next call.

◆ init()

void uiAction::init ( const uiString )
private

◆ isCheckable()

bool uiAction::isCheckable ( ) const

◆ isChecked()

bool uiAction::isChecked ( ) const

◆ isEnabled()

bool uiAction::isEnabled ( ) const

◆ isSeparator()

bool uiAction::isSeparator ( ) const

◆ isVisible()

bool uiAction::isVisible ( ) const

◆ qaction() [1/2]

QAction* uiAction::qaction ( )
inline

◆ qaction() [2/2]

const QAction* uiAction::qaction ( ) const
inline

◆ reloadIcon()

void uiAction::reloadIcon ( )

◆ removeCmdRecorder()

static void uiAction::removeCmdRecorder ( const CallBack )
static

◆ setCheckable()

void uiAction::setCheckable ( bool  )

◆ setChecked()

void uiAction::setChecked ( bool  )

◆ setEnabled()

void uiAction::setEnabled ( bool  )

◆ setIcon() [1/2]

void uiAction::setIcon ( const char *  identifier)

◆ setIcon() [2/2]

void uiAction::setIcon ( const uiIcon )

◆ setIconText()

void uiAction::setIconText ( const uiString )

◆ setMenu()

void uiAction::setMenu ( uiMenu )

Becomes mine.

◆ setParentContainer()

void uiAction::setParentContainer ( const uiActionContainer )

◆ setPixmap()

void uiAction::setPixmap ( const uiPixmap )

◆ setSeparator()

void uiAction::setSeparator ( bool  )

◆ setShortcut()

void uiAction::setShortcut ( const char *  )

◆ setText()

void uiAction::setText ( const uiString )

◆ setToolTip()

void uiAction::setToolTip ( const uiString )

◆ setVisible()

void uiAction::setVisible ( bool  )

◆ text()

const uiString& uiAction::text ( ) const
Note
Use before next call.

◆ toolTip()

const uiString& uiAction::toolTip ( ) const
Note
Use before next call.

◆ translateCB()

void uiAction::translateCB ( CallBacker )
protected

◆ trigger()

virtual void uiAction::trigger ( bool  checked)
protectedvirtual

◆ updateCheckable()

void uiAction::updateCheckable ( CallBacker = 0)
protected

◆ updateChecked()

void uiAction::updateChecked ( CallBacker = 0)
protected

◆ updateEnabled()

void uiAction::updateEnabled ( CallBacker = 0)
protected

◆ updateToolTip()

void uiAction::updateToolTip ( CallBacker = 0)
protected

◆ updateToolTips()

static void uiAction::updateToolTips ( )
static

◆ updateVisible()

void uiAction::updateVisible ( CallBacker = 0)
protected

Friends And Related Function Documentation

◆ i_ActionMessenger

friend class i_ActionMessenger
friend

Member Data Documentation

◆ checkable_

bool uiAction::checkable_
protected

◆ checked_

bool uiAction::checked_
private

◆ cmdrecrefnr_

int uiAction::cmdrecrefnr_ = 0
private

◆ enabled_

bool uiAction::enabled_
protected

◆ iconfile_

BufferString uiAction::iconfile_
private

◆ icontext_

uiString uiAction::icontext_
protected

◆ ischecked_

bool uiAction::ischecked_
protected

◆ menu_

uiMenu* uiAction::menu_ = nullptr
private

◆ msgr_

i_ActionMessenger* uiAction::msgr_ = nullptr
private

◆ parentcontainer_

const uiActionContainer* uiAction::parentcontainer_ = nullptr
private

◆ qaction_

QAction* uiAction::qaction_
private

◆ text_

uiString uiAction::text_
protected

◆ toggled

Notifier<uiAction> uiAction::toggled

◆ tooltip_

uiString uiAction::tooltip_
protected

◆ triggered

Notifier<uiAction> uiAction::triggered

◆ visible_

bool uiAction::visible_
protected

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