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=0)
 
 ~pqPipelineContextMenuBehavior () override
 

Protected Slots

void onViewAdded (pqView *)
 Called when a new view is added. More...
 
void hide ()
 called to hide the representation. More...
 
void hideBlock ()
 called to hide the block. More...
 
void showOnlyBlock ()
 called to show only the selected block. More...
 
void showAllBlocks ()
 called to show all blocks. More...
 
void unsetBlockVisibility ()
 called to unset the visibility flag for the block. More...
 
void setBlockColor ()
 called to set the color for the block. More...
 
void unsetBlockColor ()
 called to unset the color for the block. More...
 
void setBlockOpacity ()
 called to set the opacity for the block. More...
 
void unsetBlockOpacity ()
 called to unset the opacity for the block. More...
 
void reprTypeChanged (QAction *action)
 called to change the representation type. More...
 
void colorMenuTriggered (QAction *action)
 called to change the coloring mode. More...
 

Protected Member Functions

virtual void buildMenu (pqDataRepresentation *repr, unsigned int blockIndex)
 called to build the context menu for the given representation. More...
 
virtual void buildColorFieldsMenu (pqPipelineRepresentation *pipelineRepr, QMenu *menu)
 called to build the color arrays submenu. More...
 
bool eventFilter (QObject *caller, QEvent *e) override
 event filter to capture the right-click. More...
 
QString lookupBlockName (unsigned int flatIndex) const
 return the name of the block from its flat index More...
 

Protected Attributes

QMenu * Menu
 
QPoint Position
 
QPointer< pqDataRepresentationPickedRepresentation
 
QList< unsigned intPickedBlocks
 

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 56 of file pqPipelineContextMenuBehavior.h.

Constructor & Destructor Documentation

◆ pqPipelineContextMenuBehavior()

pqPipelineContextMenuBehavior::pqPipelineContextMenuBehavior ( QObject *  parent = 0)

◆ ~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.

◆ hide

void pqPipelineContextMenuBehavior::hide ( )
protectedslot

called to hide the representation.

◆ hideBlock

void pqPipelineContextMenuBehavior::hideBlock ( )
protectedslot

called to hide the block.

the action which emits the signal will contain the block index in its data().

◆ showOnlyBlock

void pqPipelineContextMenuBehavior::showOnlyBlock ( )
protectedslot

called to show only the selected block.

the action which emits the signal will contain the block index in its data().

◆ showAllBlocks

void pqPipelineContextMenuBehavior::showAllBlocks ( )
protectedslot

called to show all blocks.

◆ unsetBlockVisibility

void pqPipelineContextMenuBehavior::unsetBlockVisibility ( )
protectedslot

called to unset the visibility flag for the block.

after this call the block will inherit the visibility from its parent. the action which emits the signal will contain the block index in its data()

◆ setBlockColor

void pqPipelineContextMenuBehavior::setBlockColor ( )
protectedslot

called to set the color for the block.

the action which emits the signal will contain the block index in its data()

◆ unsetBlockColor

void pqPipelineContextMenuBehavior::unsetBlockColor ( )
protectedslot

called to unset the color for the block.

the action which emits the signal will contain the block index in its data()

◆ setBlockOpacity

void pqPipelineContextMenuBehavior::setBlockOpacity ( )
protectedslot

called to set the opacity for the block.

the action which emits the signal will contain the block index in its data()

◆ unsetBlockOpacity

void pqPipelineContextMenuBehavior::unsetBlockOpacity ( )
protectedslot

called to unset the opacity for the block.

the action which emits the signal will contain the block index in its data()

◆ reprTypeChanged

void pqPipelineContextMenuBehavior::reprTypeChanged ( QAction *  action)
protectedslot

called to change the representation type.

◆ colorMenuTriggered

void pqPipelineContextMenuBehavior::colorMenuTriggered ( QAction *  action)
protectedslot

called to change the coloring mode.

◆ buildMenu()

virtual void pqPipelineContextMenuBehavior::buildMenu ( pqDataRepresentation repr,
unsigned int  blockIndex 
)
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.

◆ buildColorFieldsMenu()

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

called to build the color arrays submenu.

◆ 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.

◆ lookupBlockName()

QString pqPipelineContextMenuBehavior::lookupBlockName ( unsigned int  flatIndex) const
protected

return the name of the block from its flat index

Member Data Documentation

◆ Menu

QMenu* pqPipelineContextMenuBehavior::Menu
protected

Definition at line 161 of file pqPipelineContextMenuBehavior.h.

◆ Position

QPoint pqPipelineContextMenuBehavior::Position
protected

Definition at line 162 of file pqPipelineContextMenuBehavior.h.

◆ PickedRepresentation

QPointer<pqDataRepresentation> pqPipelineContextMenuBehavior::PickedRepresentation
protected

Definition at line 163 of file pqPipelineContextMenuBehavior.h.

◆ PickedBlocks

QList<unsigned int> pqPipelineContextMenuBehavior::PickedBlocks
protected

Definition at line 164 of file pqPipelineContextMenuBehavior.h.


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