ParaView
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
pqView Class Reference

This is a PQ abstraction of a generic view module. More...

#include <pqView.h>

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

List of all members.

Public Slots

virtual void render ()
 Request a StillRender on idle. Multiple calls are collapsed into one.
virtual void forceRender ()
 Forces an immediate render.
void cancelPendingRenders ()
 Cancels any pending renders.
virtual void undo ()
 Called to undo interaction.
virtual void redo ()
 Called to redo interaction.
virtual void resetDisplay ()
 Called to reset the view's display.

Signals

void representationAdded (pqRepresentation *)
 Fired after a representation has been added to this view.
void representationRemoved (pqRepresentation *)
 Fired after a representation has been removed from this view.
void beginRender ()
 Fired when the render module fires a vtkCommand::StartEvent signalling the beginning of rendering.
void endRender ()
 Fired when the render module fires a vtkCommand::EndEvent signalling the end of rendering.
void representationVisibilityChanged (pqRepresentation *repr, bool visible)
 Fired when any representation visibility changes.
void canUndoChanged (bool)
 Fired when interaction undo stack status changes.
void canRedoChanged (bool)
 Fired when interaction undo stack status changes.
void selected (pqOutputPort *opport)
 Fired when a selection is made in this view.
void picked (pqOutputPort *opport)
 Fired when a port is picked.
void beginProgress ()
 Fired before doing any actions that may result in progress events that must be reported by the client.
void endProgress ()
 Fired after performing any actions that may result in progress events.
void progress (const QString &message, int percent_progress)
 Fired to notify the current execution progress.
void multipleSelected (QList< pqOutputPort * > opports)
 Fired when UseMultipleRepresentationSelection is set to on and selection on multiple representations is made in this view.

Public Member Functions

virtual ~pqView ()
vtkSMViewProxygetViewProxy () const
 Returns the internal render Module proxy associated with this object.
virtual vtkViewgetClientSideView () const
 Return the client-side vtkView encapsulated by this view (if any), or return NULL.
virtual QWidget * getWidget ()=0
 Return a widget associated with this view.
virtual bool supportsUndo () const
 Returns if this view module can support undo/redo.
QString getViewType () const
 Returns the type of this view module.
virtual bool canUndo () const
 Returns true if undo can be done.
virtual bool canRedo () const
 Returns true if redo can be done.
virtual bool saveImage (int width, int height, const QString &filename)=0
 Save a screenshot for the render module.
virtual QSize getSize ()
 Returns the current size of the rendering context.
virtual vtkImageDatacaptureImage (int magnification)=0
 Capture the view image into a new vtkImageData with the given magnification and returns it.
virtual vtkImageDatacaptureImage (const QSize &size)
bool hasRepresentation (pqRepresentation *repr) const
 This method checks if the representation is shown in this view.
int getNumberOfRepresentations () const
 Returns the number representations in the view.
int getNumberOfVisibleRepresentations () const
pqRepresentationgetRepresentation (int index) const
 Returns the representation for the specified index where (index < getNumberOfRepresentations()).
QList< pqRepresentation * > getRepresentations () const
 Returns a list of representations in this view.
virtual bool canDisplay (pqOutputPort *opPort) const
 This method returns is any pqPipelineSource can be dislayed in this view.
virtual void setAnnotationLink (vtkSMSourceProxy *link)
 The annotation link used on representations to share the selection and annotations.
vtkSMSourceProxygetAnnotationLink ()

Static Public Member Functions

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.

Protected Member Functions

 pqView (const QString &type, const QString &group, const QString &name, vtkSMViewProxy *view, pqServer *server, QObject *parent=NULL)
 Constructor: type :- view type.
virtual void initialize ()
 Use this method to initialize the pqObject state using the underlying vtkSMProxy.

Detailed Description

This is a PQ abstraction of a generic view module.

Subclasses can be specific for different types of view such as render view, histogram view etc.

Definition at line 54 of file pqView.h.


Constructor & Destructor Documentation

virtual pqView::~pqView ( ) [virtual]
pqView::pqView ( const QString &  type,
const QString &  group,
const QString &  name,
vtkSMViewProxy view,
pqServer server,
QObject *  parent = NULL 
) [protected]

Constructor: type :- view type.

group :- SManager registration group. name :- SManager registration name. view :- View proxy. server:- server on which the proxy is created. parent:- QObject parent.


Member Function Documentation

vtkSMViewProxy* pqView::getViewProxy ( ) const

Returns the internal render Module proxy associated with this object.

Reimplemented in pqComparativeContextView.

virtual vtkView* pqView::getClientSideView ( ) const [virtual]

Return the client-side vtkView encapsulated by this view (if any), or return NULL.

virtual QWidget* pqView::getWidget ( ) [pure virtual]

Return a widget associated with this view.

Implemented in pqRenderViewBase, pqSpreadSheetView, pqContextView, and pqComparativeContextView.

virtual bool pqView::supportsUndo ( ) const [inline, virtual]

Returns if this view module can support undo/redo.

Returns false by default. Subclassess must override if that's not the case. View modules that support undo must fire all undo related signals defined by this class.

Reimplemented in pqRenderView, and pqContextView.

Definition at line 76 of file pqView.h.

QString pqView::getViewType ( ) const [inline]

Returns the type of this view module.

Definition at line 79 of file pqView.h.

static int pqView::computeMagnification ( const QSize &  fullsize,
QSize &  viewsize 
) [static]

Computes the magnification and view size given the current view size for the full size for the view.

virtual void pqView::render ( ) [virtual, slot]

