ParaView
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pqRenderView Class Reference

#include <pqRenderView.h>

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

Public Slots

void setOrientationAxesVisibility (bool visible)
 
void setOrientationAxesInteractivity (bool interactive)
 
void setOrientationAxesLabelColor (const QColor &)
 
void setOrientationAxesOutlineColor (const QColor &)
 
void setCenterOfRotation (double x, double y, double z)
 
void setCenterOfRotation (double xyz[3])
 
void setCenterAxesVisibility (bool visible)
 
void setResetCenterWithCamera (bool b)
 Get/Set whether resetCamera() resets the center of rotation as well. More...
 
void setUseMultipleRepresentationSelection (bool b)
 Set whether selection will be done on multiple representations. More...
 
void linkToOtherView ()
 start the link to other view process More...
 
virtual void undo ()
 Called to undo interaction. More...
 
virtual void redo ()
 Called to redo interaction. More...
 
void resetCenterOfRotationIfNeeded ()
 Resets center of rotation if this->ResetCenterWithCamera is true. More...
 
void updateInteractionMode (pqOutputPort *opPort)
 Try to provide the best view orientation and interaction mode. More...
 
- Public Slots inherited from pqView
virtual void render ()
 Request a StillRender on idle. More...
 
virtual void forceRender ()
 Forces an immediate render. More...
 
void cancelPendingRenders ()
 Cancels any pending renders. More...
 
virtual void undo ()
 Called to undo interaction. More...
 
virtual void redo ()
 Called to redo interaction. More...
 

Signals

void updateInteractionMode (int mode)
 
- Signals inherited from pqView
void updateDataEvent ()
 Fired when the vtkSMViewProxy fires the vtkCommand::UpdateDataEvent The view proxy fires this event at the end of vtkSMViewProxy::Update() when the update executes, not just when the method is called. More...
 
void representationAdded (pqRepresentation *)
 Fired after a representation has been added to this view. More...
 
void representationRemoved (pqRepresentation *)
 Fired after a representation has been removed from this view. More...
 
void beginRender ()
 Fired when the render module fires a vtkCommand::StartEvent signalling the beginning of rendering. More...
 
void endRender ()
 Fired when the render module fires a vtkCommand::EndEvent signalling the end of rendering. More...
 
void representationVisibilityChanged (pqRepresentation *repr, bool visible)
 Fired when any representation visibility changes. More...
 
void canUndoChanged (bool)
 Fired when interaction undo stack status changes. More...
 
void canRedoChanged (bool)
 Fired when interaction undo stack status changes. More...
 
void selected (pqOutputPort *opport)
 Fired when a selection is made in this view. More...
 
void selectionModeChanged (bool frustum)
 Fired when the selection changes. More...
 
void picked (pqOutputPort *opport)
 Fired when a port is picked. More...
 
void beginProgress ()
 Fired before doing any actions that may result in progress events that must be reported by the client. More...
 
void endProgress ()
 Fired after performing any actions that may result in progress events. More...
 
void progress (const QString &message, int percent_progress)
 Fired to notify the current execution progress. More...
 
void multipleSelected (QList< pqOutputPort *> opports)
 Fired when UseMultipleRepresentationSelection is set to on and selection on multiple representations is made in this view. More...
 
- Signals inherited from pqProxy
void nameChanged (pqServerManagerModelItem *)
 Fired when the name of the proxy is changed. More...
 
void modifiedStateChanged (pqServerManagerModelItem *)
 Fired when the modified status changes for the proxy. More...
 

Public Member Functions

 pqRenderView (const QString &group, const QString &name, vtkSMViewProxy *renModule, pqServer *server, QObject *parent=NULL)
 
 pqRenderView (const QString &tname, const QString &group, const QString &name, vtkSMViewProxy *renModule, pqServer *server, QObject *parent=NULL)
 
virtual ~pqRenderView ()
 
virtual vtkSMRenderViewProxygetRenderViewProxy () const
 Returns the render view proxy associated with this object. More...
 
virtual void resetCamera ()
 Resets the camera to include all visible data. More...
 
