libyui-qt  2.49.2
YQContextMenu Class Reference
Inheritance diagram for YQContextMenu:
Collaboration diagram for YQContextMenu:

Public Member Functions

 YQContextMenu ()
 Constructor.
 
 YQContextMenu (QWidget *parent, const QPoint position)
 
virtual ~YQContextMenu ()
 Destructor.
 
virtual void rebuildMenuTree ()
 Change the label on the button. More...
 
virtual int preferredWidth ()
 Preferred width of the widget. More...
 
virtual int preferredHeight ()
 Preferred height of the widget. More...
 
virtual void setSize (int newWidth, int newHeight)
 Set the new size of the widget. More...
 

Protected Slots

void menuEntryActivated (QAction *menuItem)
 Triggered when any menu item is activated.
 
void returnNow ()
 Triggered via menuEntryActivated() by zero timer to get back in sync with the Qt event loop.
 
void slotMenuHidden ()
 Triggered when the context menu is hidden.
 
void slotReturnMenuHidden ()
 Triggered via slotMenuHidden() by zero timer to get back in sync with the Qt event loop.
 

Protected Member Functions

void rebuildMenuTree (QMenu *menu, YItemIterator begin, YItemIterator end)
 Recursively insert menu items into 'menu' from iterator 'begin' to iterator 'end'.
 

Protected Attributes

YMenuItem * _selectedItem
 
QPushButton * _qt_button
 
QHash< QAction *, int > _serials
 

Detailed Description

Definition at line 37 of file YQContextMenu.h.

Member Function Documentation

◆ preferredHeight()

int YQContextMenu::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 202 of file YQContextMenu.cc.

◆ preferredWidth()

int YQContextMenu::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 196 of file YQContextMenu.cc.

◆ rebuildMenuTree()

void YQContextMenu::rebuildMenuTree ( )
virtual

Change the label on the button.

Reimplemented from YContextMenu / YSelectionWidget. Rebuild the displayed menu tree from the internally stored YMenuItems.

Implemented from YContextMenu.

Definition at line 64 of file YQContextMenu.cc.

Here is the call graph for this function:

◆ setSize()

void YQContextMenu::setSize ( int  newWidth,
int  newHeight 
)
virtual

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 209 of file YQContextMenu.cc.


The documentation for this class was generated from the following files: