![]() |
VR-Forces 4.1 Class Documentation
|
A tree widget that will allow the addition of menu items that will appear on a context menu when the right mouse button is clicked on an item. More...

Classes | |
| class | ContextMenuItem |
Public Types | |
| typedef std::vector < ContextMenuItem > | DtContextMenuItems |
Public Member Functions | |
| DtContextTreeWidget (QWidget *parent=0) | |
| virtual | ~DtContextTreeWidget () |
| virtual void | addContextItem (QPushButton *b, QObject *receiver, const char *slot) |
| context menu, connecting it to the specified object and slot when the item is triggered. | |
| virtual void | addContextItem (QPushButton *b, const QString &title, QObject *receiver, const char *slot) |
| virtual void | addContextItem (const QString &item, QObject *receiver, const char *slot, const QIcon &icon=QIcon()) |
| Adds a context menu item given the text, icon and receive, slot. | |
| virtual void | addContextSeparator () |
| Adds a separator to the menu. | |
| const DtContextMenuItems & | menuItems () const |
| Returns the list of actions to be created. | |
| virtual void | setMenuItems (const DtContextMenuItems &) |
| virtual void | removeMenuItem (const QString &) |
| Removes the menu item with the given name. | |
| virtual void | removeSeparator (int at=1) |
| Removes the nth separator. | |
| bool | rightClick () const |
Public Attributes | |
| boost::signal< void(DtContextTreeWidget *, QMenu *)> | signal_contextMenuAboutToBeShown |
| Signal emitted before the menu is shown. | |
Protected Slots | |
| virtual void | onButtonDestroyed () |
Protected Member Functions | |
| virtual void | processContextMenu (const QPoint &) |
| Creates and displays context menu at the specified position. | |
| virtual void | mousePressEvent (QMouseEvent *mouseEvent) |
| virtual void | mouseReleaseEvent (QMouseEvent *mouseEvent) |
| virtual void | deleteIfOwned (const ContextMenuItem &) |
| Delete if menu button is owned by this context tree. | |
Protected Attributes | |
| bool | myRightClick |
| DtContextMenuItems | myMenuItems |
A tree widget that will allow the addition of menu items that will appear on a context menu when the right mouse button is clicked on an item.
| typedef std::vector<ContextMenuItem> makVrv::DtContextTreeWidget::DtContextMenuItems |
| makVrv::DtContextTreeWidget::DtContextTreeWidget | ( | QWidget * | parent = 0 | ) |
|
virtual |
|
virtual |
context menu, connecting it to the specified object and slot when the item is triggered.
Will also connect to a "destroyed" signal of the button to remove it if the button is ever destroyed. Will enable/disable the menu item based on the enabled/disabled status of the button
|
virtual |
|
virtual |
Adds a context menu item given the text, icon and receive, slot.
Will create a push button for it and call the addContextItemForButton method
|
virtual |
Adds a separator to the menu.
| const DtContextMenuItems& makVrv::DtContextTreeWidget::menuItems | ( | ) | const |
Returns the list of actions to be created.
Modify the list and reset it to change possible menu contents
|
virtual |
|
virtual |
Removes the menu item with the given name.
Case sensitive, and, if there is an & (for underline) will also need to have that in the search string
|
virtual |
Removes the nth separator.
|
inline |
|
protectedvirtualslot |
|
protectedvirtual |
Creates and displays context menu at the specified position.
Will send signal before executing menu
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Delete if menu button is owned by this context tree.
| boost::signal<void (DtContextTreeWidget*, QMenu*)> makVrv::DtContextTreeWidget::signal_contextMenuAboutToBeShown |
Signal emitted before the menu is shown.
Can be used for menu item validation
|
protected |
|
protected |