void resetCenterOfRotation ()
 Resets the center of rotation to the focal point. More...
 
bool getOrientationAxesVisibility () const
 Get if the orientation axes is visible. More...
 
bool getOrientationAxesInteractivity () const
 Get if the orientation axes is interactive. More...
 
QColor getOrientationAxesLabelColor () const
 Get orientation axes label color. More...
 
QColor getOrientationAxesOutlineColor () const
 Get orientation axes outline color. More...
 
bool getResetCenterWithCamera () const
 Get whether resetCamera() resets the center of rotation as well. More...
 
bool getUseMultipleRepresentationSelection () const
 Get whether selection will be done on multiple representations. More...
 
bool getCenterAxesVisibility () const
 Get center axes visibility. More...
 
void getCenterOfRotation (double center[3]) const
 Get the current center of rotation. More...
 
virtual bool supportsUndo () const
 Returns if this view module can support undo/redo. More...
 
virtual bool canUndo () const
 Returns if the view module can undo/redo interaction given the current state of the interaction undo stack. More...
 
virtual bool canRedo () const
 Returns true if redo can be done. More...
 
void linkUndoStack (pqRenderView *other)
 For linking of interaction undo stacks. More...
 
void unlinkUndoStack (pqRenderView *other)
 
void clearUndoStack ()
 Clears interaction undo stack of this view (and all linked views, if any). More...
 
void resetViewDirection (double look_x, double look_y, double look_z, double up_x, double up_y, double up_z)
 Reset camera view direction. More...
 
virtual void setCursor (const QCursor &)
 Let internal class handle which internal widget should change its cursor This is usually used for selection and in case of QuadView/SliceView which contains an aggregation of QWidget, we don't necessary want all of them to share the same cursor. More...
 
void selectOnSurface (int rectangle[4], int selectionModifier=pqView::PV_SELECTION_DEFAULT)
 Creates a new surface selection given the rectangle in display coordinates. More...
 
void selectPointsOnSurface (int rectangle[4], int selectionModifier=pqView::PV_SELECTION_DEFAULT)
 
pqDataRepresentationpick (int pos[2])
 Picks the representation at the given position. More...
 
pqDataRepresentationpickBlock (int pos[2], unsigned int &flatIndex)
 Picks the representation at the given position. More...
 
void selectFrustum (int rectangle[4])
 Creates a new frustum selection given the rectangle in display coordinates. More...
 
void selectFrustumPoints (int rectangle[4])
 
void selectBlock (int rectangle[4], int selectionModifier=pqView::PV_SELECTION_DEFAULT)
 Creates a "block" selection given the rectangle in display coordinates. More...
 
void selectPolygonPoints (vtkIntArray *polygon, int selectionModifier=pqView::PV_SELECTION_DEFAULT)
 Creates a new surface points selection given the polygon in display coordinates. More...
 
void selectPolygonCells (vtkIntArray *polygon, int selectionModifier=pqView::PV_SELECTION_DEFAULT)
 Creates a new surface cells selection given the polygon in display coordinates. More...
 
- Public Member Functions inherited from pqRenderViewBase
virtual ~pqRenderViewBase ()
 
virtual void resetDisplay ()
 Called to reset the view's display. More...
 
- Public Member Functions inherited from pqView
virtual ~pqView ()
 
vtkSMViewProxygetViewProxy () const
 Returns the internal render Module proxy associated with this object. More...
 
virtual vtkView * getClientSideView () const
 Return the client-side vtkView encapsulated by this view (if any), or return NULL. More...
 
QWidget * widget ()
 Return a widget associated with this view. More...
 
QString getViewType () const
 Returns the type of this view module. More...
 
virtual QSize getSize ()
 Returns the current size of the rendering context. More...
 
virtual vtkImageData * captureImage (int magnification)
 Capture the view image into a new vtkImageData with the given magnification and returns it. More...
 
virtual vtkImageData * captureImage (const QSize &size)
 Capture an image with the given size. More...
 
bool writeImage (const QString &filename, const QSize &, int quality=-1)
 Capture an image and saves it out to a file. More...
 
