ParaView
Public Slots | Public Member Functions
pqViewContextMenuManager Class Reference

The pqViewContextMenuManager class manages the setup and cleanup of view context menus. More...

#include <pqViewContextMenuManager.h>

List of all members.

Public Slots

void setupContextMenu (pqView *view)
 Sets up the context menu for the given view.
void cleanupContextMenu (pqView *view)
 Cleans up the context menu for the given view.

Public Member Functions

 pqViewContextMenuManager (QObject *parent=0)
 Creates a view context menu manager.
virtual ~pqViewContextMenuManager ()
bool registerHandler (const QString &viewType, pqViewContextMenuHandler *handler)
 Registers a context menu handler with a view type.
void unregisterHandler (pqViewContextMenuHandler *handler)
 Removes the context menu from the name mapping.
bool isRegistered (pqViewContextMenuHandler *handler) const
 Gets whether or not the context menu handler is registered.
pqViewContextMenuHandlergetHandler (const QString &viewType) const
 Gets the context menu handler for the specified view type.

Detailed Description

The pqViewContextMenuManager class manages the setup and cleanup of view context menus.

Definition at line 53 of file pqViewContextMenuManager.h.


Constructor & Destructor Documentation

pqViewContextMenuManager::pqViewContextMenuManager ( QObject *  parent = 0)

Creates a view context menu manager.

Parameters:
parentThe parent object.
virtual pqViewContextMenuManager::~pqViewContextMenuManager ( ) [virtual]

Member Function Documentation

bool pqViewContextMenuManager::registerHandler ( const QString &  viewType,
pqViewContextMenuHandler handler 
)

Registers a context menu handler with a view type.

Parameters:
viewTypeThe name of the view type.
handlerThe context menu handler.
Returns:
True if the registration was successful.
void pqViewContextMenuManager::unregisterHandler ( pqViewContextMenuHandler handler)

Removes the context menu from the name mapping.

Parameters:
handlerThe context menu handler.
bool pqViewContextMenuManager::isRegistered ( pqViewContextMenuHandler handler) const

Gets whether or not the context menu handler is registered.

Returns:
True if the context menu handler is associated with a view type.
pqViewContextMenuHandler* pqViewContextMenuManager::getHandler ( const QString &  viewType) const

Gets the context menu handler for the specified view type.

Parameters:
viewTypeThe name of the view type.
Returns:
A pointer to the context menu handler.
void pqViewContextMenuManager::setupContextMenu ( pqView view) [slot]

Sets up the context menu for the given view.

The context menu is only set up for the view if there is a registered handler for the view type.

Parameters:
viewThe view to initialize.
void pqViewContextMenuManager::cleanupContextMenu ( pqView view) [slot]

Cleans up the context menu for the given view.

Parameters:
viewThe view to clean up.

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