26#ifndef G4VTKQTVIEWER_HH
27#define G4VTKQTVIEWER_HH
45#include "QVTKOpenGLNativeWidget.h"
54 using PVPath = std::vector<PVNodeID>;
64 void DoneWithMasterThread()
override;
66 void MovingToVisSubThread()
override;
68 void SwitchToVisSubThread()
override;
70 void DoneWithVisSubThread()
override;
74 void SwitchToMasterThread()
override;
76 inline void SetQGLContextVisSubThread(QThread* th) { fQGLContextVisSubThread = th; }
77 inline void SetQGLContextMainThread(QThread* th) { fQGLContextMainThread = th; }
84 int POIndex,
const QString& logicalName,
85 Qt::CheckState state, QTreeWidgetItem* parentTreeNode,
93 unsigned int fullPathIndex,
const QString& parentRoot,
94 unsigned int currentIndexInTreeSceneHandler,
95 int currentPVPOIndex);
105#ifdef G4MULTITHREADED
106 QThread* fQGLContextVisSubThread;
107 QThread* fQGLContextMainThread;
111 G4AutoLock* lWaitForVisSubThreadQtOpenGLContextInitialized;
112 G4AutoLock* lWaitForVisSubThreadQtOpenGLContextMoved;
void addNonPVSceneTreeElement(const G4String &model, G4Visible &visible, int currentPOIndex)
void createSceneTreeWidget()
~G4VtkQtViewer() override
virtual void CreateMainWindow(QVTKOpenGLNativeWidget *, const QString &)
bool parseAndInsertInSceneTree(QTreeWidgetItem *parentItem, G4PhysicalVolumeModel *pPVModel, unsigned int fullPathIndex, const QString &parentRoot, unsigned int currentIndexInTreeSceneHandler, int currentPVPOIndex)
QString getModelShortName(const G4String &model)
void Initialise() override
G4VtkQtViewer(G4VSceneHandler &, const G4String &name)
std::vector< PVNodeID > PVPath
void SetWidgetInteractor(vtkAbstractWidget *widget) override
void EnableClipperWidget() override
void createSceneTreeComponent()
void addPVSceneTreeElement(const G4String &model, G4PhysicalVolumeModel *pPVModel, int currentPOIndex)
void FinishView() override
QTreeWidgetItem * createTreeWidgetItem(const PVPath &fullPath, const QString &name, int copyNb, int POIndex, const QString &logicalName, Qt::CheckState state, QTreeWidgetItem *parentTreeNode, const G4Colour &color)