bool hasRepresentation (pqRepresentation *repr) const
 This method checks if the representation is shown in this view. More...
 
int getNumberOfRepresentations () const
 Returns the number representations in the view. More...
 
int getNumberOfVisibleRepresentations () const
 
int getNumberOfVisibleDataRepresentations () const
 
pqRepresentationgetRepresentation (int index) const
 Returns the representation for the specified index where (index < getNumberOfRepresentations()). More...
 
QList< pqRepresentation * > getRepresentations () const
 Returns a list of representations in this view. More...
 
bool canDisplay (pqOutputPort *opPort) const
 This method returns is any pqPipelineSource can be dislayed in this view. More...
 
virtual void emitSelectionSignals (bool frustum)
 Called when a selection is made, passing in the mode as the sole argument. More...
 
- Public Member Functions inherited from pqProxy
 pqProxy (const QString &group, const QString &name, vtkSMProxy *proxy, pqServer *server, QObject *parent=NULL)
 
virtual ~pqProxy ()
 
pqServergetServer () const
 Get the server on which this proxy exists. More...
 
void rename (const QString &newname)
 This is a convenience method. More...
 
const QString & getSMName ()
 Get the name with which this proxy is registered on the server manager. More...
 
const QString & getSMGroup ()
 
vtkSMProxygetProxy () const
 Get the vtkSMProxy this object stands for. More...
 
ModifiedState modifiedState () const
 Gets whether or not the source has been modified. More...
 
void setModifiedState (ModifiedState modified)
 Sets whether or not the source has been modified. More...
 
vtkPVXMLElementgetHints () const
 Returns the hints for this proxy, if any. More...
 
QList< vtkSMProxy * > getHelperProxies () const
 Returns a list of all helper proxies. More...
 
QList< vtkSMProxy * > getHelperProxies (const QString &key) const
 Returns a list of all the helper proxies added with a given key. More...
 
QList< QString > getHelperKeys () const
 Returns the keys for helper proxies. More...
 
virtual void addHelperProxy (const QString &key, vtkSMProxy *)
 Concept of helper proxies: A pqProxy is created for every important vtkSMProxy registered. More...
 
void removeHelperProxy (const QString &key, vtkSMProxy *)
 
void updateHelperProxies () const
 Updates the internal datastructures using the proxies currently registered under the group that would be used for helper proxies. More...
 
vtkSMSessionProxyManagerproxyManager () const
 Returns the proxy manager by calling this->getProxy()->GetProxyManager();. More...
 
- Public Member Functions inherited from pqServerManagerModelItem
 pqServerManagerModelItem (QObject *parent=NULL)
 
virtual ~pqServerManagerModelItem ()
 

Static Public Member Functions

static QString renderViewType ()
 
- Static Public Member Functions inherited from pqRenderViewBase
static void setStereo (int mode)
 Convenience method to enable stereo rendering on all views that support stereo rendering. More...
 
- Static Public Member Functions inherited from pqView
static int computeMagnification (const QSize &fullsize, QSize &viewsize)
 Computes the magnification and view size given the current view size for the full size for the view. More...
 
- Static Public Member Functions inherited from pqProxy
static std::string rstToHtml (const char *rstStr)
 convert proxy documentation from RST to HTML (so that it can be used in Qt) More...
 
static pqProxyfindProxyWithHelper (vtkSMProxy *aproxy, QString &key)
 Returns a pqProxy instance, of any, whose helper proxy is the aproxy. More...
 

Protected Member Functions

void fakeUndoRedo (bool redo, bool self)
 Updates undo stack without actually performing the undo/redo actions. More...
 
void fakeInteraction (bool start)
 Updates undo stack of all linked views to record a programatic change in camera as a interaction. More...
 
virtual QWidget * createWidget ()
 Creates a new instance of the QWidget subclass to be used to show this view. More...
 
virtual void initialize ()
 Overridden to initialize the interaction undo/redo stack. More...
 
