QtxActionMenuMgr.MenuAction Class Reference

Inheritance diagram for QtxActionMenuMgr.MenuAction:

Inheritance graph

Public Member Functions

 MenuAction (const QString &, const QString &, QObject *, const int=-1, const bool=false)
virtual ~MenuAction ()
virtual bool addTo (QWidget *)
virtual bool removeFrom (QWidget *)
QPopupMenupopup () const
virtual bool addTo (QWidget *, int)

Protected Member Functions

void setPopup (QWidget *, const int, QPopupMenu *) const

Private Attributes

int myId
QPopupMenumyPopup
bool myEmptyEnabled
QMap< QWidget *, int > myIds

Detailed Description

Class: QtxActionMenuMgr.MenuAction Level: Internal


Constructor & Destructor Documentation

QtxActionMenuMgr.MenuAction::MenuAction const QString &  text,
const QString &  menuText,
QObject parent,
const   int = -1,
const   bool = false
 

Constructor for menu action

Parameters:
text - description text
menutext - menu text
parent - parent object
id - integer identificator of action
allowEmpty - if it is true, it makes possible to add this action with empty popup to menu

QtxActionMenuMgr.MenuAction::~MenuAction  )  [virtual]
 

Destructor: deletes internal popup


Member Function Documentation

bool QtxActionMenuMgr.MenuAction::addTo QWidget w  )  [virtual]
 

Adds action to widget, for example, to popup menu or menu bar

Reimplemented from QtxAction.

bool QtxActionMenuMgr.MenuAction::removeFrom QWidget w  )  [virtual]
 

Removes action from widget, for example, from popup menu or menu bar

Reimplemented from QtxAction.

QPopupMenu * QtxActionMenuMgr.MenuAction::popup  )  const
 

Returns:
internal popup of action

bool QtxAction::addTo QWidget w,
int  index
[virtual, inherited]
 

Name: addTo [virtual public] Desc: Adds this action to widget. If widget is QPopupMenu given index will be used for menu item inserting. Returns true if the action was added successfully and false otherwise.

Reimplemented in QtxDockAction, QtxListAction, QtxMRUAction, QtxWorkspaceAction, and QtxWorkstackAction.

void QtxAction::setPopup QWidget w,
const   int,
QPopupMenu subPopup
const [protected, inherited]
 

Name: setPopup [virtual public] Desc: Set or unset the sub popup menu for item with specified id in the given popup.


Field Documentation

int QtxActionMenuMgr.MenuAction.myId [private]
 

QPopupMenu* QtxActionMenuMgr.MenuAction.myPopup [private]
 

bool QtxActionMenuMgr.MenuAction.myEmptyEnabled [private]
 

QMap<QWidget*,int> QtxActionMenuMgr.MenuAction.myIds [private]