Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+8 -13
View File
@@ -1,19 +1,14 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4OpenGL
# Package: Geant4.src.G4visualization.G4OpenGL
#
# CMakeLists.txt for single level library that may be build global or granular
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
include(Geant4MacroLibraryTargets)
if(GEANT4_BUILD_GRANULAR_LIBS)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
else()
GEANT4_GLOBAL_LIBRARY_TARGET(COMPONENTS sources.cmake)
endif()
geant4_global_library_target(COMPONENTS sources.cmake)
if(GEANT4_USE_QT)
foreach(__target G4OpenGL G4OpenGL-static)
if(TARGET ${__target})
set_target_properties(${__target} PROPERTIES AUTOMOC 1)
endif()
endforeach()
endif()
+148 -116
View File
@@ -16,6 +16,38 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
19 June 2020 John Allison (opengl-V10-06-07)
- Fix Qt 5.15 deprecation warnings.
1st June 2020. Ben Morgan (opengl-V10-06-06)
- Use CMake AUTOMOC to automatically generate and compile Moc
sources
16th April 2020. Ben Morgan (opengl-V10-06-05)
- Remove Qt4 support
4th March 2020. John Allison (opengl-V10-06-04)
- G4OpenGLViewer::setExportFilename:
o Fix bug in /vis/ogl/export when dot in name.
13th February 2020. John Allison (opengl-V10-06-03)
- G4OpenGLViewerMessenger: /vis/ogl/ commands:
o Improved guidance.
o Place in alphabetical order.
o Tidy.
9th January 2020 Gabriele Cosmo (opengl-V10-06-02)
- Fixed deprecation warnings introduced with Qt-5.14.0 for use of
QTime::start()/elapsed() in favour of respectives in QElapsedTimer,
in G4OpenGLQtViewer.
13th December 2019 Ben Morgan (opengl-V10-06-01)
- Cleanup CMake build, removing obsolete granular library options and
explicit include_directories.
12th December 2019 Ben Morgan (opengl-V10-06-00)
- Remove no longer required dependence on OpenGLU
28 November 2019 Gabriele Cosmo (opengl-V10-05-18)
- Fixed QT_VERSION protection for use of screening function in
G4OpenGLQtViewer.
@@ -217,7 +249,7 @@ G4OpenGLQtViewer.cc: Change labels of picking points in pick info box
Remove unnecessary "#if GL_EXT_framebuffer_object"
- G4OpenGL.hh: Avoid the case where an XM and Qt OpenGL viewer came with both OpenGL from
XM and Qt
20th November 2016 John Allison (opengl-V10-02-24)
- G4OpenGLStoredViewer.cc: Removed check on previous colour in
DrawDisplayLists that was intended to avoid unnecessary calls
@@ -270,7 +302,7 @@ G4OpenGLQtViewer.cc: Change labels of picking points in pick info box
- Needs modeling-V10-02-13 and visman-V10-02-27
- Adapted to the move of Vis Attributes Modifiers back to G4ModelingParameters.
- G4OpenGLQtViewer:
o Added
o Added
// Flag to indicate that action was initiated by interaction (mouse
// click) on the scene tree. It is used and reset in
// G4OpenGLStoredQtViewer::CompareForKernelVisit to prevent rebuild
@@ -344,9 +376,9 @@ G4OpenGLQtViewer.cc: Change labels of picking points in pick info box
14th June 2016 John Allison (opengl-V10-02-07)
- G4OpenGLXmWindowHandlingCallbacks.cc: Commented out some code in
void G4OpenGLXmViewer::expose_callback (Widget w,
XtPointer clientData,
XtPointer)
void G4OpenGLXmViewer::expose_callback (Widget w,
XtPointer clientData,
XtPointer)
{ ...
//??????????????????????????? This might be a problem in MT mode.
// glXMakeCurrent (pView->dpy, XtWindow(pView->glxarea), pView->cxMaster);
@@ -414,9 +446,9 @@ G4OpenGLQtViewer.cc: Change labels of picking points in pick info box
o Added glXMakeCurrent(dpy,win,cxMaster) to G4OpenGLXViewer::SetView.
11th December 2015 Laurent Garnier
- G4OpenGLQtViewer: Add the "F" key to test flytrough
- G4OpenGLQtViewer: Add the "F" key to test flytrough
- G4OpenGLViewer: Fix a problem in picking, does not clean correctly
an outupt stream buffer
an outupt stream buffer
5th November 2015 Laurent Garnier (opengl-V10-01-13)
- G4OpenGLViewer: Fix warning with VC14
@@ -497,9 +529,9 @@ G4OpenGLQtViewer.cc: Change labels of picking points in pick info box
"G4OpenGLViewer.cc(1445): error C2059: syntax error : ')' [D:\build\"
15th December 2014 Laurent Garnier (opengl-V10-01-00)
- G4OpenGLViewer,
G4OpenGLImmediateSceneHandler,
G4OpenGLStoredSceneHandler,
- G4OpenGLViewer,
G4OpenGLImmediateSceneHandler,
G4OpenGLStoredSceneHandler,
G4OpenGLStoredViewer,
G4OpenGLViewer.cc :
Fix a problem when zooming on small volumes. The glOrtho function has some problems with
@@ -540,11 +572,11 @@ namespace {
o Avoid repainting problems by disable recursive repaints (from last commit)
20th November 2014 Laurent Garnier (opengl-V10-00-26)
- G4OpenGLVboDrawer:
- G4OpenGLVboDrawer:
o Fix a compilation issue with Wt driver
- G4OpenGLStoredQtViewer/G4OpenGLImmediatedQtViewer :
o Avoid recursive repaints
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Fix some minor GUI visual issues
19th November 2014 Laurent Garnier (opengl-V10-00-25)
@@ -552,7 +584,7 @@ namespace {
from an external application
18th November 2014 Laurent Garnier (opengl-V10-00-24)
- G4OpenGLQtViewer: Fix JIRA DEV-173 about using external application
- G4OpenGLQtViewer: Fix JIRA DEV-173 about using external application
8th November 2014 John Allison (vis-MT-branch-00-opengl-08)
- Merged trunk again. (Just History.)
@@ -572,7 +604,7 @@ namespace {
o Fix the "invalid drawable" warning in Qt
o Set the scene tree / viewer properties / picking open at the beggining
o Move "search" at the top of scene tree component
o Fix a problem with Picking composant, it was impossible to disable it.
o Fix a problem with Picking composant, it was impossible to disable it.
o Add viewer properties and picking for Immediate mode
o Fix a possible problem for fSceneHandler.GetScene()
o Hide picking infos at the beggining
@@ -592,7 +624,7 @@ namespace {
o Fix warnings
- G4OpenGLViewer :
o Add ClearViewWithoutFlush() function
- G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer :
- G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer :
o Add a protection in case vis is called in another thread than main thread
- G4OpenGLStoredQtViewer:
o Fix ugly window at beginning
@@ -611,7 +643,7 @@ G4OpenGLWtViewer
o Added a comment for possible future attention.
5th November 2014 Laurent Garnier
- G4OpenGLQtViewer:
- G4OpenGLQtViewer:
o Rename fWindow by fGLWidget and avoid problems for users using an external
Qt Application (and external Main Window)
o Remove resizing GLwidget *before* it was attached in the ui. This will prevent
@@ -624,7 +656,7 @@ G4OpenGLWtViewer
- Merged vis-V10-00-11 and tagged.
5th November 2014 Laurent Garnier
- G4OpenGLQtViewer:
- G4OpenGLQtViewer:
o Rename fWindow by fGLWidget and avoid problems for users using an external
Qt Application (and external Main Window)
o Remove resizing GLwidget *before* it was attached in the ui. This will prevent
@@ -649,14 +681,14 @@ G4OpenGLQtViewer:
o Fix a problem with Wt include names on case sensitive systems
29th October 2014 Laurent Garnier
- G4OpenGLViewer :
- G4OpenGLViewer :
o Add a ClearView without flush function
- G4OpenGLStoreQtViewer :
- G4OpenGLStoreQtViewer :
o Add a lock to prevent recursive updates
o Implements ClearView in order to force a redraw (updateGL())
28th October 2014 Laurent Garnier
- G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer : Prevent from calling redrawing
- G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer : Prevent from calling redrawing
scene inside a Vis Thread
27th October 2014 Laurent Garnier
@@ -686,7 +718,7 @@ G4OpenGLQtViewer:
- G4OpenGLQtViewer, G4OpenGLStoredQtViewer, G4OpenGLImmediateQtViewer :
o Rename fReadyToPaint to fQGLWidgetInitialiseCompleted
o Rename fIsRepainting to fPaintEventLock
- G4OpenGLSceneHandler :
- G4OpenGLSceneHandler :
o Change specific things from Wt viewers to all OpenGL2
- Rename G4OpenGLVBOViewer files to G4OpenGLVboDrawer
- G4OpenGLViewer
@@ -719,25 +751,25 @@ G4OpenGLQtViewer:
28th August 2014 Laurent Garnier
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer :
o Rename to avoid confusion :
- fIsRepainting -> fPaintEventLock : Could not have another paintEvent() inside
- fIsRepainting -> fPaintEventLock : Could not have another paintEvent() inside
a PaintEvent()
- fReadyToPaint -> fQGLWidgetInitialiseCompleted : Wait for complete Initialization
before drawing anything
o Call ClearViewWithoutFlush() instead of ClearView() : Avoid a unnecessary flush()
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Do not trigger a resizeEvent before adding viewer to the MDIArea
o FinishView() : Nothing to do (instead of a glFlush() )
- G4OpenGLStoredQtViewer :
- G4OpenGLStoredQtViewer :
o Remove makeCurrent() at beginning of Initialie(), not useful
o Remove setVisible() in InitializedGL() : do not set this component visible until
o Remove setVisible() in InitializedGL() : do not set this component visible until
it is totally realized
(normally done by G4UIQt::AddTab() )
o Remove sendPostedEvents () in InitializedGL() : Not useful and cause the mainWindow
o Remove sendPostedEvents () in InitializedGL() : Not useful and cause the mainWindow
to be redraw before the session_start()
o Remove makeCurrent() in ComputeView ()
o Remove makeCurrent() in ComputeView ()
o Call ClearViewWithoutFlush() instead of ClearView() : Avoid a unnecessary flush()
o In ResizeGL() : Now call the Clear-Set-Draw sequence
o Move half of painGL() in paintEvent(). The paintGL() function now does only the
o Move half of painGL() in paintEvent(). The paintGL() function now does only the
Set-Clear-Compute sequence.
o showEvent() does now only repaint visible windows
o Remove glFlush() in DrawView(). Avoid flickering
@@ -753,7 +785,7 @@ G4OpenGLQtViewer:
- G4OpenGLQtViewer : Fix a compiler warning
4rd August 2014 Laurent Garnier
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer, G4OpenGLQtViewer :
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer, G4OpenGLQtViewer :
o Add a keyReleaseEvent() method
o Allow rotation/move during picking
- G4OpenGLQtViewer :
@@ -769,10 +801,10 @@ G4OpenGLQtViewer:
30th July 2014 Laurent Garnier (opengl-V10-00-14)
- G4OpenGLImmediateQtViewer/G4OpenGLStoredQtViewer :
o Add the "event" parameter to "mouseReleaseEvent" method
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Move picking event from "mouse click" to "mouse release" function
o Fix a compilation problem with std::to_string
- G4OpenGLViewer :
- G4OpenGLViewer :
o Fix a compilation problem with std::to_string
30th July 2014 Laurent Garnier (opengl-V10-00-13)
@@ -794,28 +826,28 @@ G4OpenGLQtViewer:
o Beginning of changing color of a picking item (need to be improved)
o Some renaming on signalMapper parameters
o Fix a bug : Previously when changing cursor to "Pick" on context menu, nothing was done.
o Change picking effect, instead of displaying in G4Cout, will now display all picking infos
o Change picking effect, instead of displaying in G4Cout, will now display all picking infos
separate by "hit number" in another widget inside the scene browser
o New method "changeColorAndTransparency" to be able to change color and transparency on a PO index
- G4OpenGLViewer :
- G4OpenGLViewer :
o Add a "fIsGettingPickInfos" parameter to avoid problems
o Split "Pick" function in 2 parts : "Pick" and "GetPickDetails"
o Add a inner class "G4OpenGLViewerPickMap"
7nd July 2014 Laurent Garnier (opengl-V10-00-11)
- G4OpenGLViewer :
- G4OpenGLViewer :
o Fix a warning
7nd July 2014 Laurent Garnier (opengl-V10-00-10)
- G4OpenGLViewer :
- G4OpenGLViewer :
o Replace deprecated gluLookAt by g4GluLookAt
2nd July 2014 Laurent Garnier (opengl-V10-00-09)
- G4OpenGLQtExportDialog : Remove unused functions
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Remove unused functions
o Factorisation of Qt save function and OGL save functions.
- G4OpenGLViewer :
- G4OpenGLViewer :
o Move to private members from static members "fPrintSizeX", "fPrintSizeY", "fPrintFilename" and "fPrintFilenameIndex"
o Change default export format to "pdf" instead of "eps"
o Change default export name to "G4OpenGL-XXXX" where XXXX is the viewer_name
@@ -839,18 +871,18 @@ G4OpenGLQtViewer:
o /vis/ogl/export
30th June 2014 Michael Kelsey
- G4OpenGLQtViewer: Change QPixmap objects to be pointers; fixes fatal
- G4OpenGLQtViewer: Change QPixmap objects to be pointers; fixes fatal
problem creating viewer in "batch" application without interactive GUI.
6th June 2014 Laurent Garnier (opengl-V10-00-08)
- G4OpenGLQtViewer: Fix a problem in viewer/set parameters
5th June 2014 Laurent Garnier (opengl-V10-00-07)
- G4OpenGLStoredSceneHandler : Split AddPrimitivePreamble() in 3 functions to avoid
- G4OpenGLStoredSceneHandler : Split AddPrimitivePreamble() in 3 functions to avoid
dynamic_cast (+20% faster in drawing)
5th June 2014 Laurent Garnier (opengl-V10-00-06 co-works interfaces-V10-00-05)
- G4OpenGLQtViewer:
- G4OpenGLQtViewer:
o Improve Viewer parameters info panel
o Fix problem with /vis/viewer/set/ "auxiliaryEdge"/"defaultTextColour"/"globalLineWidthScale"
o Implement missing commands : "edge", "lightsThetaPhi", "upVector", "viewpointVector"
@@ -858,7 +890,7 @@ G4OpenGLQtViewer:
o Add feedback for Viewer parameters info panel
3rd June 2014 Laurent Garnier
- G4OpenGLQtViewer:
- G4OpenGLQtViewer:
o Hide Viewer parameters under a widget at the bottom of the Viewer panel
o Most of viewer/set parameters are now implemented. Still missing :
"culling", "edge", "lightsThetaPhi", "upVector", "viewpointVector"
@@ -883,15 +915,15 @@ G4OpenGLQtViewer:
- Moved G4VisFeaturesOfOpenGL from management sub-category.
5th May 2014 Laurent Garnier (opengl-V10-00-04)
- G4OpenGLQtViewer : Fix a bug in Picking in Qt viewer. A G4cout was missing in order
- G4OpenGLQtViewer : Fix a bug in Picking in Qt viewer. A G4cout was missing in order
to see picked informations
23th April 2014 Laurent Garnier (opengl-V10-00-03)
- G4OpenGL.hh: Fix bugzilla #1618 : for a Linux user, compiling Geant4 with only
- G4OpenGL.hh: Fix bugzilla #1618 : for a Linux user, compiling Geant4 with only
Qt driver will failed because of missing glu.h.
18th April 2014 Laurent Garnier
- G4OpenGLImmediateSceneHandler: Split AddPrimitivePreamble() in 3 functions to avoid
- G4OpenGLImmediateSceneHandler: Split AddPrimitivePreamble() in 3 functions to avoid
dynamic_cast (+20% faster in drawing)
17th April 2014 Laurent Garnier
@@ -900,7 +932,7 @@ G4OpenGLQtViewer:
viewer
10th April 2014 Laurent Garnier (opengl-V10-00-02)
- G4OpenGLQtViewer : Add changing the color of text in DrawText()
- G4OpenGLQtViewer : Add changing the color of text in DrawText()
- G4OpenGLViewer : manage bad file name case (missing directory) in printGl2PS()
5th February 2014 Laurent Garnier
@@ -926,9 +958,9 @@ G4OpenGLQtViewer:
- G4OpenGLStoredQtViewer.cc
o Fix (a part of) the picking problem (JIRA-DEV113)
o Fix a potentiel problem with freezing OGL window with Qt driver
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Better size handling at start
- G4OpenGLViewer :
- G4OpenGLViewer :
o Prepare picking in order to display additional information on viewer (and not
in G4cout)
@@ -936,7 +968,7 @@ G4OpenGLQtViewer:
- G4OpenGLQtViewer : Fix a bug with endsWith that I have introduce in last revision
20th November 2013 Laurent Garnier (opengl-V09-06-11)
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o When saving file in Qt the extention was always append. Now it is done only when it is
not present
o Add a variable to remember last used settings for image type and target directory
@@ -944,11 +976,11 @@ G4OpenGLQtViewer:
o Add another protection against iterator outside of std::map
19th November 2013 Laurent Garnier (opengl-V09-06-10)
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Best fix for JIRA DEV-62, thanks John.
19th November 2013 Laurent Garnier
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Remove a printf without #ifdef
o Fix a bug in the sceneTree viewer (probably JIRA DEV-62). A std::map iterator
was incremented without checking if it going outside the std::map or not.
@@ -978,15 +1010,15 @@ G4OpenGLQtViewer:
- G4OpenGLSceneHandler : Better emulation of GL_QUADS (and optimization)
30th October 2013 Laurent Garnier
- G4OpenGLViewer.hh, G4OpenGLSceneHandler.hh :
o Add a setWtDrawer function to set the Wt drawer only when the
- G4OpenGLViewer.hh, G4OpenGLSceneHandler.hh :
o Add a setWtDrawer function to set the Wt drawer only when the
OpenGLImmediateWtViewer is build
o Move a lot of OpenGL2 functions and attributes from OpenGLImmediateWtViewer
to be generic for all OpenGL drivers
- G4OpenGLImmediateWtViewer :
- G4OpenGLImmediateWtViewer :
o Move a lot of OpenGL2 functions and attributes from OpenGLImmediateWtViewer
to be generic for all OpenGL drivers
o At initialization, now set the WtDrawer for the OpenGLViewer and the SceneHandler
o At initialization, now set the WtDrawer for the OpenGLViewer and the SceneHandler
- G4OpenGLImmediateWt : Get rid of an include that could be done in a next step
- G4OpenGLWtDrawer : Add more methods for OpenGL
- G4OpenGLSceneHandler : Add some debug statements (WILL HAVE TO BE REMOVED)
@@ -997,12 +1029,12 @@ G4OpenGLQtViewer:
Wt OpenGL functions. They are only member functions of the WGLWidget because
they have to be redefined to javascript commands to be send to all browsers
using the applications. In term of changes in OpenGL library, this only one
is the introduction of a G4OpenGLWtDrawer which is used to map static GL
is the introduction of a G4OpenGLWtDrawer which is used to map static GL
functions into member functions of WGLWidget object :
o G4OpenGLViewer : Introduction of a pointer to to WtDrawer
o G4OpenGL.hh : Include G4OpenGLWtDrawer
- Other changes in Wt component :
o G4OpenGLImmediateWtViewer : Add methods to handle transformations on
o G4OpenGLImmediateWtViewer : Add methods to handle transformations on
vertex position
- sources.cmake : Add G4OpenGLWtDrawer support
- Beginning of OpenGL >1.1 implementation : Alternative for glBegin/glEnd calls
@@ -1076,8 +1108,8 @@ G4OpenGLQtViewer:
- Improvments about Wt driver configuration
25th April 2013 Laurent Garnier
- Add cmake configuration for Wt and Qt5,
check in the code : "!!! ONLY QT4 to be comment with QT5"
- Add cmake configuration for Wt and Qt5,
check in the code : "!!! ONLY QT4 to be comment with QT5"
- G4OpenGLQtViewer.cc : Add Qt5 support
26th March 2013 John Allison (opengl-V09-06-04)
@@ -1104,7 +1136,7 @@ G4OpenGLQtViewer:
13th November 2012 Laurent Garnier (opengl-V09-05-53)
- G4OpenGLQtViewer
o Fix bug #1385 on Linux at launch. Mouse context try to change before it is initialize.
No problem for Mac OS X
No problem for Mac OS X
2nd November 2012 John Allison (opengl-V09-05-52)
- G4OpenGLImmediateQtViewer,G4OpenGLStoredQtViewer :
@@ -1133,8 +1165,8 @@ G4OpenGLQtViewer:
29th October 2012 John Allison
- G4OpenGLViewer: The following data members have been made static with the
following initial values, modifiable by: "/vis/ogl/set/printSize",
"/vis/ogl/set/printFilename" and used by "/vis/ogl/printEPS", and thus
following initial values, modifiable by: "/vis/ogl/set/printSize",
"/vis/ogl/set/printFilename" and used by "/vis/ogl/printEPS", and thus
are used by all OGL viewers. fPrintFilenameIndex is initialised to zero
and counts on for *all* viewers.
G4int G4OpenGLViewer::fPrintSizeX = -1;
@@ -1143,7 +1175,7 @@ G4OpenGLQtViewer:
int G4OpenGLViewer::fPrintFilenameIndex = 0;
29th October 2012 Laurent Garnier
- G4OpenGLQtViewer : Comment out a method and fix a printing caracter non desired
- G4OpenGLQtViewer : Comment out a method and fix a printing caracter non desired
27th October 2012 John Allison (opengl-V09-05-48, needs visman-V09-05-43)
- Finally solved problem of batch v. non-Qt session!!!
@@ -1202,7 +1234,7 @@ interfaces-V09-05-20)
- G4OpenGLQtViewer:
o Introduced some trial code for capturing touchable colour changes.
o Changed values to references where possible.
12th October 2012 Laurent Garnier
- G4OpenGLStoredQt/G4OpenGLImmediateQt:
o Improve instantiation of G4UIQt in all G4VInteractiveSession mode case
@@ -1217,12 +1249,12 @@ interfaces-V09-05-20)
9th October 2012 John Allison
- G4OpenGLSceneHandler::AddPrimitive(const G4Polymarker& polymarker):
o Removed glEnable(GL_BLEND) and glBlendFunc(…). They are in
o Removed glEnable(GL_BLEND) and glBlendFunc(…). They are in
G4OpenGLViewer::InitializeGLView, which is, I think, all it needs.
9th October 2012 Laurent Garnier (opengl-V09-05-46, co-works interfaces-V09-05-19)
- G4OpenGLQtViewer/G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer :
o Change mapping of context menu/icon in order to get all working together.
- G4OpenGLQtViewer/G4OpenGLStoredQtViewer/G4OpenGLImmediateQtViewer :
o Change mapping of context menu/icon in order to get all working together.
Now a click on an icon will change the mouse context menu.
7th October 2012 John Allison
@@ -1305,7 +1337,7 @@ interfaces-V09-05-20)
this code has been moved to AddPrimitivePreAmble.
27th September 2012 John Allison (opengl-V09-05-38)
- G4OpenGLStoredSceneHandler,
- G4OpenGLStoredSceneHandler,
o Minor name changes to improve readability.
o Added #include <typeinfo> to fix compiler warnings on Linux.
- G4OpenGLStoredViewer:
@@ -1336,7 +1368,7 @@ interfaces-V09-05-20)
- Tagged for system testing.
25th September 2012 Laurent Garnier
- G4OpenGLQtViewer : Fix a bug with setting color when changing vis parameters
- G4OpenGLQtViewer : Fix a bug with setting color when changing vis parameters
not taken in account
25th September 2012 John Allison (opengl-V09-05-35)
@@ -1402,7 +1434,7 @@ interfaces-V09-05-20)
o Implement Zoom In/Out function, now it zoom on a specific point
11th August 2012 Laurent Garnier
- G4OpenGLQtViewer.cc/G4OpenGLStoredQtViewer:
- G4OpenGLQtViewer.cc/G4OpenGLStoredQtViewer:
o Remove /vis/viewer/select command when changing transparency
o Fixed compilation warning
o Beginning of removing /vis/geometry/set/colour commands
@@ -1433,7 +1465,7 @@ interfaces-V09-05-20)
- G4OpenGLQtViewer.cc :
o Do not apply changes to other viewer when moving scene tree slider
o Fix a problem on scene tree with non touchable volumes
19th July 2012 John Allison
- G4OpenGLStored/ImmediateSceneHandler.cc:
o Disabled GL_DEPTH_TEST and GL_LIGHTING for 2D objects, but see...
@@ -1459,7 +1491,7 @@ interfaces-V09-05-20)
o Fix text alignement problem
16th July 2012 Laurent Garnier
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Bug fix for transparent objects in scene tree
o Bug fix when closing a viewer on scene tree
o bug fix when playing with scene tree and active tab was an immediate viewer
@@ -1475,12 +1507,12 @@ interfaces-V09-05-20)
o Now may be used by all and any driver.
13th July 2012 Laurent Garnier
- G4OpenGLQtViewer : Updates in Scene tree viewer algorithm
- G4OpenGLQtViewer : Updates in Scene tree viewer algorithm
(speedup and fix transparency bug of 11th July).
11th July 2012 Laurent Garnier (opengl-V09-05-25 co-works interfaces-V09-05-08)
- G4OpenGLStoredQtSceneHandler.cc, G4OpenGLStoredQtViewer.cc : change/rename fonction
- G4OpenGLQtViewer :
- G4OpenGLQtViewer :
o Change Scene tree viewer algorithm (still some bug in tree on transparent objects)
o Move scene tree layout to "interfaces", this fix a "bad layout problem"
some tags ago
@@ -1554,7 +1586,7 @@ interfaces-V09-05-20)
- Implemented proper treatment of transparency in OpenGL stored mode
in the case that trajectories passed through or behind transparent
persistent objects (detector components). Required proper ordering
of display list execution.
of display list execution.
- G4OpenGLStoredViewer::DrawDisplayLists:
o Now does two passes for a proper treatment of transparency.
- G4OpenGLStoredSceneHandler:
@@ -1606,7 +1638,7 @@ interfaces-V09-05-20)
o Fix a bug on MacOS French keyboard for Plus key on viewer
o Resolve problem on transparency in scene tree by sorting items instead
of by PO index (what was done before)
o Also check transformation in adding scene tree elements
o Also check transformation in adding scene tree elements
o Add a depth slider (in test)
27rd April 2012 Laurent Garnier
@@ -1646,12 +1678,12 @@ interfaces-V09-05-20)
- G4OpenGLXm classes: Change G4Exception id to opengl20xx.
3rd April 2012 Laurent Garnier
- G4OpenGLQtViewer & G4OpenGLQtSceneHandler : rewriting methods to add a
- G4OpenGLQtViewer & G4OpenGLQtSceneHandler : rewriting methods to add a
PV or non P volume in the tree viewer
2nd April 2012 Laurent Garnier (opengl-V09-05-09)
- Add some #ifdef around debugging printf
30th March 2012 John Allison
- G4OpenGLStoredSceneHandler.cc: In EndModeling, make sure screen
corresponds to graphical database.
@@ -1661,7 +1693,7 @@ interfaces-V09-05-20)
29th March 2012 Laurent Garnier
- G4OpenGLQtViewer : Add setHiddenMarker On/Off context menu
- G4OpenGLStoredQtSceneHandler: Add SetScene to clear Qt tree in
- G4OpenGLStoredQtSceneHandler: Add SetScene to clear Qt tree in
case of scene change
- G4OpenGLStoredSceneHandler.cc: In EndModeling instead of COMPILE_AND_EXECUTE
just COMPILE
@@ -1696,7 +1728,7 @@ interfaces-V09-05-20)
- G4OpenGLQtViewer.cc: fix a problem in max frame per second on little scenes
20th February 2012 Laurent Garnier
- G4OpenGLStoredViewer.cc : OpenGL optimisation. Small thing, but 50%
- G4OpenGLStoredViewer.cc : OpenGL optimisation. Small thing, but 50%
faster when rotating
14th February 2012 John Allison (opengl-V09-05-05)
@@ -1789,7 +1821,7 @@ interfaces-V09-05-20)
- G4OpenGLStoredQtSceneHandler : Add ProcessText method
- G4OpenGLStoredViewer : Remove DrawOutOfDisplayLists method (moved in G4OpenGLStoredViewerQt)
- G4OpenGLStoredQtViewer : Add DrawOutOfDisplayLists method
13th January 2012 John Allison (opengl-V09-05-02)
- Tagged.
@@ -1842,8 +1874,8 @@ interfaces-V09-05-20)
30th November 2011 Ben Morgan (opengl-V09-04-27)
- sources.cmake : Ensure that Motif libraries appear before X11 libraries in
link line. Prevents item 321 in the Motif FAQ regarding "non-widget child
"dsm"' errors.
link line. Prevents item 321 in the Motif FAQ regarding "non-widget child
"dsm"' errors.
29th November 2011 Ben Morgan (opengl-V09-04-26)
- sources.cmake : Ensure that G4OpenGLXViewer is built when
@@ -1906,7 +1938,7 @@ interfaces-V09-05-20)
- G4OpenGLQtViewer : Add label on tree
5st November 2011 Laurent Garnier
- Fix compiler warnings in
- Fix compiler warnings in
o src/G4OpenGLStoredQtViewer.cc
o include/G4OpenGLStoredSceneHandler.hh
o include/G4OpenGLStoredViewer.hh
@@ -1914,16 +1946,16 @@ interfaces-V09-05-20)
5st November 2011 Joseph Perl (opengl-V09-04-17)
- sources.cmake needs G4OpenGLStoredQtSceneHandler
5st November 2011 Laurent Garnier
5st November 2011 Laurent Garnier
- G4OpenGLQtViewer/ G4StoredQtViewer : Begin work for changing tree when changing tab
4st November 2011 Laurent Garnier
4st November 2011 Laurent Garnier
- G4OpenGLQtViewer : Improvments on touchable tree viewer
- Add files :
- Add files :
o G4OpenGLStoredQtSceneHandler.hh
o G4OpenGLStoredQtSceneHandler.cc
4st November 2011 Laurent Garnier
4st November 2011 Laurent Garnier
- G4OpenGLStoreViewer/ G4OpenGLStoreQtViewer : Add methods POSelected/TOSelected (John)
- G4OpenGLQtViewer :
o Add method to manipulate tree volume
@@ -1959,7 +1991,7 @@ interfaces-V09-05-20)
o Change name of drawGl2psText in DrawText in order to be able to
Draw gl2ps text even on viewers where no 2D text is implemented
- Fix problem with marker size on gl2ps
o G4OpenGLViewer : Add two methods ChangePointSize and ChangeLineWidth
o G4OpenGLViewer : Add two methods ChangePointSize and ChangeLineWidth
21st October 2011 Laurent Garnier
- G4OpenGLXViewer : move text positioning in SceneHandler (factorising)
@@ -1974,7 +2006,7 @@ interfaces-V09-05-20)
- G4OpenGLViewer : Fix missing text after printEPS in Immediate mode (need visexternal-V09-04-02 )
20th October 2011 Laurent Garnier
- G4OpenGLViewer
- G4OpenGLViewer
o automaticaly extend gl2ps buffer size if needed
o Add some error messages
@@ -2022,7 +2054,7 @@ interfaces-V09-05-20)
into .hh files. Call ResetView at beggining to set parameters
13th October 2011 John Allison
- G4OpenGLSceneHandler:
- G4OpenGLSceneHandler:
o Introduced ScaledFlush to flush after every 100 primitives.
- G4OpenGLStoredSceneHandler:
o Re-engineered to use ScaledFlush in EndPrimitives. It was in
@@ -2148,7 +2180,7 @@ interfaces-V09-05-20)
- G4OpenGLViewer.cc: Fixed Coverity warning
13th April, 2011 L. Garnier
- G4OpenGLQtViewer, G4OpenGLStoreQtViewer, G4OpenGLQtMovieDialog: Fix some potentiel problems
- G4OpenGLQtViewer, G4OpenGLStoreQtViewer, G4OpenGLQtMovieDialog: Fix some potentiel problems
with other Signal/Slot systems (boost)
11th April, 2011 L. Garnier
@@ -2164,10 +2196,10 @@ interfaces-V09-05-20)
- Get rid of old Qt3 code
1st March 2011 Laurent Garnier
- Fix Xm OpenGL inclusion problem by invert moving GL include at the beginning
- Fix Xm OpenGL inclusion problem by invert moving GL include at the beginning
23st February 2011 Laurent Garnier
- Replace mpeg_encoder by ppmtompeg
- Replace mpeg_encoder by ppmtompeg
10th January 2011 Laurent Garnier
- Try to fix mix between GL include from X11 and GL include from Qt (APPLE stuff)
@@ -2311,7 +2343,7 @@ interfaces-V09-05-20)
9th March 2010 Laurent Garnier
- G4OpenGLViewer : Fix clipping when resizing non square size windows
Remove error message when no scene present.
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer :
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer :
- Add some protections if viewer is in tab
- fix some redraw probems when focus was outside frame
- Add ShowView() and paintEvent() methods
@@ -2342,7 +2374,7 @@ interfaces-V09-05-20)
- Tagged for system testing.
3rd November 2009 Laurent Garnier
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer : Protec Qt4 method
- G4OpenGLImmediateQtViewer, G4OpenGLStoredQtViewer : Protec Qt4 method
introduce 13rd october 09 by ifdef
3rd November 2009 John Allison
@@ -2359,12 +2391,12 @@ interfaces-V09-05-20)
- G4OpenGLViewer.cc : Fix a problem with printing. On mac OSX version
> 10.5.7? or Ubuntu > 9.04? AND with user account configure in french
(or canadian I believe), the decimal point character was defined by
"," (see LC_NUMERIC). This cause a problem on reading eps files.
Changed "," to "."
"," (see LC_NUMERIC). This cause a problem on reading eps files.
Changed "," to "."
13 October 2009 Laurent Garnier
- G4OpenGLImmediateQtViewer/StoredQtViewer : some cleaning
- G4OpenGLImmediateQtViewer : Remove picking to true at initialisation
- G4OpenGLImmediateQtViewer : Remove picking to true at initialisation
- G4OpenGLQtViewer.cc : Fix a redraw problem on mac OS X 10.6
- G4OpenGLStoreQtViewer.cc,G4OpenGLImmediateQtViewer.cc : Fix width()
and height() problem on mac OS X 10.6
@@ -2373,15 +2405,15 @@ interfaces-V09-05-20)
- Tagged.
18 August 2009 Laurent Garnier
- G4OpenGLXmViewer : Fix a wrong initialization introduce by the
- G4OpenGLXmViewer : Fix a wrong initialization introduce by the
new way of handling window size hints (January 2009)
29 July 2009, Laurent Garnier
- G4OpenGLQtViewer : Ensure the GL frame size will be correct
by setting a 0 size margin around
by setting a 0 size margin around
27 July 2009, Laurent Garnier
- G4OpenGLStoredQtViewer : Remove picking to true at initialisation
- G4OpenGLStoredQtViewer : Remove picking to true at initialisation
20 May 2009, Laurent Garnier (opengl-V09-02-06)
- Fixed compilation errors on WIN32-VC for WIN32 specific drivers.
@@ -2414,12 +2446,12 @@ interfaces-V09-05-20)
not elegant to use "if...else if...else" structure.)
28th April 2009, Laurent Garnier
- G4OpenGLXViewer,G4OpenGLViewer : End of moving printEPS and associated
functions from GLXViewer to GLViewer.
- G4OpenGLXViewer,G4OpenGLViewer : End of moving printEPS and associated
functions from GLXViewer to GLViewer.
- G4OpenGLXViewer :
- Remove debug methods
- Add check in SetView() method
- G4OpenGLViewer : Add a glReadBuffer before glReadPixel in grabPixel method
- G4OpenGLViewer : Add a glReadBuffer before glReadPixel in grabPixel method
8th April 2009, Laurent Garnier
- G4OpenGLBitmapStore.hh : BugFix correction for windows (introduce 2nd February ?)
@@ -2428,9 +2460,9 @@ interfaces-V09-05-20)
- G4OpenGLImmediateXmViewer.cc, G4OpenGLStoredViewer.cc, G4OpenGLStoredXmViewer.cc,
G4OpenGLStoredXViewer.cc, G4OpenGLViewer.cc : Add debug messages
- G4OpenGLStoredXmViewer.cc,G4OpenGLStoredXViewer.cc, G4OpenGLStoredWin32Viewer.cc :
- Add a DrawDisplay list in case of KernelVisit=1 and nothing new to display.
- Add a DrawDisplay list in case of KernelVisit=1 and nothing new to display.
- Add a flush at the end of the view.
- G4OpenGLViewer.cc :
- G4OpenGLViewer.cc :
- Improve the fix and resizing when X/Y size was even (lack of precision
in a /2)
- Set line/point size at a default size when printing.
@@ -2457,7 +2489,7 @@ interfaces-V09-05-20)
- G4OpenGLQtViewer:
- Suppress some warnings when saving file
- Changing size is now allowed when saving (to save with better resolution than screen size)
- G4OpenGLViewer:
- G4OpenGLViewer:
- Some renaming for print methods to be more clear about Vectored and non Vectored
- Now using Gl2PS method to do PS (changes also in G4OpenGLXViewer and G4OpenGLQtViewer)
- Suppress unuseful printX methods (heritated form XViewer)
@@ -2471,7 +2503,7 @@ interfaces-V09-05-20)
16 February 2009, Laurent Garnier
- Modifications in GNUMakefile for gl2ps.
- G4OpenGLViewer,G4OpenGLViewerMessenger.cc,G4OpenGLXmMainMenubarCallbacks.cc
,G4OpenGLXmViewer.cc modified for gl2ps and some renaming "print" in
,G4OpenGLXmViewer.cc modified for gl2ps and some renaming "print" in
"printVectoredEPS"
2nd February 2009 Laurent Garnier
@@ -2493,7 +2525,7 @@ interfaces-V09-05-20)
G4OpenGLImmediateXViewer, G4OpenGLStoredXViewer, G4OpenGLXViewer,
G4OpenGLXmWindowHandlingCallbacks,
G4OpenGLImmediateQtViewer.cc, G4OpenGLStoredQtViewer, G4OpenGLQtViewer
G4OpenGLImmediateWin32Viewer.cc, G4OpenGLStoredWin32Viewer, G4OpenGLWin32Viewer
G4OpenGLImmediateWin32Viewer.cc, G4OpenGLStoredWin32Viewer, G4OpenGLWin32Viewer
-> Replace WinSize by fWinSize and some improvments about size initialization
- G4OpenGLQtViewer.hh : Suppress WinSize private variable
@@ -2526,7 +2558,7 @@ interfaces-V09-05-20)
- Add mouse wheel zoom commands
28th April 2008 Laurent Garnier
- Add better moc control/compilation step in GNUmakefile
- Add better moc control/compilation step in GNUmakefile
- Fix a problem when launching QT VIS without QT UI (N02 for example)
28th April 2008 John Allison (opengl-V09-01-02)
@@ -2560,17 +2592,17 @@ interfaces-V09-05-20)
15th January 2008, Laurent Garnier
- Fixed some layout problems on export dialog box
- Some improvements on exports formats
- Fix a bug in the help command : The clic callback on a item was not
- Fix a bug in the help command : The clic callback on a item was not
working on windows
- Fix a crash at exit when launched on a MAC.
- EPS export format is now ready for Qt3
- Add Vectoriel EPS export format
- Fix an aspect ratio deformation when resize the widget
- Fix a crash at launch with leopard
- When selecting the "move" mouse action, this action was set even when
- Fix a crash at launch with leopard
- When selecting the "move" mouse action, this action was set even when
mouse button was released. Fixed : Now we should clic to have the move action
- GNUmakefile : Added a macro for moc file
- Moc files : Suppression of all theses files. They are now autogenerated
- Moc files : Suppression of all theses files. They are now autogenerated
thanks to config/common.gmk
4th January 2008 John Allison (opengl-V09-01-00)
@@ -2740,7 +2772,7 @@ interfaces-V09-05-20)
o Rationalised CompareForKernelVisit. (Local sectioning still active.)
o Added position and colour to DisplayHeadTime.
o Added DisplayLightFront.
16th August 2006 John Allison (opengl-V08-01-03)
- Corrected Solaris compilation error.
- Added /vis/ogl/set/fade and displayHeadTime.
@@ -2944,7 +2976,7 @@ interfaces-V09-05-20)
- Removed redundant fLastVP from G4OpenGLStoredSceneHandler.
15th November 2004 Guy Barrand
- G4OpenGLWin32Viewer::ShowView : glFlush was not sufficient
- G4OpenGLWin32Viewer::ShowView : glFlush was not sufficient
to see trajectories (for example with N03). Correct so that
ShowView do a FinishView that does : glFlush, wglSwapBuffer
and empty the Windows message queue.
@@ -100,17 +100,17 @@ class G4OpenGLQtExportDialog : public QDialog
private:
QString f_name, f_type, f_dir;
QLabel* qualityLabel;
bool expAll;
// QLabel* qualityLabel;
// bool expAll;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QGroupBox * sizeGroupBox;
QCheckBox* transparencyEPS,*boxTransparency,*vectorEPSCheckBox;
QCheckBox/** transparencyEPS,*boxTransparency,*/*vectorEPSCheckBox;
QCheckBox* ratioCheckBox;
QSlider * qualitySlider;
QLabel *formatLabel;
// QLabel *formatLabel;
QRadioButton* colorButton,*BWButton;
QRadioButton* original,* modify;
QLineEdit* height,*width;
@@ -64,6 +64,7 @@ class QKeyEvent;
class QWheelEvent;
class QProcess;
class QTime;
class QElapsedTimer;
class QVBoxLayout;
class QPushButton;
class QSlider;
@@ -308,7 +309,11 @@ private:
G4OpenGLQtMovieDialog* fMovieParametersDialog;
RECORDING_STEP fRecordingStep;
QProcess *fProcess;
#if QT_VERSION < 0x050e00
QTime *fLastEventTime;
#else
QElapsedTimer *fLastEventTime;
#endif
int fSpinningDelay;
int fNbMaxFramesPerSec;
float fNbMaxAnglePerSec;
@@ -49,23 +49,25 @@ public:
private:
G4OpenGLViewerMessenger(); // Private constructor.
static G4OpenGLViewerMessenger* fpInstance;
G4UIdirectory* fpDirectory;
G4UIcommand* fpCommandExport;
G4UIcommand* fpCommandFlushAt;
G4UIcmdWithoutParameter* fpCommandPrintEPS;
G4UIcommand* fpCommandPrintSize;
G4UIcommand* fpCommandPrintFilename;
G4UIcommand* fpCommandExport;
G4UIcommand* fpCommandExportFormat;
G4UIdirectory* fpDirectorySet;
G4UIcommand* fpCommandDisplayHeadTime;
G4UIcommand* fpCommandDisplayHeadTime;
G4UIcommand* fpCommandDisplayLightFront;
G4UIcmdWithAnInteger* fpCommandDisplayListLimit;
G4UIcommand* fpCommandDisplayLightFront;
G4UIcommand* fpCommandEndTime;
G4UIcommand* fpCommandEndTime;
G4UIcmdWithAnInteger* fpCommandEventsDrawInterval;
G4UIcmdWithADouble* fpCommandFade;
G4UIcommand* fpCommandFlushAt;
G4UIcmdWithAString* fpCommandPrintMode;
G4UIcommand* fpCommandStartTime;
G4UIcmdWithABool* fpCommandTransparency;
G4UIcommand* fpCommandExportFormat;
G4UIcmdWithADouble* fpCommandFade;
G4UIcommand* fpCommandPrintFilename;
G4UIcmdWithAString* fpCommandPrintMode;
G4UIcommand* fpCommandPrintSize;
G4UIcommand* fpCommandStartTime;
G4UIcmdWithABool* fpCommandTransparency;
};
#endif
+219 -291
View File
@@ -1,48 +1,8 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4OpenGL
# Package: Geant4.src.G4visualization.G4OpenGL
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/basic/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/common/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/externals/gl2ps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/modeling/include)
#
# Module has optional sources
#
@@ -53,77 +13,69 @@ include(Geant4MacroDefineModule)
# OpenGL implementations use
#
set(G4VIS_MODULE_OPENGL_HEADERS
G4OpenGL.hh
G4OpenGLImmediateViewer.hh
G4OpenGLImmediateSceneHandler.hh
G4OpenGLViewer.hh
G4OpenGLStoredViewer.hh
G4OpenGLStoredSceneHandler.hh
G4OpenGLFontBaseStore.hh
G4OpenGLSceneHandler.hh
G4OpenGLSceneHandler.icc
G4OpenGLViewerMessenger.hh
G4OpenGLTransform3D.hh
G4VisFeaturesOfOpenGL.hh
G4OpenGL.hh
G4OpenGLImmediateViewer.hh
G4OpenGLImmediateSceneHandler.hh
G4OpenGLViewer.hh
G4OpenGLStoredViewer.hh
G4OpenGLStoredSceneHandler.hh
G4OpenGLFontBaseStore.hh
G4OpenGLSceneHandler.hh
G4OpenGLSceneHandler.icc
G4OpenGLViewerMessenger.hh
G4OpenGLTransform3D.hh
G4VisFeaturesOfOpenGL.hh
)
set(G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateViewer.cc
G4OpenGLImmediateSceneHandler.cc
G4OpenGLViewer.cc
G4OpenGLStoredViewer.cc
G4OpenGLStoredSceneHandler.cc
G4OpenGLFontBaseStore.cc
G4OpenGLSceneHandler.cc
G4OpenGLViewerMessenger.cc
G4OpenGLTransform3D.cc
G4VisFeaturesOfOpenGL.cc
G4OpenGLImmediateViewer.cc
G4OpenGLImmediateSceneHandler.cc
G4OpenGLViewer.cc
G4OpenGLStoredViewer.cc
G4OpenGLStoredSceneHandler.cc
G4OpenGLFontBaseStore.cc
G4OpenGLSceneHandler.cc
G4OpenGLViewerMessenger.cc
G4OpenGLTransform3D.cc
G4VisFeaturesOfOpenGL.cc
)
#
# Core OpenGL settings
#
set(G4VIS_MODULE_OPENGL_LINK_LIBRARIES OpenGL::GL OpenGL::GLU)
set(G4VIS_MODULE_OPENGL_LINK_LIBRARIES OpenGL::GL)
#
# All files must have the G4VIS_BUILD_OPENGL_DRIVER definition
#
add_definitions(-DG4VIS_BUILD_OPENGL_DRIVER)
#----------------------------------------------------------------------------
# Add X11 OpenGL Support if requested
#
if(GEANT4_USE_OPENGL_X11)
#
# Add in the extra X11 GL sources
#
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateX.hh
G4OpenGLImmediateXViewer.hh
G4OpenGLStoredX.hh
G4OpenGLStoredXViewer.hh
G4OpenGLXViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateX.hh
G4OpenGLImmediateXViewer.hh
G4OpenGLStoredX.hh
G4OpenGLStoredXViewer.hh
G4OpenGLXViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateX.cc
G4OpenGLImmediateXViewer.cc
G4OpenGLStoredX.cc
G4OpenGLStoredXViewer.cc
G4OpenGLXViewer.cc)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateX.cc
G4OpenGLImmediateXViewer.cc
G4OpenGLStoredX.cc
G4OpenGLStoredXViewer.cc
G4OpenGLXViewer.cc)
# Add the includes for X11
#include_directories(${X11_INCLUDE_DIR} ${X11_Xmu_INCLUDE_PATH})
# Add the compile definitions needed for the X11 component
add_definitions(-DG4VIS_BUILD_OPENGLX_DRIVER)
# Add the compile definitions needed for the X11 component
add_definitions(-DG4VIS_BUILD_OPENGLX_DRIVER)
# Add in X11 libraries, plus Xmu library
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu)
if(APPLE)
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES XQuartzGL::GL XQuartzGL::GLU)
endif()
# Add in X11 libraries, plus Xmu library
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu)
if(APPLE)
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES XQuartzGL::GL)
endif()
endif()
@@ -131,188 +83,164 @@ endif()
# Add Xm OpenGL Support if requested
#
if(GEANT4_USE_XM)
#
# Add in the extra Xm sources
#
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateXm.hh
G4OpenGLImmediateXmViewer.hh
G4OpenGLStoredXm.hh
G4OpenGLStoredXmViewer.hh
G4OpenGLXm.hh
G4OpenGLXmBox.hh
G4OpenGLXmFourArrowButtons.hh
G4OpenGLXmFramedBox.hh
G4OpenGLXmPushButton.hh
G4OpenGLXmRadioButton.hh
G4OpenGLXmResources.hh
G4OpenGLXmSeparator.hh
G4OpenGLXmSliderBar.hh
G4OpenGLXmTextField.hh
G4OpenGLXmTopLevelShell.hh
G4OpenGLXmViewer.hh
G4OpenGLXmViewerMessenger.hh
G4OpenGLXmVWidgetComponent.hh
G4OpenGLXmVWidgetContainer.hh
G4OpenGLXmVWidgetObject.hh
G4OpenGLXmVWidgetShell.hh
)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateXm.hh
G4OpenGLImmediateXmViewer.hh
G4OpenGLStoredXm.hh
G4OpenGLStoredXmViewer.hh
G4OpenGLXm.hh
G4OpenGLXmBox.hh
G4OpenGLXmFourArrowButtons.hh
G4OpenGLXmFramedBox.hh
G4OpenGLXmPushButton.hh
G4OpenGLXmRadioButton.hh
G4OpenGLXmResources.hh
G4OpenGLXmSeparator.hh
G4OpenGLXmSliderBar.hh
G4OpenGLXmTextField.hh
G4OpenGLXmTopLevelShell.hh
G4OpenGLXmViewer.hh
G4OpenGLXmViewerMessenger.hh
G4OpenGLXmVWidgetComponent.hh
G4OpenGLXmVWidgetContainer.hh
G4OpenGLXmVWidgetObject.hh
G4OpenGLXmVWidgetShell.hh
)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateXm.cc
G4OpenGLImmediateXmViewer.cc
G4OpenGLStoredXm.cc
G4OpenGLStoredXmViewer.cc
G4OpenGLXm.cc
G4OpenGLXmBox.cc
G4OpenGLXmConvenienceRoutines.cc
G4OpenGLXmFourArrowButtons.cc
G4OpenGLXmFramedBox.cc
G4OpenGLXmMainMenubarCallbacks.cc
G4OpenGLXmPanningCallbacks.cc
G4OpenGLXmPushButton.cc
G4OpenGLXmRadioButton.cc
G4OpenGLXmRotationCallbacks.cc
G4OpenGLXmSeparator.cc
G4OpenGLXmSliderBar.cc
G4OpenGLXmStyleCallbacks.cc
G4OpenGLXmTextField.cc
G4OpenGLXmTopLevelShell.cc
G4OpenGLXmViewer.cc
G4OpenGLXmViewerMessenger.cc
G4OpenGLXmVWidgetComponent.cc
G4OpenGLXmVWidgetContainer.cc
G4OpenGLXmVWidgetObject.cc
G4OpenGLXmVWidgetShell.cc
G4OpenGLXmWindowHandlingCallbacks.cc
)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateXm.cc
G4OpenGLImmediateXmViewer.cc
G4OpenGLStoredXm.cc
G4OpenGLStoredXmViewer.cc
G4OpenGLXm.cc
G4OpenGLXmBox.cc
G4OpenGLXmConvenienceRoutines.cc
G4OpenGLXmFourArrowButtons.cc
G4OpenGLXmFramedBox.cc
G4OpenGLXmMainMenubarCallbacks.cc
G4OpenGLXmPanningCallbacks.cc
G4OpenGLXmPushButton.cc
G4OpenGLXmRadioButton.cc
G4OpenGLXmRotationCallbacks.cc
G4OpenGLXmSeparator.cc
G4OpenGLXmSliderBar.cc
G4OpenGLXmStyleCallbacks.cc
G4OpenGLXmTextField.cc
G4OpenGLXmTopLevelShell.cc
G4OpenGLXmViewer.cc
G4OpenGLXmViewerMessenger.cc
G4OpenGLXmVWidgetComponent.cc
G4OpenGLXmVWidgetContainer.cc
G4OpenGLXmVWidgetObject.cc
G4OpenGLXmVWidgetShell.cc
G4OpenGLXmWindowHandlingCallbacks.cc
)
# Special case of building Xm without X11
if(NOT GEANT4_USE_OPENGL_X11)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS G4OpenGLXViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES G4OpenGLXViewer.cc)
add_definitions(-DG4VIS_BUILD_OPENGLX_DRIVER)
endif()
# Special case of building Xm without X11
if(NOT GEANT4_USE_OPENGL_X11)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS G4OpenGLXViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES G4OpenGLXViewer.cc)
add_definitions(-DG4VIS_BUILD_OPENGLX_DRIVER)
endif()
# Add the compile definitions needed for the Xm component, remembering
# to add those for the UI part as well!!!
add_definitions(-DG4VIS_BUILD_OPENGLXM_DRIVER -DG4INTY_BUILD_XT -DG4UI_BUILD_XM_SESSION)
# Add the compile definitions needed for the Xm component, remembering
# to add those for the UI part as well!!!
add_definitions(-DG4VIS_BUILD_OPENGLXM_DRIVER -DG4INTY_BUILD_XT -DG4UI_BUILD_XM_SESSION)
# Add in Xm, X11 libraries, plus Xmu library
set(G4VIS_MODULE_OPENGL_LINK_LIBRARIES Motif::Xm X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu ${G4VIS_MODULE_OPENGL_LINK_LIBRARIES})
# Add in Xm, X11 libraries, plus Xmu library
set(G4VIS_MODULE_OPENGL_LINK_LIBRARIES Motif::Xm X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu ${G4VIS_MODULE_OPENGL_LINK_LIBRARIES})
endif()
#----------------------------------------------------------------------------
# Add Qt OpenGL support if requested
#
if(GEANT4_USE_QT)
#
# Add in the extra Qt GL sources
#
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateQt.hh
G4OpenGLImmediateQtViewer.hh
G4OpenGLQt.hh
G4OpenGLQtExportDialog.hh
G4OpenGLQtMovieDialog.hh
G4OpenGLVboDrawer.hh
G4OpenGLQtViewer.hh
G4OpenGLStoredQt.hh
G4OpenGLStoredQtSceneHandler.hh
G4OpenGLStoredQtViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateQt.hh
G4OpenGLImmediateQtViewer.hh
G4OpenGLQt.hh
G4OpenGLQtExportDialog.hh
G4OpenGLQtMovieDialog.hh
G4OpenGLVboDrawer.hh
G4OpenGLQtViewer.hh
G4OpenGLStoredQt.hh
G4OpenGLStoredQtSceneHandler.hh
G4OpenGLStoredQtViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateQt.cc
G4OpenGLImmediateQtViewer.cc
G4OpenGLQt.cc
G4OpenGLQtExportDialog.cc
G4OpenGLQtMovieDialog.cc
G4OpenGLVboDrawer.cc
G4OpenGLQtViewer.cc
G4OpenGLStoredQt.cc
G4OpenGLStoredQtSceneHandler.cc
G4OpenGLStoredQtViewer.cc)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateQt.cc
G4OpenGLImmediateQtViewer.cc
G4OpenGLQt.cc
G4OpenGLQtExportDialog.cc
G4OpenGLQtMovieDialog.cc
G4OpenGLVboDrawer.cc
G4OpenGLQtViewer.cc
G4OpenGLStoredQt.cc
G4OpenGLStoredQtSceneHandler.cc
G4OpenGLStoredQtViewer.cc)
# Add the definitions
# Argh.. Have to remember about INTY and UI because of their use...
add_definitions(-DG4VIS_BUILD_OPENGLQT_DRIVER -DG4INTY_BUILD_QT -DG4UI_BUILD_QT_SESSION)
# Add the moc sources - must use absolute path to the files
QT4_WRAP_CPP(G4OPENGL_MOC_SOURCES
${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh
${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh
${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
OPTIONS -DG4VIS_BUILD_OPENGLQT_DRIVER)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES ${G4OPENGL_MOC_SOURCES})
# Add the definitions - these will also be used to compile the moc sources
# Argh.. Have to remember about INTY and UI because of their use...
add_definitions(-DG4VIS_BUILD_OPENGLQT_DRIVER -DG4INTY_BUILD_QT
-DG4UI_BUILD_QT_SESSION)
# Add in Qt libraries
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES ${QT_LIBRARIES})
# Add in Qt libraries
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES Qt5::OpenGL Qt5::Gui Qt5::PrintSupport Qt5::Widgets)
endif()
#----------------------------------------------------------------------------
# Add Wt OpenGL support if requested
#
if(GEANT4_USE_WT)
#
# Add in the extra Wt GL sources
#
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateWt.hh
G4OpenGLImmediateWtViewer.hh
G4OpenGLVboDrawer.hh
G4OpenGLWtViewer.hh)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateWt.cc
G4OpenGLImmediateWtViewer.cc
G4OpenGLVboDrawer.cc
G4OpenGLWtViewer.cc)
# Add the definitions - these will also be used to compile the moc sources
# Argh.. Have to remember about INTY and UI because of their use...
# Use the compile definitions to avoid "signal/slot" keyword
# mixed with Qt and boost
add_definitions(${WT_DEFINITIONS})
add_definitions(-DG4VIS_BUILD_OPENGLWT_DRIVER -DG4INTY_BUILD_WT
-DG4UI_BUILD_WT_SESSION)
# Add in Wt libraries
list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES Wt::Wt Wt::HTTP)
endif()
#if(GEANT4_USE_WT)
# #
# # Add in the extra Wt GL sources
# #
# list(APPEND G4VIS_MODULE_OPENGL_HEADERS
# G4OpenGLImmediateWt.hh
# G4OpenGLImmediateWtViewer.hh
# G4OpenGLVboDrawer.hh
# G4OpenGLWtViewer.hh)
#
# list(APPEND G4VIS_MODULE_OPENGL_SOURCES
# G4OpenGLImmediateWt.cc
# G4OpenGLImmediateWtViewer.cc
# G4OpenGLVboDrawer.cc
# G4OpenGLWtViewer.cc)
#
# # Add the definitions - these will also be used to compile the moc sources
# # Argh.. Have to remember about INTY and UI because of their use...
# # Use the compile definitions to avoid "signal/slot" keyword
# # mixed with Qt and boost
# add_definitions(${WT_DEFINITIONS})
# add_definitions(-DG4VIS_BUILD_OPENGLWT_DRIVER -DG4INTY_BUILD_WT
# -DG4UI_BUILD_WT_SESSION)
#
# # Add in Wt libraries
# list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES Wt::Wt Wt::HTTP)
#endif()
#----------------------------------------------------------------------------
# Add WIN32 support, if requested
#
if(GEANT4_USE_OPENGL_WIN32)
#
# Add in the extra sources
#
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateWin32.hh
G4OpenGLImmediateWin32Viewer.hh
G4OpenGLStoredWin32.hh
G4OpenGLStoredWin32Viewer.hh
G4OpenGLWin32Viewer.hh
)
list(APPEND G4VIS_MODULE_OPENGL_HEADERS
G4OpenGLImmediateWin32.hh
G4OpenGLImmediateWin32Viewer.hh
G4OpenGLStoredWin32.hh
G4OpenGLStoredWin32Viewer.hh
G4OpenGLWin32Viewer.hh
)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateWin32.cc
G4OpenGLImmediateWin32Viewer.cc
G4OpenGLStoredWin32.cc
G4OpenGLStoredWin32Viewer.cc
G4OpenGLWin32Viewer.cc
)
list(APPEND G4VIS_MODULE_OPENGL_SOURCES
G4OpenGLImmediateWin32.cc
G4OpenGLImmediateWin32Viewer.cc
G4OpenGLStoredWin32.cc
G4OpenGLStoredWin32Viewer.cc
G4OpenGLWin32Viewer.cc
)
# Add the compile definitions
add_definitions(-DG4VIS_BUILD_OPENGLWIN32_DRIVER)
# That should be it for Win32...
# Add the compile definitions
add_definitions(-DG4VIS_BUILD_OPENGLWIN32_DRIVER)
endif()
# May have duplicates in link list, so remove
@@ -321,51 +249,51 @@ list(REMOVE_DUPLICATES G4VIS_MODULE_OPENGL_LINK_LIBRARIES)
#----------------------------------------------------------------------------
# Define the Geant4 Module.
#
GEANT4_DEFINE_MODULE(NAME G4OpenGL
HEADERS
${G4VIS_MODULE_OPENGL_HEADERS}
SOURCES
${G4VIS_MODULE_OPENGL_SOURCES}
GRANULAR_DEPENDENCIES
G4UIbasic
G4UIcommon
G4csg
G4event
G4run
G4particles
G4processes
G4track
G4materials
G4geometrymng
G4gl2ps
G4globman
G4graphics_reps
G4digits
G4hits
G4intercoms
G4modeling
G4specsolids
G4tracking
G4vis_management
GLOBAL_DEPENDENCIES
G4digits_hits
G4event
G4run
G4particles
G4processes
G4track
G4materials
G4geometry
G4gl2ps
G4global
G4graphics_reps
G4intercoms
G4interfaces
G4modeling
G4tracking
G4vis_management
LINK_LIBRARIES
${G4VIS_MODULE_OPENGL_LINK_LIBRARIES}
geant4_define_module(NAME G4OpenGL
HEADERS
${G4VIS_MODULE_OPENGL_HEADERS}
SOURCES
${G4VIS_MODULE_OPENGL_SOURCES}
GRANULAR_DEPENDENCIES
G4UIbasic
G4UIcommon
G4csg
G4event
G4run
G4particles
G4processes
G4track
G4materials
G4geometrymng
G4gl2ps
G4globman
G4graphics_reps
G4digits
G4hits
G4intercoms
G4modeling
G4specsolids
G4tracking
G4vis_management
GLOBAL_DEPENDENCIES
G4digits_hits
G4event
G4run
G4particles
G4processes
G4track
G4materials
G4geometry
G4gl2ps
G4global
G4graphics_reps
G4intercoms
G4interfaces
G4modeling
G4tracking
G4vis_management
LINK_LIBRARIES
${G4VIS_MODULE_OPENGL_LINK_LIBRARIES}
)
# List any source specific properties here
@@ -25,7 +25,7 @@
//
//
//
//
//
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
@@ -44,6 +44,10 @@
#include <qlineedit.h>
#include <qbuttongroup.h>
#ifndef G4GMAKE
#include "moc_G4OpenGLQtExportDialog.cpp"
#endif
G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
QWidget* parentw
,QString format
@@ -68,7 +72,7 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
QVBoxLayout* globalVLayout = new QVBoxLayout(this);
globalVLayout->setMargin(10);
globalVLayout->setSpacing(10);
@@ -76,14 +80,14 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
QWidget * sizeWidget = new QWidget(this); // widget containing group button
QVBoxLayout * sizeWidgetLayout = new QVBoxLayout(sizeWidget);
sizeWidgetLayout->setMargin (10);
sizeWidgetLayout->setMargin (10);
// original and modify radiobuttons
sizeGroupBox = new QGroupBox(tr("Size"));
QVBoxLayout *sizeGroupBoxLayout = new QVBoxLayout(sizeGroupBox);
QButtonGroup * sizeButtonGroupBox = new QButtonGroup();
sizeGroupBoxLayout->setMargin (15);
sizeGroupBoxLayout->setMargin (15);
original = new QRadioButton("Original");
modify = new QRadioButton("Modify");
@@ -92,12 +96,12 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
sizeButtonGroupBox->addButton(modify);
sizeButtonGroupBox->setExclusive(true);
sizeGroupBoxLayout->addWidget(original);
sizeGroupBoxLayout->addWidget(modify);
sizeGroupBoxLayout->addWidget(original);
sizeGroupBoxLayout->addWidget(modify);
sizeGroupBox->setLayout(sizeGroupBoxLayout);
sizeWidgetLayout->addWidget(sizeGroupBox);
connect( sizeButtonGroupBox, SIGNAL( buttonClicked(QAbstractButton*) ), this, SLOT( changeSizeBox()) );
original->setChecked( true );
@@ -108,7 +112,7 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
QHBoxLayout *heightLineLayout = new QHBoxLayout(heightWidget);
QString tmp;
heightLineLayout->addWidget(new QLabel("Height",heightWidget));
height = new QLineEdit(tmp.setNum(originalHeight),heightWidget);
height->setMaxLength(5);
@@ -155,7 +159,7 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
QVBoxLayout * EPSGroupBoxLayout = new QVBoxLayout(EPSWidgetGroupBox);
EPSGroupBoxLayout->setMargin (15);
EPSGroupBoxLayout->setMargin (15);
// colorButton = new QRadioButton("Color",EPSWidgetGroupBox);
// BWButton = new QRadioButton("Grayscale",EPSWidgetGroupBox);
@@ -165,8 +169,8 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
// EPSColorButtonGroupBox->addButton(BWButton);
// EPSColorButtonGroupBox->setExclusive(true);
// EPSGroupBoxLayout->addWidget(colorButton);
// EPSGroupBoxLayout->addWidget(BWButton);
// EPSGroupBoxLayout->addWidget(colorButton);
// EPSGroupBoxLayout->addWidget(BWButton);
vectorEPSCheckBox = new QCheckBox( "Vector EPS File",EPSWidgetGroupBox);
EPSGroupBoxLayout->addWidget(vectorEPSCheckBox);
@@ -174,18 +178,18 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
EPSWidgetGroupBox->setLayout(EPSGroupBoxLayout);
// colorButton->setChecked( true );
vectorEPSCheckBox->setChecked( true );
globalVLayout->addWidget(EPSWidgetGroupBox);
connect( vectorEPSCheckBox, SIGNAL( clicked() ), this, SLOT( changeVectorEPS()) );
}
if ((format == "jpg") ||
if ((format == "jpg") ||
(format == "jpeg")) {
QGroupBox *imageGroupBox = new QGroupBox(tr("Image quality"),this);
QHBoxLayout *hSliderLayout = new QHBoxLayout(imageGroupBox);
hSliderLayout->setMargin (15);
hSliderLayout->setMargin (15);
qualitySlider= new QSlider(Qt::Horizontal,imageGroupBox);
qualitySlider->setMinimum(0);
@@ -195,7 +199,7 @@ G4OpenGLQtExportDialog::G4OpenGLQtExportDialog(
hSliderLayout->addWidget(new QLabel("Low ",imageGroupBox));
hSliderLayout->addWidget(qualitySlider);
hSliderLayout->addWidget(new QLabel(" Maximum",imageGroupBox));
imageGroupBox->setLayout(hSliderLayout);
globalVLayout->addWidget(imageGroupBox);
@@ -324,7 +328,7 @@ void G4OpenGLQtExportDialog:: textHeightChanged(
width->setText(tmp.setNum(s.toInt()*originalWidth/originalHeight));
isChangingSize = false;
}
}
}
G4OpenGLQtExportDialog::~G4OpenGLQtExportDialog()
{
@@ -25,7 +25,7 @@
//
//
//
//
//
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
@@ -42,6 +42,9 @@
#include <qfiledialog.h>
#include <qprocess.h>
#ifndef G4GMAKE
#include "moc_G4OpenGLQtMovieDialog.cpp"
#endif
// +---------------------------------------+
// + Path for encoder +
@@ -75,12 +78,12 @@ G4OpenGLQtMovieDialog::G4OpenGLQtMovieDialog(
QVBoxLayout* globalVLayout = new QVBoxLayout(this);
globalVLayout->setMargin(10);
globalVLayout->setSpacing(10);
// Encoder group box
QGroupBox *encoderGroupBox = new QGroupBox(tr("Encoder path"),this);
QGroupBox *encoderGroupBox = new QGroupBox(tr("Encoder path"),this);
QVBoxLayout *encoderVGroupBoxLayout = new QVBoxLayout(encoderGroupBox);
// Encoder Path
// Encoder Path
QWidget *encoderHBox = new QWidget(encoderGroupBox);
QHBoxLayout *encoderHBoxLayout = new QHBoxLayout(encoderHBox);
fEncoderPath = new QLineEdit("",encoderHBox);
@@ -110,7 +113,7 @@ G4OpenGLQtMovieDialog::G4OpenGLQtMovieDialog(
QGroupBox *tempFolderGroupBox = new QGroupBox(tr("Temporary folder path"),this);
QVBoxLayout *tempFolderVGroupBoxLayout = new QVBoxLayout(tempFolderGroupBox);
// temp folder Path
// temp folder Path
QWidget *tempFolderHBox = new QWidget(tempFolderGroupBox);
QHBoxLayout *tempFolderHBoxLayout = new QHBoxLayout(tempFolderHBox);
@@ -141,7 +144,7 @@ G4OpenGLQtMovieDialog::G4OpenGLQtMovieDialog(
QGroupBox *saveFileGroupBox = new QGroupBox(tr("Save as"),this);
QVBoxLayout *saveFileVGroupBoxLayout = new QVBoxLayout(saveFileGroupBox);
// save file
// save file
QWidget *saveFileHBox = new QWidget(saveFileGroupBox);
QHBoxLayout *saveFileHBoxLayout = new QHBoxLayout(saveFileHBox);
@@ -261,7 +264,7 @@ void G4OpenGLQtMovieDialog::selectEncoderPathAction()
{
QString nomFich = QFileDialog::getOpenFileName ( this,
"Select your encoder",
tr("Select your encoder ..."));
tr("Select your encoder ..."));
if (nomFich == "") {
@@ -276,7 +279,7 @@ void G4OpenGLQtMovieDialog::selectTempPathAction()
{
QString nomFich = QFileDialog::getExistingDirectory ( this,
"Select temporary folder",
tr("Select temporary folder ..."));
tr("Select temporary folder ..."));
if (nomFich == "") {
return;
@@ -290,7 +293,7 @@ void G4OpenGLQtMovieDialog::selectSaveFileNameAction()
{
QString nomFich = QFileDialog::getSaveFileName ( this,
"Select saved file",
tr("Select saved file ..."));
tr("Select saved file ..."));
if (nomFich == "") {
return;
@@ -371,7 +374,7 @@ bool G4OpenGLQtMovieDialog::checkSaveFileNameParameters() {
QString temp = fParentViewer->setSaveFileName(fSaveFileName->text());
fSaveFileStatus->setText(temp);
if (temp != "") {
if (temp != "") {
mypalette.setColor( QPalette::Base, Qt::red);
status = false;
} else {
File diff suppressed because it is too large Load Diff
@@ -1055,14 +1055,16 @@ bool G4OpenGLViewer::setExportFilename(G4String name,G4bool inc) {
} else {
// guess format by extention
std::string extension = name.substr(name.find_last_of(".") + 1);
// no format
if (name.size() != extension.size()) {
if (! setExportImageFormat(extension, false)) {
// If there is a dot in the name the above might find rubbish, so...
if (extension.size() >= 3 && extension.size() <= 4) { // Possible extension
if (setExportImageFormat(extension, false)) { // Extension found
fExportFilename = name.substr(0,name.find_last_of("."));
} else { // No viable extension found
return false;
}
} else { // Assume name is already the required without-extension part
fExportFilename = name;
}
// get the name
fExportFilename = name.substr(0,name.find_last_of("."));
}
return true;
}
@@ -62,24 +62,35 @@ G4OpenGLViewerMessenger::G4OpenGLViewerMessenger()
fpCommandExport =
new G4UIcommand("/vis/ogl/export", this);
fpCommandExport->SetGuidance ("export a screenshot of current OpenGL viewer");
fpCommandExport->SetGuidance ("If name is \"\", filename and extension will have the default value");
fpCommandExport->SetGuidance ("If name is \"toto.png\", set the name to \"toto\" and the format to \"png\". No incremented suffix is added.");
fpCommandExport->SetGuidance ("If name is \"toto\", set the name to \"toto\" and the format to default (or current format if specify). Will also add an incremented suffix at the end of the file, except if name is the same as previous it will not reset incremented suffix.");
fpCommandExport->SetGuidance ("Setting size is available only on eps/pdf/svg/ps formats");
fpCommandExport->SetGuidance ("Export a screenshot of current OpenGL viewer");
fpCommandExport->SetGuidance
("If name is \"\", filename and extension will have the current value");
fpCommandExport->SetGuidance
("If name is \"toto.png\", set the name to \"toto\" and the format to \"png\".");
fpCommandExport->SetGuidance
("If name is \"toto\", set the name to \"toto\" and the format to current format.");
fpCommandExport->SetGuidance
("Will also add an incremented suffix at the end of the name, except if name is"
"\nthe same as previous it will not reset the incremented suffix.");
fpCommandExport->SetGuidance
("Setting size is available only on eps/pdf/svg/ps formats.");
G4UIparameter* parameterExport;
parameterExport = new G4UIparameter ("name", 's', omitable = true);
parameterExport->SetDefaultValue("!");
parameterExport->SetGuidance("by default, will take a default value or the last /vis/ogl/set/printFilename value if set");
parameterExport->SetGuidance
("By default, will take a default value or the last \"/vis/ogl/set/printFilename\""
" value if set.");
fpCommandExport->SetParameter(parameterExport);
parameterExport = new G4UIparameter ("width", 'd', omitable = true);
parameterExport->SetGuidance("By default, will take the current width of the viewer or /vis/ogl/set/printSize if set");
parameterExport->SetGuidance("This parameter is only useful for eps/pdf/svg/ps formats !");
parameterExport->SetGuidance
("By default, will take the current width of the viewer or \"/vis/ogl/set/printSize\""
"\nif set. This parameter is only useful for eps/pdf/svg/ps formats !");
parameterExport->SetDefaultValue(-1);
fpCommandExport->SetParameter(parameterExport);
parameterExport = new G4UIparameter ("height", 'd', omitable = true);
parameterExport->SetGuidance("By default, will take the current height of the viewer or /vis/ogl/set/printSize if set");
parameterExport->SetGuidance("This parameter is only useful for eps/pdf/svg/ps formats !");
parameterExport->SetGuidance
("By default, will take the current height of the viewer or \"/vis/ogl/set/printSize\""
"\nif set. This parameter is only useful for eps/pdf/svg/ps formats !");
parameterExport->SetDefaultValue(-1);
fpCommandExport->SetParameter(parameterExport);
@@ -109,8 +120,10 @@ G4OpenGLViewerMessenger::G4OpenGLViewerMessenger()
new G4UIcmdWithoutParameter("/vis/ogl/printEPS", this);
fpCommandPrintEPS->SetGuidance("Print Encapsulated PostScript file.");
fpCommandPrintEPS->SetGuidance
("Generates files with names G4OpenGL_n.eps, where n is a sequence"
"\nnumber, starting at 0."
("See \"/vis/ogl/export\" for other file formats.");
fpCommandPrintEPS->SetGuidance
("Generates files with names G4OpenGL_viewer-name_nnnn.eps, where nnnn is a"
"\nsequence number, starting at 0000."
"\nCan be \"vectored\" or \"pixmap\" - see \"/vis/ogl/set/printMode\".");
fpDirectorySet = new G4UIdirectory ("/vis/ogl/set/");
@@ -235,6 +248,17 @@ G4OpenGLViewerMessenger::G4OpenGLViewerMessenger()
fpCommandEventsDrawInterval->SetParameterName("N", omitable = true);
fpCommandEventsDrawInterval->SetDefaultValue(1);
fpCommandExportFormat =
new G4UIcommand("/vis/ogl/set/exportFormat", this);
fpCommandExportFormat->SetGuidance ("Set export format");
fpCommandExportFormat->SetGuidance ("By default, pdf/eps/svg/ps are available. Depending of viewers several other format are available.");
fpCommandExportFormat->SetGuidance ("Try /vis/ogl/set/exportFormat without parameters to see them.");
fpCommandExportFormat->SetGuidance ("Changing format will reset the incremental suffix to 0.");
G4UIparameter* parameterExportFormat;
parameterExportFormat = new G4UIparameter ("format", 's', omitable = true);
parameterExportFormat->SetDefaultValue("");
fpCommandExportFormat->SetParameter(parameterExportFormat);
fpCommandFade = new G4UIcmdWithADouble("/vis/ogl/set/fade", this);
fpCommandFade->SetGuidance
("DEPRECATED. Use /vis/viewer/set/timeWindow/fadeFactor."
@@ -255,19 +279,7 @@ G4OpenGLViewerMessenger::G4OpenGLViewerMessenger()
parameterPrintFilename->SetDefaultValue(1);
fpCommandPrintFilename->SetParameter(parameterPrintFilename);
fpCommandExportFormat =
new G4UIcommand("/vis/ogl/set/exportFormat", this);
fpCommandExportFormat->SetGuidance ("Set export format");
fpCommandExportFormat->SetGuidance ("By default, pdf/eps/svg/ps are available. Depending of viewers several other format are available.");
fpCommandExportFormat->SetGuidance ("Try /vis/ogl/set/exportFormat without parameters to see them.");
fpCommandExportFormat->SetGuidance ("Changing format will reset the incremental suffix to 0.");
G4UIparameter* parameterExportFormat;
parameterExportFormat = new G4UIparameter ("format", 's', omitable = true);
parameterExportFormat->SetDefaultValue("");
fpCommandExportFormat->SetParameter(parameterExportFormat);
fpCommandPrintMode = new G4UIcmdWithAString
("/vis/ogl/set/printMode",this);
fpCommandPrintMode = new G4UIcmdWithAString("/vis/ogl/set/printMode",this);
fpCommandPrintMode->SetGuidance("Set print mode, only available for \"ps\" format");
fpCommandPrintMode->SetParameterName("print_mode",omitable = true);
fpCommandPrintMode->SetCandidates("vectored pixmap");
@@ -384,27 +396,7 @@ void G4OpenGLViewerMessenger::SetNewValue
<< G4endl;
return;
}
if (command == fpCommandPrintEPS)
{
pOGLViewer->setExportImageFormat("eps",true);
pOGLViewer->exportImage();
if (pOGLViewer->fVP.IsAutoRefresh())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/refresh");
return;
}
if (command == fpCommandExportFormat)
{
G4String name;
std::istringstream iss(newValue);
iss >> name;
pOGLViewer->setExportImageFormat(name);
return;
}
if (command == fpCommandExport)
{
G4String name;
@@ -418,41 +410,15 @@ void G4OpenGLViewerMessenger::SetNewValue
return;
}
if (command == fpCommandPrintSize)
{
G4int width,height;
std::istringstream iss(newValue);
iss >> width
>> height;
pOGLViewer->setExportSize(width,height);
return;
}
if (command == fpCommandExportFormat)
{
G4String name;
std::istringstream iss(newValue);
iss >> name;
pOGLViewer->setExportImageFormat(name);
if (command == fpCommandPrintFilename)
{
G4String name;
G4bool inc;
std::istringstream iss(newValue);
iss >> name
>> inc;
pOGLViewer->setExportFilename(name,inc);
return;
}
if (command == fpCommandPrintMode)
{
if (newValue == "vectored") pOGLViewer->fVectoredPs = true;
if (newValue == "pixmap") pOGLViewer->fVectoredPs = false;
return;
}
if (command == fpCommandTransparency)
{
pOGLViewer->transparency_enabled = command->ConvertToBool(newValue);
if (pOGLViewer->fVP.IsAutoRefresh())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/refresh");
return;
}
return;
}
if (command == fpCommandEventsDrawInterval)
{
@@ -465,17 +431,17 @@ void G4OpenGLViewerMessenger::SetNewValue
if (command == fpCommandFlushAt)
{
// G4bool firstTime = true;
std::map<G4String,G4OpenGLSceneHandler::FlushAction> actionMap;
// if (firstTime) {
static G4bool firstTime = true;
static std::map<G4String,G4OpenGLSceneHandler::FlushAction> actionMap;
if (firstTime) {
actionMap["endOfEvent"] = G4OpenGLSceneHandler::endOfEvent;
actionMap["endOfRun"] = G4OpenGLSceneHandler::endOfRun;
actionMap["eachPrimitive"] = G4OpenGLSceneHandler::eachPrimitive;
actionMap["NthPrimitive"] = G4OpenGLSceneHandler::NthPrimitive;
actionMap["NthEvent"] = G4OpenGLSceneHandler::NthEvent;
actionMap["never"] = G4OpenGLSceneHandler::never;
// firstTime = false;
// }
firstTime = false;
}
G4String action;
G4int entitiesFlushInterval;
std::istringstream iss(newValue);
@@ -485,6 +451,54 @@ void G4OpenGLViewerMessenger::SetNewValue
return;
}
if (command == fpCommandPrintEPS)
{
pOGLViewer->setExportImageFormat("eps",true);
pOGLViewer->exportImage();
if (pOGLViewer->fVP.IsAutoRefresh())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/refresh");
return;
}
if (command == fpCommandPrintFilename)
{
G4String name;
G4bool inc;
std::istringstream iss(newValue);
iss >> name
>> inc;
pOGLViewer->setExportFilename(name,inc);
return;
}
if (command == fpCommandPrintMode)
{
if (newValue == "vectored") pOGLViewer->fVectoredPs = true;
if (newValue == "pixmap") pOGLViewer->fVectoredPs = false;
return;
}
if (command == fpCommandPrintSize)
{
G4int width,height;
std::istringstream iss(newValue);
iss >> width
>> height;
pOGLViewer->setExportSize(width,height);
return;
}
if (command == fpCommandTransparency)
{
pOGLViewer->transparency_enabled = command->ConvertToBool(newValue);
if (pOGLViewer->fVP.IsAutoRefresh())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/refresh");
return;
}
// Stored viewer commands
G4OpenGLStoredViewer* pOGLSViewer =
dynamic_cast<G4OpenGLStoredViewer*>(pViewer);
@@ -605,6 +619,7 @@ void G4OpenGLViewerMessenger::SetNewValue
return;
}
// Scene handler commands
G4OpenGLStoredSceneHandler* pOGLSSceneHandler =
dynamic_cast<G4OpenGLStoredSceneHandler*>(pViewer->GetSceneHandler());