Request a StillRender on idle. Multiple calls are collapsed into one.

virtual void pqView::forceRender ( ) [virtual, slot]

Forces an immediate render.

void pqView::cancelPendingRenders ( ) [slot]

Cancels any pending renders.

virtual void pqView::undo ( ) [inline, virtual, slot]

Called to undo interaction.

View modules supporting interaction undo must override this method.

Reimplemented in pqRenderView, and pqContextView.

Definition at line 97 of file pqView.h.

virtual void pqView::redo ( ) [inline, virtual, slot]

Called to redo interaction.

View modules supporting interaction undo must override this method.

Reimplemented in pqRenderView, and pqContextView.

Definition at line 101 of file pqView.h.

virtual void pqView::resetDisplay ( ) [inline, virtual, slot]

Called to reset the view's display.

For example, reset the camera or zoom level. The default implementation does nothing, but subclasses may override.

Reimplemented in pqContextView, and pqRenderViewBase.

Definition at line 106 of file pqView.h.

virtual bool pqView::canUndo ( ) const [inline, virtual]

Returns true if undo can be done.

Reimplemented in pqRenderView, and pqContextView.

Definition at line 110 of file pqView.h.

virtual bool pqView::canRedo ( ) const [inline, virtual]

Returns true if redo can be done.

Reimplemented in pqRenderView, and pqContextView.

Definition at line 113 of file pqView.h.

virtual bool pqView::saveImage ( int  width,
int  height,
const QString &  filename 
) [pure virtual]

Save a screenshot for the render module.

If width or height ==0, the current window size is used. TODO: pqView should probably report file types it supports

Implemented in pqRenderViewBase, pqSpreadSheetView, and pqContextView.

virtual QSize pqView::getSize ( ) [virtual]

Returns the current size of the rendering context.

Default implementation returns the client size ofthe widget. Subclasses may override to change this behavior.

virtual vtkImageData* pqView::captureImage ( int  magnification) [pure virtual]

Capture the view image into a new vtkImageData with the given magnification and returns it.

Implemented in pqRenderView, pqComparativeRenderView, pqSpreadSheetView, and pqContextView.

virtual vtkImageData* pqView::captureImage ( const QSize &  size) [virtual]
bool pqView::hasRepresentation ( pqRepresentation repr) const

This method checks if the representation is shown in this view.

int pqView::getNumberOfRepresentations ( ) const

Returns the number representations in the view.

int pqView::getNumberOfVisibleRepresentations ( ) const
pqRepresentation* pqView::getRepresentation ( int  index) const

Returns the representation for the specified index where (index < getNumberOfRepresentations()).

QList<pqRepresentation*> pqView::getRepresentations ( ) const

Returns a list of representations in this view.

virtual bool pqView::canDisplay ( pqOutputPort opPort) const [virtual]

This method returns is any pqPipelineSource can be dislayed in this view.

This is a convenience method, it gets the pqDisplayPolicy object from the pqApplicationCore are queries it.

Reimplemented in pqContextView, pqRenderViewBase, and pqSpreadSheetView.

virtual void pqView::setAnnotationLink ( vtkSMSourceProxy link) [virtual]

The annotation link used on representations to share the selection and annotations.

This is only used in views aware of this link.

vtkSMSourceProxy* pqView::getAnnotationLink ( )
void pqView::representationAdded ( pqRepresentation ) [signal]

Fired after a representation has been added to this view.

void pqView::representationRemoved ( pqRepresentation ) [signal]

Fired after a representation has been removed from this view.

void pqView::beginRender ( ) [signal]

Fired when the render module fires a vtkCommand::StartEvent signalling the beginning of rendering.

Subclasses must fire these signals at appropriate times.

void pqView::endRender ( ) [signal]

Fired when the render module fires a vtkCommand::EndEvent signalling the end of rendering.

Subclasses must fire these signals at appropriate times.

void pqView::representationVisibilityChanged ( pqRepresentation repr,
bool  visible 
) [signal]

Fired when any representation visibility changes.

void pqView::canUndoChanged ( bool  ) [signal]

Fired when interaction undo stack status changes.

void pqView::canRedoChanged ( bool  ) [signal]

Fired when interaction undo stack status changes.

void pqView::selected ( pqOutputPort opport) [signal]

Fired when a selection is made in this view.

opport is the output port for the source that got selected. the selection input on the source proxy for the opport must already have been initialized to a selection source.

void pqView::picked ( pqOutputPort opport) [signal]

Fired when a port is picked.

opport is the port that got picked.

void pqView::beginProgress ( ) [signal]

Fired before doing any actions that may result in progress events that must be reported by the client.

void pqView::endProgress ( ) [signal]

Fired after performing any actions that may result in progress events.

Must match beginProgress() calls.

void pqView::progress ( const QString &  message,
int  percent_progress 
) [signal]

Fired to notify the current execution progress.

This will be generally have any effect only if beginProgress() has been fired before firing this signal.

void pqView::multipleSelected ( QList< pqOutputPort * >  opports) [signal]

Fired when UseMultipleRepresentationSelection is set to on and selection on multiple representations is made in this view.

opports is a list of opport, and opport is the output port for the source that got selected. the selection input on the source proxy for the opport must already have been initialized to a selection source.

virtual void pqView::initialize ( ) [protected, virtual]

Use this method to initialize the pqObject state using the underlying vtkSMProxy.

This needs to be done only once, after the object has been created. Overridden to update the list of representations currently available.

Reimplemented from pqProxy.

Reimplemented in pqRenderViewBase, pqContextView, pqComparativeRenderView, and pqComparativeContextView.


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