ParaView
Classes | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
pqRenderViewBase Class Reference

pqRenderViewBase is an abstract base class for all render-view based views. More...

#include <pqRenderViewBase.h>

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

List of all members.

Classes

struct  ManipulatorType

Public Member Functions

virtual ~pqRenderViewBase ()
virtual QWidget * getWidget ()
 Returns the QVTKWidget for this render Window.
virtual void resetCamera ()=0
 Resets the camera to include all visible data.
virtual void resetDisplay ()
 Called to reset the view's display. This method calls resetCamera().
virtual void setDefaultPropertyValues ()
 Sets default values for the underlying proxy.
virtual const intdefaultBackgroundColor () const
 restore the default background color
virtual void saveSettings ()
 Save the settings of this render module with QSettings.
virtual void restoreSettings (bool only_global)
 Apply the settings from QSettings to this render module.
virtual bool canDisplay (pqOutputPort *opPort) const
 Returns whether a source can be displayed in this view module.
QList< vtkSMProxy * > getCameraManipulators (const QString &cameraManipulatorName) const
 Get/set the camera manipulators: ["Camera2DManipulator", "Camera3DManipulator"].
virtual bool setCameraManipulators (const QString &cameraManipulatorName, const QList< pqSMProxy > &manipulators)
virtual void restoreDefaultLightSettings ()
 restore the default light parameters
virtual bool saveImage (int width, int height, const QString &filename)
 Save a screenshot for the render module.
virtual ManipulatorTypegetManipulatorTypes (int &numberOfManipulatorType)=0
 Subclass must fill some static structure and provide an implementation of that method which should returns a set of camera manipulators used by this type of view.

Static Public Member Functions

static void setStereo (int mode)
 Convenience method to enable stereo rendering on all views that support stereo rendering.

Protected Slots

virtual void initializeAfterObjectsCreated ()
virtual void initializeWidgets ()=0
 Setups up RenderModule and QVTKWidget binding.
void beginDelayInteractiveRender ()
 Triggered by DelayNonInteractiveRenderEvent.
void endDelayInteractiveRender ()
void updateStatusMessage ()
 Triggered by internal timer to update the status bar message.

Protected Member Functions

 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.
virtual void initializeInteractors ()
 This method is called during initialize() to initialize the interactors.
virtual vtkSMProxycreateCameraManipulator (int mouse, int shift, int control, QString name)
 Create a CameraManipulatorProxy given the mouse, key and name.
virtual QWidget * createWidget ()
 Creates a new instance of the QWidget subclass to be used to show this view.
virtual void initialize ()
 Use this method to initialize the pqObject state using the underlying vtkSMProxy.
virtual const char * globalSettingsGroup () const =0
 Return the name of the group used for global settings (except interactor style).
virtual const char * viewSettingsGroup () const =0
 Return the name of the group used for view-sepecific settings such as background color, lighting.
virtual QMap< QString, QString > interactorStyleSettingsGroupToCameraManipulatorName () const =0
 Returns the name of the group in which to save the interactor style settings that map to a given CameraManipulator name.

Protected Attributes

bool AllowCaching
 On Mac, we usually try to cache the front buffer to avoid unecessary.

Detailed Description

pqRenderViewBase is an abstract base class for all render-view based views.

It encapuslates some of the commonly needed functionality for all such views.

Definition at line 43 of file pqRenderViewBase.h.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual QWidget* pqRenderViewBase::getWidget ( ) [virtual]

Returns the QVTKWidget for this render Window.

Implements pqView.

