Public Slots | Public Member Functions | Protected Member Functions | List of all members
pqQVTKWidget Class Reference

QWidget subclass to show rendering results from vtkSMViewProxy. More...

#include <pqQVTKWidget.h>

Inherits QWidget.

Public Slots

void paintMousePointer (int x, int y)
 

Public Member Functions

 pqQVTKWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags{})
 
 pqQVTKWidget (QWidget *parentObject, Qt::WindowFlags f, bool isStereo)
 
 ~pqQVTKWidget () override
 
void setViewProxy (vtkSMProxy *)
 Set the view proxy. More...
 
void setSession (vtkSMSession *)
 Set the session. More...
 
vtkTypeUInt32 getProxyId ()
 Return the Proxy ID if any, otherwise return 0. More...
 
void setSizePropertyName (const QString &pname)
 Set/Get the name of the property to use to update the size of the widget on the proxy. More...
 
const QString & sizePropertyName () const
 
void notifyQApplication (QMouseEvent *)
 
void setRenderWindow (vtkRenderWindow *win)
 Methods that decorate QVTKOpenGL*Widget methods. More...
 
vtkRenderWindowrenderWindow () const
 
QVTKInteractor * interactor () const
 
bool isValid ()
 
void setEnableHiDPI (bool flag)
 
void setCustomDevicePixelRatio (double cdpr)
 
double effectiveDevicePixelRatio () const
 
void setViewSize (int width, int height)
 
QWidget * renderWidget () const
 Provide access to the internal QWidget subclass used for actual rendering. More...
 
void setCursorCustom (const QCursor &cursor)
 Set / get the cursor shape used when the mouse is over the widget. More...
 
QCursor cursorCustom () const
 Set / get the cursor shape used when the mouse is over the widget. More...
 

Protected Member Functions

bool renderVTK ()
 
bool canRender ()
 
void resizeEvent (QResizeEvent *evt) override
 

Detailed Description

QWidget subclass to show rendering results from vtkSMViewProxy.

pqQVTKWidget is used by ParaView to show rendering results from a vtkSMViewProxy (or subclass) in QWidget. Internally, it uses a QVTKOpenGLNativeWidget, or QVTKOpenGLStereoWidget based on whether stereo mode is enabled and supported on the platform.

This class adds awareness for view proxies to the widget it owns. The advantage of doing so is that pqQVTKWidget can automatically update the "ViewSize" property on the view proxy whenever the widget's size/position changes.

Definition at line 35 of file pqQVTKWidget.h.

Constructor & Destructor Documentation

◆ pqQVTKWidget() [1/2]

pqQVTKWidget::pqQVTKWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = Qt::WindowFlags{} 
)

◆ pqQVTKWidget() [2/2]

pqQVTKWidget::pqQVTKWidget ( QWidget *  parentObject,
Qt::WindowFlags  f,
bool  isStereo 
)

◆ ~pqQVTKWidget()

pqQVTKWidget::~pqQVTKWidget ( )
override

Member Function Documentation

◆ setViewProxy()

void pqQVTKWidget::setViewProxy ( vtkSMProxy )

Set the view proxy.

◆ setSession()

void pqQVTKWidget::setSession ( vtkSMSession )

Set the session.

This is only used when ViewProxy is not set.

◆ getProxyId()

vtkTypeUInt32 pqQVTKWidget::getProxyId ( )

Return the Proxy ID if any, otherwise return 0.

◆ setSizePropertyName()

void pqQVTKWidget::setSizePropertyName ( const QString &  pname)
inline

Set/Get the name of the property to use to update the size of the widget on the proxy.

By default "ViewSize" is used.

Definition at line 65 of file pqQVTKWidget.h.

◆ sizePropertyName()

const QString& pqQVTKWidget::sizePropertyName ( ) const
inline

Definition at line 66 of file pqQVTKWidget.h.

◆ notifyQApplication()

void pqQVTKWidget::notifyQApplication ( QMouseEvent *  )

◆ setRenderWindow()

void pqQVTKWidget::setRenderWindow ( vtkRenderWindow win)

Methods that decorate QVTKOpenGL*Widget methods.

◆ renderWindow()

vtkRenderWindow* pqQVTKWidget::renderWindow ( ) const

◆ interactor()

QVTKInteractor* pqQVTKWidget::interactor ( ) const

◆ isValid()

bool pqQVTKWidget::isValid ( )

◆ setEnableHiDPI()

void pqQVTKWidget::setEnableHiDPI ( bool  flag)

◆ setCustomDevicePixelRatio()

void pqQVTKWidget::setCustomDevicePixelRatio ( double  cdpr)

◆ effectiveDevicePixelRatio()

double pqQVTKWidget::effectiveDevicePixelRatio ( ) const

◆ setViewSize()

void pqQVTKWidget::setViewSize ( int  width,
int  height 
)

◆ renderWidget()

QWidget* pqQVTKWidget::renderWidget ( ) const

Provide access to the internal QWidget subclass used for actual rendering.

This may be QVTKOpenGLStereoWidget or QVTKOpenGLNativeWidget

◆ setCursorCustom()

void pqQVTKWidget::setCursorCustom ( const QCursor &  cursor)

Set / get the cursor shape used when the mouse is over the widget.

You should use these functions instead of QWidget::setCursor / QWidget::cursor. The reason is that, using original ones do not work properly when ParaView is launched with stereo mode activated.

◆ cursorCustom()

QCursor pqQVTKWidget::cursorCustom ( ) const

Set / get the cursor shape used when the mouse is over the widget.

You should use these functions instead of QWidget::setCursor / QWidget::cursor. The reason is that, using original ones do not work properly when ParaView is launched with stereo mode activated.

◆ paintMousePointer

void pqQVTKWidget::paintMousePointer ( int  x,
int  y 
)
slot

◆ renderVTK()

bool pqQVTKWidget::renderVTK ( )
protected

◆ canRender()

bool pqQVTKWidget::canRender ( )
protected

◆ resizeEvent()

void pqQVTKWidget::resizeEvent ( QResizeEvent *  evt)
overrideprotected

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