- Protected Member Functions inherited from pqRenderViewBase
 pqRenderViewBase (const QString &type, const QString &group, const QString &name, vtkSMViewProxy *renModule, pqServer *server, QObject *parent=NULL)
 
virtual bool eventFilter (QObject *caller, QEvent *e)
 Overridden to popup the context menu, if some actions have been added using addMenuAction. More...
 
- Protected Member Functions inherited from pqView
 pqView (const QString &type, const QString &group, const QString &name, vtkSMViewProxy *view, pqServer *server, QObject *parent=NULL)
 Constructor: type :- view type. More...
 
- Protected Member Functions inherited from pqProxy
void setSMName (const QString &new_name)
 Make this pqProxy take on a new identity. More...
 
virtual void addInternalHelperProxy (const QString &key, vtkSMProxy *) const
 
virtual void removeInternalHelperProxy (const QString &key, vtkSMProxy *) const
 
- Protected Member Functions inherited from pqServerManagerModelItem
vtkEventQtSlotConnect * getConnector ()
 All subclasses generally need some vtkEventQtSlotConnect instance to connect to VTK events. More...
 

Protected Attributes

bool ResetCenterWithCamera
 
bool UseMultipleRepresentationSelection
 
- Protected Attributes inherited from pqRenderViewBase
bool AllowCaching
 On Mac, we usually try to cache the front buffer to avoid unecessary. More...
 

Additional Inherited Members

- Public Types inherited from pqView
enum  SelectionModifier { PV_SELECTION_DEFAULT = 0, PV_SELECTION_ADDITION, PV_SELECTION_SUBTRACTION, PV_SELECTION_TOGGLE }
 
- Public Types inherited from pqProxy
enum  ModifiedState { UNINITIALIZED, MODIFIED, UNMODIFIED }
 The modification state of this proxy. More...
 
- Protected Slots inherited from pqRenderViewBase
virtual void initializeAfterObjectsCreated ()
 
void beginDelayInteractiveRender ()
 Triggered by DelayNonInteractiveRenderEvent. More...
 
void endDelayInteractiveRender ()
 
void updateStatusMessage ()
 Triggered by internal timer to update the status bar message. More...
 
- Protected Slots inherited from pqProxy
void onProxyRegistered (const QString &, const QString &, vtkSMProxy *)
 
void onProxyUnRegistered (const QString &, const QString &, vtkSMProxy *)
 

Detailed Description

Definition at line 46 of file pqRenderView.h.

Constructor & Destructor Documentation

◆ pqRenderView() [1/2]

pqRenderView::pqRenderView ( const QString &  group,
const QString &  name,
vtkSMViewProxy renModule,
pqServer server,
QObject *  parent = NULL 
)

◆ pqRenderView() [2/2]

pqRenderView::pqRenderView ( const QString &  tname,
const QString &  group,
const QString &  name,
vtkSMViewProxy renModule,
pqServer server,
QObject *  parent = NULL 
)

◆ ~pqRenderView()

virtual pqRenderView::~pqRenderView ( )
virtual

Member Function Documentation

◆ renderViewType()

static QString pqRenderView::renderViewType ( )
inlinestatic

Definition at line 52 of file pqRenderView.h.

◆ getRenderViewProxy()

virtual vtkSMRenderViewProxy* pqRenderView::getRenderViewProxy ( ) const
virtual

Returns the render view proxy associated with this object.

Reimplemented in pqComparativeRenderView.

◆ resetCamera()

virtual void pqRenderView::resetCamera ( )
virtual

Resets the camera to include all visible data.

It is essential to call this resetCamera, to ensure that the reset camera action gets pushed on the interaction undo stack.

Implements pqRenderViewBase.

◆ resetCenterOfRotation()

void pqRenderView::resetCenterOfRotation ( )

Resets the center of rotation to the focal point.

◆ getOrientationAxesVisibility()

bool pqRenderView::getOrientationAxesVisibility ( ) const

Get if the orientation axes is visible.

◆ getOrientationAxesInteractivity()

bool pqRenderView::getOrientationAxesInteractivity ( ) const

Get if the orientation axes is interactive.

◆ getOrientationAxesLabelColor()

