#include <src/app/ddViewMenu.h>
Manages a menu containing a collection of widgets that can be shown/hidden.
Definition at line 47 of file ddViewMenu.h.
ddViewMenu::ddViewMenu |
( |
QMenu & |
menu, |
|
|
QObject * |
p = 0 |
|
) |
| |
ddViewMenu::~ddViewMenu |
( |
| ) |
|
void ddViewMenu::addSeparator |
( |
| ) |
|
Add a separator to the view menu.
void ddViewMenu::addWidget |
( |
QWidget * |
widget, |
|
|
const QString & |
text, |
|
|
const QIcon & |
icon = QIcon() |
|
) |
| |
Adds a menu item for the widget to the view menu.
Pass in a null icon if there is no icon for the widget. The text can be the window title for the dock window. The text can also include a menu shortcut key.
- Parameters
-
widget | The widget to add. |
icon | An icon to display in the menu. |
text | The text to display in the menu. |
void ddViewMenu::addWidget |
( |
QWidget * |
widget, |
|
|
QAction * |
action |
|
) |
| |
virtual bool ddViewMenu::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
e |
|
) |
| |
|
virtual |
Used to watch for show and hide events.
The show and hide events for widgets are used to update the action associated with them in the view menu.
- Parameters
-
watched | The widget receiving the event. |
e | The event that is about to be sent. |
- Returns
- True if the event should be filtered out.
int ddViewMenu::getNumberOfWidgets |
( |
| ) |
const |
void ddViewMenu::removeWidget |
( |
QWidget * |
widget | ) |
|
Removes the widget from the view menu.
- Parameters
-
widget | The widget to remove. |
The documentation for this class was generated from the following file: