ParaView
Public Member Functions | Static Public Member Functions | List of all members
pqStereoModeHelper Class Reference

pqStereoModeHelper is used to temporarily change stereo mode on all views on the specified server. More...

#include <pqStereoModeHelper.h>

Public Member Functions

 pqStereoModeHelper (int stereoMode, pqServer *server)
 Constructor to change stereo mode on all views on a particular server/session. More...
 
 pqStereoModeHelper (int stereoMode, pqView *view)
 Another constructor to change the stereo mode on a single view rather than all views. More...
 
virtual ~pqStereoModeHelper ()
 

Static Public Member Functions

static const QStringList & availableStereoModes ()
 Helper method to get available stereo modes for a render view. More...
 
static int stereoMode (const QString &label)
 Helper method to convert a stereo mode label to a VTK_STEREO_* value defined in vtkRenderWindow. More...
 

Detailed Description

pqStereoModeHelper is used to temporarily change stereo mode on all views on the specified server.

Often times, one wants to temporarily change the stereo mode for all views that support stereo and then restore it back to their previous value e.g. when saving screenshots, or animations. This class helps us do that. Simply instantiate this class on the stack. In the constructor, it changes the stereo mode for all views (or a single view) and restores it back to its original value in the destructor.

Definition at line 53 of file pqStereoModeHelper.h.

Constructor & Destructor Documentation

§ pqStereoModeHelper() [1/2]

pqStereoModeHelper::pqStereoModeHelper ( int  stereoMode,
pqServer server 
)

Constructor to change stereo mode on all views on a particular server/session.

Parameters
stereoModethe new stereo mode to use. 0 for no stereo. For other acceptable values, see vtkRenderWindow.h.
serverthe server to use to locate the views to change stereo mode on.

§ pqStereoModeHelper() [2/2]

pqStereoModeHelper::pqStereoModeHelper ( int  stereoMode,
pqView view 
)

Another constructor to change the stereo mode on a single view rather than all views.

Parameters
stereoModethe new stereo mode to use. 0 for no stereo. For other acceptable values, see vtkRenderWindow.h.
viewthe view to update the stereo mode on.

§ ~pqStereoModeHelper()

virtual pqStereoModeHelper::~pqStereoModeHelper ( )
virtual

Member Function Documentation

§ availableStereoModes()

static const QStringList& pqStereoModeHelper::availableStereoModes ( )
static

Helper method to get available stereo modes for a render view.

Returns
a list of labels for available stereo modes.

§ stereoMode()

static int pqStereoModeHelper::stereoMode ( const QString &  label)
static

Helper method to convert a stereo mode label to a VTK_STEREO_* value defined in vtkRenderWindow.

Returns
0 for invalid label or no-stereo, otherwise a positive integer representating the chosen StereoType for a vtkRenderWindow.

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