QColor pqRenderView::getOrientationAxesLabelColor ( ) const

Get orientation axes label color.

◆ getOrientationAxesOutlineColor()

QColor pqRenderView::getOrientationAxesOutlineColor ( ) const

Get orientation axes outline color.

◆ getResetCenterWithCamera()

bool pqRenderView::getResetCenterWithCamera ( ) const
inline

Get whether resetCamera() resets the center of rotation as well.

Definition at line 111 of file pqRenderView.h.

◆ getUseMultipleRepresentationSelection()

bool pqRenderView::getUseMultipleRepresentationSelection ( ) const
inline

Get whether selection will be done on multiple representations.

Definition at line 116 of file pqRenderView.h.

◆ getCenterAxesVisibility()

bool pqRenderView::getCenterAxesVisibility ( ) const

Get center axes visibility.

◆ getCenterOfRotation()

void pqRenderView::getCenterOfRotation ( double  center[3]) const

Get the current center of rotation.

◆ supportsUndo()

virtual bool pqRenderView::supportsUndo ( ) const
inlinevirtual

Returns if this view module can support undo/redo.

Returns false by default. Subclassess must override if that's not the case.

Reimplemented from pqView.

Definition at line 136 of file pqRenderView.h.

◆ canUndo()

virtual bool pqRenderView::canUndo ( ) const
virtual

Returns if the view module can undo/redo interaction given the current state of the interaction undo stack.

Reimplemented from pqView.

◆ canRedo()

virtual bool pqRenderView::canRedo ( ) const
virtual

Returns true if redo can be done.

Reimplemented from pqView.

◆ linkUndoStack()

void pqRenderView::linkUndoStack ( pqRenderView other)

For linking of interaction undo stacks.

This method is used by pqLinksModel to link interaction undo stack for linked render views.

◆ unlinkUndoStack()

void pqRenderView::unlinkUndoStack ( pqRenderView other)

◆ clearUndoStack()

void pqRenderView::clearUndoStack ( )

Clears interaction undo stack of this view (and all linked views, if any).

◆ resetViewDirection()

void pqRenderView::resetViewDirection ( double  look_x,
double  look_y,
double  look_z,
double  up_x,
double  up_y,
double  up_z 
)

Reset camera view direction.

◆ setCursor()

virtual void pqRenderView::setCursor ( const QCursor &  )
virtual

Let internal class handle which internal widget should change its cursor This is usually used for selection and in case of QuadView/SliceView which contains an aggregation of QWidget, we don't necessary want all of them to share the same cursor.

Reimplemented in pqMultiSliceView.

◆ selectOnSurface()

void pqRenderView::selectOnSurface ( int  rectangle[4],
int  selectionModifier = pqView::PV_SELECTION_DEFAULT 
)

Creates a new surface selection given the rectangle in display coordinates.

◆ selectPointsOnSurface()

void pqRenderView::selectPointsOnSurface ( int  rectangle[4],
int  selectionModifier = pqView::PV_SELECTION_DEFAULT 
)

◆ pick()

pqDataRepresentation* pqRenderView::pick ( int  pos[2])

Picks the representation at the given position.

This will result in firing the picked(pqOutputPort*) signal on successful pick.

◆ pickBlock()

pqDataRepresentation* pqRenderView::pickBlock ( int  pos[2],
unsigned int &  flatIndex 
)

Picks the representation at the given position.

Furthermore, if the picked representation is a multi-block data set the picked block will be returned in the flatIndex variable.

◆ selectFrustum()

void pqRenderView::selectFrustum ( int  rectangle[4])

Creates a new frustum selection given the rectangle in display coordinates.

◆ selectFrustumPoints()

void pqRenderView::selectFrustumPoints ( int  rectangle[4])

◆ selectBlock()

void pqRenderView::selectBlock ( int  rectangle[4],
int  selectionModifier = pqView::PV_SELECTION_DEFAULT 
)

Creates a "block" selection given the rectangle in display coordinates.

block selection is selection of a block in a composite dataset.

◆ selectPolygonPoints()