virtual void pqRenderViewBase::resetCamera ( ) [pure 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.

Implemented in pqRenderView.

virtual void pqRenderViewBase::resetDisplay ( ) [virtual]

Called to reset the view's display. This method calls resetCamera().

Reimplemented from pqView.

virtual void pqRenderViewBase::setDefaultPropertyValues ( ) [virtual]

Sets default values for the underlying proxy.

This is during the initialization stage of the pqProxy for proxies created by the GUI itself i.e. for proxies loaded through state or created by python client this method won't be called.

Reimplemented from pqProxy.

Reimplemented in pqRenderView, and pqComparativeRenderView.

virtual const int* pqRenderViewBase::defaultBackgroundColor ( ) const [virtual]

restore the default background color

Reimplemented in pqRenderView.

virtual void pqRenderViewBase::saveSettings ( ) [virtual]

Save the settings of this render module with QSettings.

We only save non-global settings in this method. Global settings are saved by the dialog itself.

Reimplemented in pqRenderView.

virtual void pqRenderViewBase::restoreSettings ( bool  only_global) [virtual]

Apply the settings from QSettings to this render module.

Reimplemented in pqRenderView.

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

Returns whether a source can be displayed in this view module.

The default implementation returns true is the connection ID for the port and the view are the same.

Reimplemented from pqView.

QList<vtkSMProxy*> pqRenderViewBase::getCameraManipulators ( const QString &  cameraManipulatorName) const

Get/set the camera manipulators: ["Camera2DManipulator", "Camera3DManipulator"].

virtual bool pqRenderViewBase::setCameraManipulators ( const QString &  cameraManipulatorName,
const QList< pqSMProxy > &  manipulators 
) [virtual]
virtual void pqRenderViewBase::restoreDefaultLightSettings ( ) [virtual]

restore the default light parameters

Reimplemented in pqRenderView.

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

Save a screenshot for the render module.

If width or height ==0, the current window size is used.

Implements pqView.

static void pqRenderViewBase::setStereo ( int  mode) [static]

Convenience method to enable stereo rendering on all views that support stereo rendering.

If mode==0, stereo rendering is disabled. mode is same that used for vtkRenderWindow::SetStereoType. This does not request a render, the caller must explicitly call render on the views.

virtual ManipulatorType* pqRenderViewBase::getManipulatorTypes ( int numberOfManipulatorType) [pure virtual]

Subclass must fill some static structure and provide an implementation of that method which should returns a set of camera manipulators used by this type of view.

Implemented in pqRenderView.

virtual void pqRenderViewBase::initializeAfterObjectsCreated ( ) [protected, virtual, slot]
virtual void pqRenderViewBase::initializeWidgets ( ) [protected, pure virtual, slot]

Setups up RenderModule and QVTKWidget binding.

This method is called for all pqRenderView objects irrespective of whether it is created from state/undo-redo/python or by the GUI. Hence don't change any render module properties here.

Implemented in pqRenderView.

void pqRenderViewBase::beginDelayInteractiveRender ( ) [protected, slot]

Triggered by DelayNonInteractiveRenderEvent.

void pqRenderViewBase::endDelayInteractiveRender ( ) [protected, slot]
void pqRenderViewBase::updateStatusMessage ( ) [protected, slot]

Triggered by internal timer to update the status bar message.

virtual bool pqRenderViewBase::eventFilter ( QObject *  caller,
QEvent *  e 
) [protected, virtual]

Overridden to popup the context menu, if some actions have been added using addMenuAction.

virtual void pqRenderViewBase::initializeInteractors ( ) [protected, virtual]

This method is called during initialize() to initialize the interactors.

Interactor (interactor style, manipulators etc). Eventually, all the code that deals with interactor/interactor styles must be removed from the server manager (rather vtkSMRenderViewProxy). It's the application's responsibility to set up the interaction capabilities as per the domain.

virtual vtkSMProxy* pqRenderViewBase::createCameraManipulator ( int  mouse,
int  shift,
int  control,
QString  name 
) [protected, virtual]

Create a CameraManipulatorProxy given the mouse, key and name.

Whoever calling this is reponsible for deleting the new proxy.

virtual QWidget* pqRenderViewBase::createWidget ( ) [protected, virtual]

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

Default implementation creates a QVTKWidget.

Reimplemented in pqRenderView, and pqComparativeRenderView.

virtual void pqRenderViewBase::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.

Reimplemented from pqView.

Reimplemented in pqComparativeRenderView.

virtual const char* pqRenderViewBase::globalSettingsGroup ( ) const [protected, pure virtual]

Return the name of the group used for global settings (except interactor style).

Implemented in pqRenderView.

virtual const char* pqRenderViewBase::viewSettingsGroup ( ) const [protected, pure virtual]

Return the name of the group used for view-sepecific settings such as background color, lighting.

Implemented in pqRenderView.

virtual QMap<QString, QString> pqRenderViewBase::interactorStyleSettingsGroupToCameraManipulatorName ( ) const [protected, pure virtual]

Returns the name of the group in which to save the interactor style settings that map to a given CameraManipulator name.

Implemented in pqRenderView.


Member Data Documentation

On Mac, we usually try to cache the front buffer to avoid unecessary.

Definition at line 192 of file pqRenderViewBase.h.


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