Skip to content

WIP: pqQVTKWidget: run-time selection of Native/Stereo

closes: #19747

This change consists in two MR adding its corresponding changes to VTK and Paraview:

  1. Paraview MR paraview/paraview!4159 (merged)
  2. VTK MR !6959 (closed)

These changes let pqQVTKWidget to either use pqQVTKOpenglNativeWidget or pqQVTKOpengGLStereoWdiget in startup-time, this is, when --stereo is (or is not) passed to paraview binary.

To achieve this, the following class hierarchy change is proposed (Red color items are the added relations and blue the removed one):

changes

A decorator pattern is added since:

  • We cannot chose at runtime the ancestor class of pqQVTWidget without incurring in code duplication (a templated class cannot extend QWidget).
  • Since we need to chose on run time the type of the managed class, a interface has to be refactored from pqQVTKOpenglNativeWidget and pqQVTKOpengGLStereoWdiget
  • pqQVTKWidget needs to have the same interface as pqQVTKOpenGL*Widget, since we are substituting Inheritance to composition.
Edited by Vicente Bolea

Merge request reports