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

Public Member Functions

 YQMenuButton (YWidget *parent, const std::string &label)
 Constructor.
 
virtual ~YQMenuButton ()
 Destructor.
 
virtual void setLabel (const std::string &label)
 Change the label on the button. More...
 
virtual void rebuildMenuTree ()
 Rebuild the displayed menu tree from the internally stored YMenuItems. More...
 
virtual void setEnabled (bool enabled)
 Set enabled / disabled state. 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...
 
virtual bool setKeyboardFocus ()
 Accept the keyboard focus.
 

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.
 

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 YQMenuButton.h.

Member Function Documentation

◆ preferredHeight()

int YQMenuButton::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 208 of file YQMenuButton.cc.

◆ preferredWidth()

int YQMenuButton::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 202 of file YQMenuButton.cc.

◆ rebuildMenuTree()

void YQMenuButton::rebuildMenuTree ( )
virtual

Rebuild the displayed menu tree from the internally stored YMenuItems.

Implemented from YMenuButton.

Definition at line 70 of file YQMenuButton.cc.

Here is the call graph for this function:

◆ setEnabled()

void YQMenuButton::setEnabled ( bool  enabled)
virtual

Set enabled / disabled state.

Reimplemented from YWidget.

Definition at line 195 of file YQMenuButton.cc.

◆ setLabel()

void YQMenuButton::setLabel ( const std::string &  label)
virtual

Change the label on the button.

Reimplemented from YMenuButton / YSelectionWidget.

Definition at line 62 of file YQMenuButton.cc.

◆ setSize()

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

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 215 of file YQMenuButton.cc.


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