WIP: pqQVTKWidget: run-time selection of Native/Stereo
closes: #19747
This change consists in two MR adding its corresponding changes to VTK and Paraview:
- Paraview MR paraview/paraview!4159 (merged)
- 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):
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
andpqQVTKOpengGLStereoWdiget
-
pqQVTKWidget
needs to have the same interface aspqQVTKOpenGL*Widget
, since we are substituting Inheritance to composition.
Edited by Vicente Bolea