void pqRenderView::selectPolygonPoints ( vtkIntArray *  polygon,
int  selectionModifier = pqView::PV_SELECTION_DEFAULT 
)

Creates a new surface points selection given the polygon in display coordinates.

◆ selectPolygonCells()

void pqRenderView::selectPolygonCells ( vtkIntArray *  polygon,
int  selectionModifier = pqView::PV_SELECTION_DEFAULT 
)

Creates a new surface cells selection given the polygon in display coordinates.

◆ updateInteractionMode [1/2]

void pqRenderView::updateInteractionMode ( int  mode)
signal

◆ setOrientationAxesVisibility

void pqRenderView::setOrientationAxesVisibility ( bool  visible)
slot

◆ setOrientationAxesInteractivity

void pqRenderView::setOrientationAxesInteractivity ( bool  interactive)
slot

◆ setOrientationAxesLabelColor

void pqRenderView::setOrientationAxesLabelColor ( const QColor &  )
slot

◆ setOrientationAxesOutlineColor

void pqRenderView::setOrientationAxesOutlineColor ( const QColor &  )
slot

◆ setCenterOfRotation [1/2]

void pqRenderView::setCenterOfRotation ( double  x,
double  y,
double  z 
)
slot

◆ setCenterOfRotation [2/2]

void pqRenderView::setCenterOfRotation ( double  xyz[3])
inlineslot

Definition at line 245 of file pqRenderView.h.

◆ setCenterAxesVisibility

void pqRenderView::setCenterAxesVisibility ( bool  visible)
slot

◆ setResetCenterWithCamera

void pqRenderView::setResetCenterWithCamera ( bool  b)
inlineslot

Get/Set whether resetCamera() resets the center of rotation as well.

Definition at line 254 of file pqRenderView.h.

◆ setUseMultipleRepresentationSelection

void pqRenderView::setUseMultipleRepresentationSelection ( bool  b)
inlineslot

Set whether selection will be done on multiple representations.

Definition at line 259 of file pqRenderView.h.

◆ linkToOtherView

void pqRenderView::linkToOtherView ( )
slot

start the link to other view process

◆ undo

virtual void pqRenderView::undo ( )
virtualslot

Called to undo interaction.

View modules supporting interaction undo must override this method.

◆ redo

virtual void pqRenderView::redo ( )
virtualslot

Called to redo interaction.

View modules supporting interaction undo must override this method.

◆ resetCenterOfRotationIfNeeded

void pqRenderView::resetCenterOfRotationIfNeeded ( )
inlineslot

Resets center of rotation if this->ResetCenterWithCamera is true.

Definition at line 284 of file pqRenderView.h.

◆ updateInteractionMode [2/2]

void pqRenderView::updateInteractionMode ( pqOutputPort opPort)
slot

Try to provide the best view orientation and interaction mode.

◆ fakeUndoRedo()

void pqRenderView::fakeUndoRedo ( bool  redo,
bool  self 
)
protected

Updates undo stack without actually performing the undo/redo actions.

◆ fakeInteraction()

void pqRenderView::fakeInteraction ( bool  start)
protected

Updates undo stack of all linked views to record a programatic change in camera as a interaction.

Must be called with start=true before the change and with start=false after the change.

◆ createWidget()

virtual QWidget* pqRenderView::createWidget ( )
protectedvirtual

Creates a new instance of the QWidget subclass to be used to show this view.

Default implementation creates a QVTKWidget.

Reimplemented from pqRenderViewBase.

Reimplemented in pqMultiSliceView, and pqComparativeRenderView.

◆ initialize()

virtual void pqRenderView::initialize ( )
protectedvirtual

Overridden to initialize the interaction undo/redo stack.

Reimplemented from pqRenderViewBase.

Member Data Documentation

◆ ResetCenterWithCamera

bool pqRenderView::ResetCenterWithCamera
protected

Definition at line 310 of file pqRenderView.h.

◆ UseMultipleRepresentationSelection

bool pqRenderView::UseMultipleRepresentationSelection
protected

Definition at line 313 of file pqRenderView.h.


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