libyui-qt  2.43.5
YQMenuButton Class Reference

List of all members.

Public Member Functions

 YQMenuButton (YWidget *parent, const std::string &label)
virtual ~YQMenuButton ()
virtual void setLabel (const std::string &label)
virtual void rebuildMenuTree ()
virtual void setEnabled (bool enabled)
virtual int preferredWidth ()
virtual int preferredHeight ()
virtual void setSize (int newWidth, int newHeight)
virtual bool setKeyboardFocus ()

Protected Slots

void menuEntryActivated (QAction *menuItem)
void returnNow ()

Protected Member Functions

void rebuildMenuTree (QMenu *menu, YItemIterator begin, YItemIterator end)

Protected Attributes

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

Detailed Description

Definition at line 37 of file YQMenuButton.h.


Constructor & Destructor Documentation

YQMenuButton::YQMenuButton ( YWidget *  parent,
const std::string &  label 
)

Constructor.

Definition at line 40 of file YQMenuButton.cc.

Destructor.

Definition at line 55 of file YQMenuButton.cc.


Member Function Documentation

void YQMenuButton::menuEntryActivated ( QAction *  menuItem) [protected, slot]

Triggered when any menu item is activated.

Definition at line 151 of file YQMenuButton.cc.

Here is the call graph for this function:

int YQMenuButton::preferredHeight ( ) [virtual]

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 208 of file YQMenuButton.cc.

int YQMenuButton::preferredWidth ( ) [virtual]

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 202 of file YQMenuButton.cc.

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:

void YQMenuButton::rebuildMenuTree ( QMenu *  menu,
YItemIterator  begin,
YItemIterator  end 
) [protected]

Recursively insert menu items into 'menu' from iterator 'begin' to iterator 'end'.

Definition at line 101 of file YQMenuButton.cc.

Here is the call graph for this function:

void YQMenuButton::returnNow ( ) [protected, slot]

Triggered via menuEntryActivated() by zero timer to get back in sync with the Qt event loop.

Definition at line 183 of file YQMenuButton.cc.

Here is the call graph for this function:

void YQMenuButton::setEnabled ( bool  enabled) [virtual]

Set enabled / disabled state.

Reimplemented from YWidget.

Definition at line 195 of file YQMenuButton.cc.

bool YQMenuButton::setKeyboardFocus ( ) [virtual]

Accept the keyboard focus.

Definition at line 224 of file YQMenuButton.cc.

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.

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:
 All Classes Functions Variables