Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
pqDefaultContextMenu Class Reference

This interface creates ParaView's default context menu in render views. More...

#include <pqDefaultContextMenu.h>

Inheritance diagram for pqDefaultContextMenu:
Inheritance graph
[legend]
Collaboration diagram for pqDefaultContextMenu:
Collaboration graph
[legend]

Public Member Functions

 pqDefaultContextMenu (QObject *parent=nullptr)
 
 ~pqDefaultContextMenu () override
 
int priority () const override
 The priority is used to order calls to pqContextMenuInterface::contextMenu among all registered instances of pqContextMenuInterface. More...
 
bool contextMenu (QMenu *menu, pqView *viewContext, const QPoint &viewPoint, pqRepresentation *dataContext, const QList< unsigned int > &dataBlockContext) const override
 This method is called when a context menu is requested, usually by a right click in a pqView instance. More...
 
- Public Member Functions inherited from pqContextMenuInterface
 pqContextMenuInterface ()
 
virtual ~pqContextMenuInterface ()
 
virtual bool contextMenu (QMenu *menu, pqView *viewContext, const QPoint &viewPoint, pqRepresentation *dataContext, const QStringList &dataBlockContext) const
 This is a newer variant of the contextMenu where the dataBlockContext is provided as selectors instead of composite ids. More...
 

Protected Slots

void hide ()
 called to hide the representation. More...
 
void reprTypeChanged (QAction *action)
 called to change the representation type. More...
 
void colorMenuTriggered (QAction *action)
 called to change the coloring mode. More...
 
void showAllBlocks () const
 called to show all blocks. More...
 

Protected Member Functions

virtual void buildColorFieldsMenu (pqPipelineRepresentation *pipelineRepr, QMenu *menu) const
 called to build the color arrays submenu. More...
 

Protected Attributes

QPoint Position
 
QPointer< pqDataRepresentationPickedRepresentation
 

Detailed Description

This interface creates ParaView's default context menu in render views.

It has priority 0, so you can modify the QMenu it creates by using a lower (negative) priority in your own custom interface. You can eliminate the default menu by assigning your custom interface a positive priority and have its contextMenu() method return true.

See also
pqPipelineContextMenuBehavior

Definition at line 30 of file pqDefaultContextMenu.h.

Constructor & Destructor Documentation

◆ pqDefaultContextMenu()

pqDefaultContextMenu::pqDefaultContextMenu ( QObject *  parent = nullptr)

◆ ~pqDefaultContextMenu()

pqDefaultContextMenu::~pqDefaultContextMenu ( )
override

Member Function Documentation

◆ contextMenu()

bool pqDefaultContextMenu::contextMenu ( QMenu *  menu,
pqView viewContext,
const QPoint &  viewPoint,
pqRepresentation dataContext,
const QList< unsigned int > &  dataBlockContext 
) const
overridevirtual

This method is called when a context menu is requested, usually by a right click in a pqView instance.

This method should return true if (a) the context is one handled by this instance (and presumably it will modify the provided QMenu); and (b) this instance should be the last interface to contribute to the menu. Returning false indicates the context is not one this instance handles or that interfaces with a lower priority may modify the menu.

Each registered interface is called in order of descending priority until one returns true, so your implementation should return false as quickly as possible.

If dataContext is a pqDataRepresentation and holds multiblock data, the dataBlockContext is a list of block IDs to which the menu actions should apply.

Reimplemented from pqContextMenuInterface.

◆ priority()

int pqDefaultContextMenu::priority ( ) const
inlineoverridevirtual

The priority is used to order calls to pqContextMenuInterface::contextMenu among all registered instances of pqContextMenuInterface.

Reimplemented from pqContextMenuInterface.

Definition at line 57 of file pqDefaultContextMenu.h.

◆ hide

void pqDefaultContextMenu::hide ( )
protectedslot

called to hide the representation.

◆ reprTypeChanged

void pqDefaultContextMenu::reprTypeChanged ( QAction *  action)
protectedslot

called to change the representation type.

◆ colorMenuTriggered

void pqDefaultContextMenu::colorMenuTriggered ( QAction *  action)
protectedslot

called to change the coloring mode.

◆ showAllBlocks

void pqDefaultContextMenu::showAllBlocks ( ) const
protectedslot

called to show all blocks.

◆ buildColorFieldsMenu()

virtual void pqDefaultContextMenu::buildColorFieldsMenu ( pqPipelineRepresentation pipelineRepr,
QMenu *  menu 
) const
protectedvirtual

called to build the color arrays submenu.

Member Data Documentation

◆ Position

QPoint pqDefaultContextMenu::Position
mutableprotected

Definition at line 87 of file pqDefaultContextMenu.h.

◆ PickedRepresentation

QPointer<pqDataRepresentation> pqDefaultContextMenu::PickedRepresentation
mutableprotected

Definition at line 88 of file pqDefaultContextMenu.h.


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