34#ifndef G4OPENGLQTVIEWER_HH
35#define G4OPENGLQTVIEWER_HH
55class QContextMenuEvent;
75#if QT_VERSION < 0x050600
80class QTableWidgetItem;
89 typedef std::vector<PVNodeID>
PVPath;
97 virtual void DoneWithMasterThread ();
99 virtual void MovingToVisSubThread ();
101 virtual void SwitchToVisSubThread ();
103 virtual void DoneWithVisSubThread ();
107 virtual void SwitchToMasterThread ();
149 int currentPVPOIndex);
151 int currentPVPOIndex,
152 const std::string& modelDescription,
173 void moveScene(
float,
float,
float,
bool);
182 const std::vector<G4ModelingParameters::VisAttributesModifier>*
203 enum RECORDING_STEP {
WAIT,
START,
PAUSE,
CONTINUE,
STOP,
READY_TO_ENCODE,
ENCODING,
FAILED,
SUCCESS,
BAD_ENCODER,
BAD_OUTPUT,
BAD_TMP,
SAVE};
206 void createRadioAction(QAction *,QAction *,
const std::string&,
unsigned int a=1);
219 unsigned int fullPathIndex,
220 const QString& parentRoot,
221 unsigned int currentIndex,
222 int currentPVPOIndex);
233 const QString& logicalName,
234 Qt::CheckState state,
235 QTreeWidgetItem * treeNode,
263#ifdef G4MULTITHREADED
264 inline void SetQGLContextVisSubThread(QThread *th) {
265 fQGLContextVisSubThread = th;
267 inline void SetQGLContextMainThread(QThread *th) {
268 fQGLContextMainThread = th;
310#if QT_VERSION < 0x050e00
362#if QT_VERSION < 0x050600
385#ifdef G4MULTITHREADED
386 QThread* fQGLContextVisSubThread;
387 QThread* fQGLContextMainThread;
void toggleFullScreen(bool)
void toggleSurfaceAction(int)
QTreeWidgetItem * getOldTreeWidgetItem(int POindex)
void G4MouseReleaseEvent(QMouseEvent *evnt)
std::map< int, QTreeWidgetItem * >::const_iterator fOldLastSceneTreeWidgetAskForIteratorEnd
void showMovieParametersDialog()
QWidget * fUISceneTreeWidget
QTreeWidget * fSceneTreeComponentTreeWidget
void initMovieParameters()
void createSceneTreeWidget()
bool parseAndCheckVisibility(QTreeWidgetItem *treeNode, int POindex)
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
QString getProcessErrorMsg()
void changeSearchSelection()
std::map< int, QColor > fOldVisAttrColorMap
void changeColorAndTransparency(GLuint index, G4Color color)
QLineEdit * fFilterOutput
RECORDING_STEP fRecordingStep
bool isPVVolume(QTreeWidgetItem *item)
QPixmap * fTreeIconClosed
std::map< int, PVPath > fOldTreeItemModels
QTreeWidgetItem * createTreeWidgetItem(const PVPath &fullPath, const QString &name, int copyNb, int POIndex, const QString &logicalName, Qt::CheckState state, QTreeWidgetItem *treeNode, const G4Colour &color)
void rotateQtSceneToggle(float, float)
QAction * fMouseRotateAction
void G4MouseMoveEvent(QMouseEvent *event)
std::map< int, QTreeWidgetItem * >::const_iterator fLastSceneTreeWidgetAskForIteratorEnd
QScrollArea * fPickInfosScrollArea
void setCheckComponent(QTreeWidgetItem *item, bool check)
void tableWidgetViewerSetItemChanged(QTableWidgetItem *)
void G4keyPressEvent(QKeyEvent *event)
void updateViewerPropertiesTableWidget()
void addNonPVSceneTreeElement(const G4String &model, int currentPVPOIndex, const std::string &modelDescription, const G4Visible &visible)
void displayRecordingStatus()
G4AutoLock * lWaitForVisSubThreadQtOpenGLContextMoved
G4OpenGLQtViewer & operator=(const G4OpenGLQtViewer &)
QAction * fDrawingLineSurfaceRemoval
QSignalMapper * fSignalMapperPicking
QString getSaveFileName()
void actionMovieParameters()
void changeDepthInSceneTree(int)
void G4MousePressEvent(QMouseEvent *event)
void G4wheelEvent(QWheelEvent *event)
QString GetCommandParameterList(const G4UIcommand *aCommand)
void cloneSceneTree(QTreeWidgetItem *rootItem)
std::map< int, PVPath > fTreeItemModels
QAction * fMouseZoomOutAction
void G4MouseDoubleClickEvent()
QWidget * fSceneTreeWidget
QAction * fProjectionPerspective
bool fCheckSceneTreeComponentSignalLock
void updateSceneTreeWidget()
QString removeTempFolder()
QString getModelShortName(const G4String &modelShortName)
G4OpenGLQtViewer(G4OpenGLSceneHandler &scene)
void toggleSceneTreeComponentPickingCout(int)
QAction * fDrawingLineRemoval
bool isTouchableVisible(int POindex)
void moveScene(float, float, float, bool)
QWidget * fUIPickInfosWidget
void actionChangeDefaultColor()
unsigned int fSceneTreeDepth
void processLookForFinished()
QSignalMapper * fSignalMapperMouse
bool printPDF(const std::string, int, QImage)
QTreeWidgetItem * cloneWidgetItem(QTreeWidgetItem *item)
void rescaleImage(int, int)
G4OpenGLQtViewer(const G4OpenGLQtViewer &)
void G4manageContextMenuEvent(QContextMenuEvent *e)
QTreeWidgetItem * fModelShortNameItem
QTextEdit * fShortcutsDialogInfos
void processEncodeFinished()
QString fMovieTempFolderPath
G4Color fLastHighlightColor
std::map< int, QTreeWidgetItem * >::const_iterator fLastSceneTreeWidgetAskForIterator
QAction * fDrawingSurfaceRemoval
std::string parseSceneTreeElementAndSaveState(QTreeWidgetItem *item, unsigned int level)
std::vector< QTreeWidgetItem * > fOldNullPoIndexSceneTreeWidgetQuickVector
GLuint fLastHighlightName
QString getTempFolderPath()
QAction * fMousePickAction
void toggleMouseAction(int)
void changeOpenCloseVisibleHiddenSelectedColorSceneTreeElement(QTreeWidgetItem *subItem)
int fTreeWidgetInfosIgnoredCommands
void actionChangeTextColor()
QTableWidget * fViewerPropertiesTableWidget
bool fQGLWidgetInitialiseCompleted
void actionChangeBackgroundColor()
void rotateQtScene(float, float)
bool exportImage(std::string name="", int width=-1, int height=-1)
std::vector< PVNodeID > PVPath
void toggleProjection(bool)
void currentTabActivated(int)
QWidget * fPickInfosWidget
void updateToolbarAndMouseContextMenu()
std::map< int, QTreeWidgetItem * > fOldPositivePoIndexSceneTreeWidgetQuickMap
QDialog * fShortcutsDialog
void updateKeyModifierState(const Qt::KeyboardModifiers &)
void G4keyReleaseEvent(QKeyEvent *event)
void clearTreeWidgetElements(QTreeWidgetItem *item)
void clearSceneTreeSelection(QTreeWidgetItem *)
void sceneTreeComponentSelected()
G4Colour getColorForPoIndex(int poIndex)
void toggleHiddenMarkers(bool)
void setRecordingStatus(RECORDING_STEP)
void createRadioAction(QAction *, QAction *, const std::string &, unsigned int a=1)
void updatePositivePoIndexSceneTreeWidgetQuickMap(int POindex, QTreeWidgetItem *item)
void updatePickInfosWidget(int, int)
QAction * fMouseMoveAction
virtual ~G4OpenGLQtViewer()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void toggleAntialiasing(bool)
void DrawText(const G4Text &)
QWidget * fUIViewerPropertiesWidget
void createViewerPropertiesWidget()
QTreeWidgetItem * getTreeWidgetItem(int POindex)
QString setEncoderPath(QString path)
QString fTouchableVolumes
virtual void CreateMainWindow(QGLWidget *, const QString &)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
void toggleTransparency(bool)
QAction * fProjectionOrtho
bool fViewerPropertiesTableWidgetIsInit
void sceneTreeComponentItemChanged(QTreeWidgetItem *item, int id)
QSlider * fSceneTreeDepthSlider
QSignalMapper * fSignalMapperSurface
QPushButton * fSceneTreeButtonApply
QAction * fDrawingWireframe
G4OpenGLQtMovieDialog * fMovieParametersDialog
bool generateMpegEncoderParameters()
void processEncodeStdout()
QString createTempFolder()
QWidget * getParentWidget()
int fLastExportSliderValue
void setRecordingInfos(const QString &)
virtual void updateQWidget()=0
QString setSaveFileName(QString path)
void changeDepthOnSceneTreeItem(double lookForDepth, double currentDepth, QTreeWidgetItem *item)
QAction * fMouseZoomInAction
void addPVSceneTreeElement(const G4String &model, G4PhysicalVolumeModel *pPVModel, int currentPVPOIndex)
void changeQColorForTreeWidgetItem(QTreeWidgetItem *item, const QColor &)
void createSceneTreeComponent()
std::map< int, QTreeWidgetItem * > fPositivePoIndexSceneTreeWidgetQuickMap
const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const
std::string parseSceneTreeAndSaveState()
bool parseAndInsertInSceneTree(QTreeWidgetItem *, G4PhysicalVolumeModel *pPVModel, unsigned int fullPathIndex, const QString &parentRoot, unsigned int currentIndex, int currentPVPOIndex)
QString fParameterFileName
std::map< int, QTreeWidgetItem * >::const_iterator fOldLastSceneTreeWidgetAskForIterator
G4AutoLock * lWaitForVisSubThreadQtOpenGLContextInitialized
void createPickInfosWidget()
QString setTempFolderPath(QString path)
bool isSameSceneTreeElement(QTreeWidgetItem *parentOldItem, QTreeWidgetItem *parentNewItem)
void displaySceneTreeComponent()
const char * name(G4int ptype)