libyui
|
#include <YMenuItem.h>
Item class for menu items.
This is used for plain menu items as well as for menus as well as for menu separators:
A menu is a menu item with child items. A plain menu item does not have child items. A menu separator has an empty label.
Constructor for toplevel items.
|
inlinevirtual |
Destructor.
This will delete all children.
Create a new menu item as a child of the current instance and return it. The newly created object is owned by this instance. This is meant for plain menu items, not for submenus.
Create a new submenu as a child of the current instance and return it. The newly created object is owned by this instance. This is meant to be used for menu items that have children.
YMenuItem * YMenuItem::addSeparator | ( | ) |
Create a menu separator as a child of the current instance and return it. The newly created object is owned by this instance.
|
inline |
Return 'true' if this item is enabled (which is the default).
|
inline |
Return 'true' if this is a menu (or submenu), i.e. if it has any child items.
|
inline |
Return 'true' if this is a menu separator, i.e. if it has an empty label.
|
inline |
Return 'true' if this item is visible (which is the default).
|
inlinevirtual |
Returns this item's parent item or 0 if it is a toplevel item.
Reimplemented from YTreeItem.
Enable or disable this item.
Applications should use YMenuWidget::setItemEnabled() instead because that will also notify the widget so it can update the item's visual representation.
Set the UI counterpart of this item. This can be used to store a pointer to the equivalent of this item in the concrete UI: For example, the Qt UI will store a pointer to the corresponding QMenu or QAction.
Show or hide this item.
Applications should use YMenuWidget::setItemVisible() instead because that will also notify the widget so it can update the item's visual representation.
|
inline |
Return the UI counterpart of this item (if the UI set any).