94 typedef std::vector<PVNodeID> PVPath;
102 virtual void DoneWithMasterThread ();
104 virtual void MovingToVisSubThread ();
106 virtual void SwitchToVisSubThread ();
108 virtual void DoneWithVisSubThread ();
112 virtual void SwitchToMasterThread ();
154 int currentPVPOIndex);
156 int currentPVPOIndex,
157 const std::string& modelDescription,
161 bool exportImage(std::string name=
"",
int width=-1,
int height=-1);
178 void moveScene(
float,
float,
float,
bool);
187 const std::vector<G4ModelingParameters::VisAttributesModifier>*
209 enum RECORDING_STEP {WAIT,START,PAUSE,CONTINUE,STOP,READY_TO_ENCODE,
ENCODING,FAILED,SUCCESS,BAD_ENCODER,BAD_OUTPUT,BAD_TMP,SAVE};
211 void createPopupMenu();
212 void createRadioAction(QAction *,QAction *,
const std::string&,
unsigned int a=1);
213 void rescaleImage(
int,
int);
214 bool printPDF(
const std::string,
int,QImage);
215 void showMovieParametersDialog();
216 void initMovieParameters();
217 QString createTempFolder();
218 QString removeTempFolder();
219 void setRecordingStatus(RECORDING_STEP);
220 void setRecordingInfos(
const QString&);
221 QString getProcessErrorMsg();
222 QWidget* getParentWidget();
223 bool parseAndInsertInSceneTree(QTreeWidgetItem *,
225 unsigned int fullPathIndex,
226 const QString& parentRoot,
227 unsigned int currentIndex,
228 int currentPVPOIndex);
229 void setCheckComponent(QTreeWidgetItem* item,
bool check);
230 void createSceneTreeComponent();
231 void createSceneTreeWidget();
232 void createViewerPropertiesWidget();
233 void createPickInfosWidget();
234 bool parseAndCheckVisibility(QTreeWidgetItem * treeNode,
int POindex);
235 QTreeWidgetItem* createTreeWidgetItem(
const PVPath& fullPath,
239 const QString& logicalName,
240 Qt::CheckState state,
241 QTreeWidgetItem * treeNode,
243 QString getModelShortName(
const G4String& modelShortName);
244 void cloneSceneTree(QTreeWidgetItem* rootItem);
245 void changeDepthOnSceneTreeItem(
double lookForDepth,
double currentDepth,QTreeWidgetItem* item);
246 void updatePositivePoIndexSceneTreeWidgetQuickMap(
int POindex,QTreeWidgetItem* item);
247 void changeQColorForTreeWidgetItem(QTreeWidgetItem* item,
const QColor&);
249 bool isSameSceneTreeElement(QTreeWidgetItem* parentOldItem,QTreeWidgetItem* parentNewItem);
250 void changeOpenCloseVisibleHiddenSelectedColorSceneTreeElement(QTreeWidgetItem* subItem);
251 bool isPVVolume(QTreeWidgetItem* item);
252 QTreeWidgetItem* cloneWidgetItem(QTreeWidgetItem* item);
253 void clearSceneTreeSelection(QTreeWidgetItem*);
254 void clearTreeWidgetElements(QTreeWidgetItem* item);
257 QTreeWidgetItem* getTreeWidgetItem(
int POindex);
260 QTreeWidgetItem* getOldTreeWidgetItem(
int POindex);
263 std::string parseSceneTreeAndSaveState();
265 std::string parseSceneTreeElementAndSaveState(QTreeWidgetItem* item,
unsigned int level);
266 QString GetCommandParameterList (
const G4UIcommand *aCommand);
267 void changeColorAndTransparency(GLuint index,
G4Color color);
269#ifdef G4MULTITHREADED
270 inline void SetQGLContextVisSubThread(QThread *th) {
271 fQGLContextVisSubThread = th;
273 inline void SetQGLContextMainThread(QThread *th) {
274 fQGLContextMainThread = th;
282 QPoint fLastPickPoint;
293 bool fHoldRotateEvent;
295 QString fEncoderPath;
296 QString fTempFolderPath;
297 QString fMovieTempFolderPath;
298 QString fSaveFileName;
299 QString fParameterFileName;
300 QAction *fMouseRotateAction;
301 QAction *fMouseMoveAction;
302 QAction *fMousePickAction;
303 QAction *fMouseZoomInAction;
304 QAction *fMouseZoomOutAction;
305 QAction *fFullScreenOn;
306 QAction *fFullScreenOff;
307 QAction *fDrawingWireframe;
308 QAction *fDrawingLineRemoval;
309 QAction *fDrawingSurfaceRemoval;
310 QAction *fDrawingLineSurfaceRemoval;
311 QAction *fProjectionOrtho;
312 QAction *fProjectionPerspective;
314 RECORDING_STEP fRecordingStep;
316#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
317 QTime *fLastEventTime;
319 QElapsedTimer *fLastEventTime;
322 int fNbMaxFramesPerSec;
323 float fNbMaxAnglePerSec;
324 int fLaunchSpinDelay;
325 QWidget* fUISceneTreeWidget;
326 QWidget* fUIViewerPropertiesWidget;
327 QWidget* fUIPickInfosWidget;
330 bool fControlKeyPress;
333 bool fCheckSceneTreeComponentSignalLock;
334 bool fViewerPropertiesTableWidgetIsInit;
335 QTreeWidget* fSceneTreeComponentTreeWidget;
337 QWidget* fSceneTreeWidget;
338 bool fPVRootNodeCreate;
339 QLineEdit* fFilterOutput;
340 QString fFileSavePath;
343 QString fTouchableVolumes;
344 QDialog* fShortcutsDialog;
345 QTableWidget *fViewerPropertiesTableWidget;
346 QWidget* fPickInfosWidget;
347 QScrollArea* fPickInfosScrollArea;
348 int fTreeWidgetInfosIgnoredCommands;
349 QPushButton * fSceneTreeButtonApply;
350 QTextEdit *fShortcutsDialogInfos;
351 QSlider* fSceneTreeDepthSlider;
352 std::map <int, PVPath > fTreeItemModels;
353 std::map <int, PVPath > fOldTreeItemModels;
356 std::map <int, QTreeWidgetItem*> fPositivePoIndexSceneTreeWidgetQuickMap;
358 std::map <int, QTreeWidgetItem*> fOldPositivePoIndexSceneTreeWidgetQuickMap;
359 std::vector <QTreeWidgetItem*> fOldNullPoIndexSceneTreeWidgetQuickVector;
361 std::map <int, QColor> fOldVisAttrColorMap;
363 unsigned int fSceneTreeDepth;
364 QTreeWidgetItem* fModelShortNameItem;
366 int fMaxPOindexInserted;
369 std::map <int, QTreeWidgetItem*>::const_iterator fLastSceneTreeWidgetAskForIterator;
370 std::map <int, QTreeWidgetItem*>::const_iterator fLastSceneTreeWidgetAskForIteratorEnd;
373 std::map <int, QTreeWidgetItem*>::const_iterator fOldLastSceneTreeWidgetAskForIterator;
374 std::map <int, QTreeWidgetItem*>::const_iterator fOldLastSceneTreeWidgetAskForIteratorEnd;
377 QPixmap* fTreeIconOpen;
378 QPixmap* fTreeIconClosed;
379 QPixmap* fSearchIcon;
381 int fLastExportSliderValue;
383 GLuint fLastHighlightName;
386#ifdef G4MULTITHREADED
387 QThread* fQGLContextVisSubThread;
388 QThread* fQGLContextMainThread;
392 G4AutoLock* lWaitForVisSubThreadQtOpenGLContextInitialized;
393 G4AutoLock* lWaitForVisSubThreadQtOpenGLContextMoved;
402 void actionSaveImage();
403 void actionChangeBackgroundColor();
404 void actionChangeTextColor();
405 void actionChangeDefaultColor();
406 void actionMovieParameters();
408 void showShortcuts();
409 void toggleMouseAction(
int);
410 void toggleSurfaceAction(
int);
411 void toggleProjection(
bool);
412 void toggleTransparency(
bool);
413 void toggleAntialiasing(
bool);
414 void toggleHaloing(
bool);
415 void toggleAux(
bool);
416 void toggleHiddenMarkers(
bool);
417 void toggleFullScreen(
bool);
418 void processEncodeFinished();
419 void processLookForFinished();
420 void processEncodeStdout();
421 void sceneTreeComponentItemChanged(QTreeWidgetItem* item,
int id);
422 void toggleSceneTreeComponentPickingCout(
int);
423 void togglePicking();
424 void currentTabActivated(
int);
427 void sceneTreeComponentSelected();
428 void changeDepthInSceneTree(
int);
429 void changeSearchSelection();
430 void changeColorAndTransparency(QTreeWidgetItem* item,
int val);
431 void tableWidgetViewerSetItemChanged(QTableWidgetItem *);