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

This behavior manages showing up of a context menu with sensible pipeline related actions for changing color/visibility etc. More...

#include <pqPipelineContextMenuBehavior.h>

Inherits QObject.

Public Member Functions

 pqPipelineContextMenuBehavior (QObject *parent=nullptr)
 
 ~pqPipelineContextMenuBehavior () override
 

Protected Slots

void onViewAdded (pqView *)
 Called when a new view is added. More...
 

Protected Member Functions

virtual void buildMenu (pqDataRepresentation *repr, unsigned int blockIndex, int rank)
 called to build the context menu for the given representation. More...
 
bool eventFilter (QObject *caller, QEvent *e) override
 event filter to capture the right-click. More...
 

Protected Attributes

QMenu * Menu
 
QPoint Position
 

Detailed Description

This behavior manages showing up of a context menu with sensible pipeline related actions for changing color/visibility etc.

when the user right-clicks on top of an object in the 3D view. Currently, it only supports views with proxies that vtkSMRenderViewProxy subclasses.

Definition at line 29 of file pqPipelineContextMenuBehavior.h.

Constructor & Destructor Documentation

◆ pqPipelineContextMenuBehavior()

pqPipelineContextMenuBehavior::pqPipelineContextMenuBehavior ( QObject *  parent = nullptr)

◆ ~pqPipelineContextMenuBehavior()

pqPipelineContextMenuBehavior::~pqPipelineContextMenuBehavior ( )
override

Member Function Documentation

◆ onViewAdded

void pqPipelineContextMenuBehavior::onViewAdded ( pqView )
protectedslot

Called when a new view is added.

We add actions to the widget for context menu if the view is a render-view.

◆ buildMenu()

virtual void pqPipelineContextMenuBehavior::buildMenu ( pqDataRepresentation repr,
unsigned int  blockIndex,
int  rank 
)
protectedvirtual

called to build the context menu for the given representation.

If the picked representation was a composite data set the block index of the selected block will be passed in blockIndex.

With introduction of vtkPartitionedDataSetCollection and vtkPartitionedDataSet, flatIndex is no longer consistent across ranks and hence rank is also returned. Unless dealing with these data types, rank can be ignored.

◆ eventFilter()

bool pqPipelineContextMenuBehavior::eventFilter ( QObject *  caller,
QEvent *  e 
)
overrideprotected

event filter to capture the right-click.

We don't directly use mechanisms from QWidget to popup the context menu since all of those mechanism seem to eat away the right button release, leaving the render window in a dragging state.

Member Data Documentation

◆ Menu

QMenu* pqPipelineContextMenuBehavior::Menu
protected

Definition at line 67 of file pqPipelineContextMenuBehavior.h.

◆ Position

QPoint pqPipelineContextMenuBehavior::Position
protected

Definition at line 68 of file pqPipelineContextMenuBehavior.h.


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