Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
+28
View File
@@ -0,0 +1,28 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4interfaces
# Package: Geant4.src.G4interfaces
#
# Top level CMakeLists.txt for a Geant4 Global Library
# or collection of sublibraries
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:45:30 bmorgan Exp $
#
#------------------------------------------------------------------------------
add_subdirectory(GAG)
add_subdirectory(basic)
add_subdirectory(common)
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4interfaces
COMPONENTS
GAG/sources.cmake
basic/sources.cmake
common/sources.cmake
)
endif()
+18
View File
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4UIGAG
# Package: Geant4.src.G4interfaces.G4UIGAG
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:45:39 bmorgan Exp $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+48
View File
@@ -0,0 +1,48 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4UIGAG
# Package: Geant4.src.G4interfaces.G4UIGAG
#
# 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
#
# $Id: sources.cmake,v 1.1 2010/09/29 18:45:47 bmorgan Exp $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/common/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4UIGAG
HEADERS
G4UIGAG.hh
G4UIGainServer.hh
SOURCES
G4UIGAG.cc
G4UIGainServer.cc
GRANULAR_DEPENDENCIES
G4UIcommon
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
G4global
G4intercoms
LINK_LIBRARIES
)
# List any source specific properties here
+103 -5
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.122 2009/11/20 22:15:20 kmura Exp $
$Id: History,v 1.157 2010/11/02 17:39:48 allison Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,16 +17,114 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
8, October L. Garnier (interfaces-V09-03-13)
- G4UIQt : Fiw problem with redraw of help tree.
6, October J. Allison (interfaces-V09-03-12)
- G4UIQt : Remove message about empty viewer (comment out
fEmptyViewerTabLabel - suggested by Laurent).
5, June L. Garnier
- G4UIQt : Fix some bug on helpTree view
23, June L. Garnier
- G4UIQt : Fix compilation warnings on Qt3 and Qt4
22, June L. Garnier (interfaces-V09-03-11)
- G4UIQt : Fix crash when open UI with no vis tab
18, June L. Garnier
- Fix Qt3 compilation bug (setVisible(...) unprotected
17, June G. Cosmo (interfaces-V09-03-10)
- Fixed compilation errors in G4UIQt for Qt3....
17, June K. Murakami (interfaces-V09-03-09)
- Tagged.
10th June L. Garnier
- G4UIQt : Fix crash when del all viewer tabs and create a new one.
Fix widget QLabel strange effect on OSX 10.5
10th June L. Garnier
- G4UIQt : Improvments on OpenGL tab at initialisation (tab size was
too small). Remove some flicker effect at initialisation. Remove a
compilation warning. Improvment on Cout Filter for Qt3
8, June, 2010 K.Murakami (interfaces-V09-03-08)
- G4VBasicShell : wrong version is in the cvs head.
back to previous version (1.14) which includes
a correct bug fix.
4th June L. Garnier (interfaces-V09-03-07)
- G4UIQt : Fix recursive repaint on windows and linux
Also fixed compilation problem for Qt3.
- G4VBasicShell : Command completion improvments (was solve in
v1.14 of G4VBasicShell but don't know why I go one step back)
3rd June J. Allison (interfaces-V09-03-06)
- Tagged.
1st June, L. Garnier
- G4UIQt : Fix bug on Qt >4.5 introduce on 1st June
1st June, L. Garnier (interfaces-V09-03-05)
- G4UIQt : warning on Qt version < 4.5
28 May, L. Garnier
- G4UIQt : Bug fix when compiling on windows
28 May, K. Murakami (interfaces-V09-03-04)
- G4UIExective : session type order is changed.
GUI session is prioritized.
26 May, L. Garnier (interfaces-V09-03-03)
- G4UIQt: Fix some compil errors with qt3
20 May, L. Garnier (interfaces-V09-03-02)
Co-working tag : intercoms-V09-03-01
- G4UIQt: Add some changes in order to register UI in order to access
it after
- G4Qt: Remove a cycle dependency
19 May, L. Garnier
- G4UIQt: Fix a warning in Cout during viewer creation
Fix a flush problem at viewer creation
18 May, L. Garnier
- G4UIQt: Fix an output warning
11 May, J.Allison (interfaces-V09-03-01)
- Tagged interfaces-V09-03-01. (Note: interfaces-V09-03-00 already
used on a patch branch.)
7 May, L. Garnier
- G4UIQt: Add new command in help tree will update immediatly the help tree
(removing a command not code yet)
26 April, L. Garnier
- G4UIQt: Improvments
- G4Qt: Improvments
15 April, 2010 G. Cosmo
- Fixed call to contructor QKeySequence() in G4UIQt:AddButton() to
allow for porting on gcc-4.5.
6 January, 2010 L. Garnier
- G4VBasicShell : improvments for command completion
- G4Qt : Add a link to G4UIQt
- G4UIQt : Add tab widgets in order to put Vis in
20 November, 2009 K. Murakami (interfaces-V09-02-07)
- G4UIExecutive.hh: no default arguments of the constructor
- G4UIExecutive.icc: more cleaver way for suppressing compiler warnings
- G4UIExecutive.hh: no default arguments of the constructor
- G4UIExecutive.icc: more cleaver way for suppressing compiler warnings
20 November, 2009 J. Allison (interfaces-V09-02-06)
- G4UIExecutive.icc: Fixed complier warnings for some cases when more
- G4UIExecutive.icc: Fixed complier warnings for some cases when more
than one flag is set.
19 November, 2009 J. Allison (interfaces-V09-02-05)
- Tagged for the release.
- Tagged for the release.
18 November, 2009 L. Garnier
- G4UIQt: Add CTRL+A and CTRL+E to move to begin/end of command line
+18
View File
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4UIbasic
# Package: Geant4.src.G4interfaces.G4UIbasic
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:45:55 bmorgan Exp $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UIExecutive.icc,v 1.6 2009/11/20 22:10:31 kmura Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UIExecutive.icc,v 1.7 2010/05/28 08:12:27 kmura Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// ====================================================================
// G4UIExecutive.icc
@@ -34,9 +34,9 @@
#include "G4UIsession.hh"
#include "G4UImanager.hh"
#if defined(G4UI_USE_TCSH)
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#if defined(G4UI_USE_QT)
#include "G4UIQt.hh"
#include "G4Qt.hh"
#elif defined(G4UI_USE_XM)
#include "G4UIXm.hh"
@@ -44,9 +44,9 @@
#elif defined(G4UI_USE_WIN32)
#include "G4UIWin32.hh"
#elif defined(G4UI_USE_QT)
#include "G4UIQt.hh"
#include "G4Qt.hh"
#elif defined(G4UI_USE_TCSH)
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#else
#include "G4UIterminal.hh"
@@ -61,12 +61,9 @@ G4UIExecutive::G4UIExecutive(G4int argc, char** argv)
: session(0), shell(0),isGUI(false)
/////////////////////////////////////////////////////
{
#if defined(G4UI_USE_TCSH)
DISCARD_PARAMETER(argc);
DISCARD_PARAMETER(argv);
shell = new G4UItcsh;
session = new G4UIterminal(shell);
#if defined(G4UI_USE_QT)
session = new G4UIQt(argc, argv);
isGUI = true;
#elif defined(G4UI_USE_XM)
session = new G4UIXm(argc, argv);
@@ -78,10 +75,13 @@ G4UIExecutive::G4UIExecutive(G4int argc, char** argv)
session = new G4UIWin32();
#elif defined(G4UI_USE_QT)
session = new G4UIQt(argc, argv);
isGUI = true;
#elif defined(G4UI_USE_TCSH)
DISCARD_PARAMETER(argc);
DISCARD_PARAMETER(argv);
shell = new G4UItcsh;
session = new G4UIterminal(shell);
#else
DISCARD_PARAMETER(argc);
DISCARD_PARAMETER(argv);
@@ -120,7 +120,7 @@ inline void G4UIExecutive::SetPrompt(const G4String& prompt)
}
//////////////////////////////////////////////////////////////
inline void G4UIExecutive::SetLsColor(TermColorIndex dirColor,
inline void G4UIExecutive::SetLsColor(TermColorIndex dirColor,
TermColorIndex cmdColor)
//////////////////////////////////////////////////////////////
{
@@ -132,6 +132,6 @@ inline void G4UIExecutive::SessionStart()
/////////////////////////////////////////
{
session-> SessionStart();
delete session;
delete session;
}
+68 -20
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UIQt.hh,v 1.16 2009/02/16 11:40:26 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UIQt.hh,v 1.23 2010/06/10 15:37:13 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
#ifndef G4UIQt_h
#define G4UIQt_h
@@ -39,6 +39,8 @@
#include <qobject.h>
#include <qmap.h>
#include <qstringlist.h>
#include <qtabwidget.h>
class QMainWindow;
class QLineEdit;
@@ -53,7 +55,10 @@ class QTreeWidgetItem;
#endif
class QTextEdit;
class QLabel;
class QDialog;
class QResizeEvent;
class QToolBox;
class QStringList;
class QSplitter;
// Class description :
//
@@ -75,6 +80,18 @@ class QDialog;
//
// Class description - end :
class G4QTabWidget : public QTabWidget {
public :
G4QTabWidget();
G4QTabWidget(QSplitter*&);
void paintEvent ( QPaintEvent * event );
inline void setTabSelected(bool a) { tabSelected = a; };
inline void setLastTabCreated(int a) { lastCreated = a; };
inline bool isTabSelected() { return tabSelected; };
bool tabSelected;
int lastCreated;
};
class G4UIQt : public QObject, public G4VBasicShell, public G4VInteractiveSession {
Q_OBJECT
@@ -94,6 +111,12 @@ public: // With description
// Second argument is the label of the button.
// Third argument is the Geant4 command executed when the button is fired.
// Ex : AddButton("my_menu","Run","/run/beamOn 1");
bool AddTabWidget(QWidget*,QString,int,int);
// To add a tab for vis openGL Qt driver
bool IsSplitterReleased();
public:
~G4UIQt();
void Prompt(G4String);
@@ -102,16 +125,13 @@ public:
G4int ReceiveG4cout(G4String);
G4int ReceiveG4cerr(G4String);
// G4String GetCommand(Widget);
QMainWindow * getMainWindow();
private:
void SecondaryLoop(G4String); // a VIRER
void TerminalHelp(G4String);
#if QT_VERSION < 0x040000
QListView * CreateHelpTree();
#else
QTreeWidget * CreateHelpTree();
#endif
void CreateHelpWidget();
void InitHelpTree();
void FillHelpTree();
void ExitHelp();
#if QT_VERSION < 0x040000
void CreateChildTree(QListViewItem*,G4UIcommandTree*);
@@ -124,11 +144,22 @@ private:
QString GetCommandList(const G4UIcommand*);
G4bool GetHelpChoice(G4int&) ;// have to be implemeted because we heritate from G4VBasicShell
void ExitHelp();// have to be implemeted because we heritate from G4VBasicShell
bool eventFilter(QObject*,QEvent*);
void ActivateCommand(G4String);
QMap<int,QString> LookForHelpStringInChildTree(G4UIcommandTree *,const QString&);
void CreateVisParametersTBWidget();
void CreateViewComponentsTBWidget();
void CreateHelpTBWidget();
void CreateCoutTBWidget();
void CreateHistoryTBWidget();
void OpenHelpTreeOnCommand(const QString &);
QString GetShortCommandPath(QString);
#if QT_VERSION < 0x040000
QString GetLongCommandPath(QListViewItem*);
#else
QString GetLongCommandPath(QTreeWidgetItem*);
#endif
private:
@@ -139,20 +170,32 @@ private:
QMainWindow * fMainWindow;
QLabel *fCommandLabel;
QLineEdit * fCommandArea;
QTextEdit *fTextArea;
QTextEdit *fCoutTBTextArea;
QTextEdit *fHelpArea;
QToolBox* fToolBox;
QStringList fG4cout;
QLineEdit * fCoutFilter;
#if QT_VERSION < 0x040000
QListView *fCommandHistoryArea;
QListView *fHistoryTBTableList;
QListView *fHelpTreeWidget;
#else
QListWidget *fCommandHistoryArea;
QListWidget *fHistoryTBTableList;
QTreeWidget *fHelpTreeWidget;
#endif
QDialog *fHelpDialog;
QLineEdit *helpLine;
signals :
void myClicked(const QString &text);
QWidget* fHelpTBWidget;
QWidget* fHistoryTBWidget;
QWidget* fCoutTBWidget;
QWidget* fVisParametersTBWidget;
QWidget* fViewComponentsTBWidget;
QLineEdit* fHelpLine;
G4QTabWidget* fTabWidget;
QString fCoutText;
QLabel *fEmptyViewerTabLabel;
QSplitter * fMyVSplitter;
QSplitter * fHelpVSplitter;
int fLastQTabSizeX;
int fLastQTabSizeY;
private slots :
void ExitSession();
@@ -163,7 +206,12 @@ private slots :
void HelpTreeDoubleClicCallback();
void ShowHelpCallback();
void CommandHistoryCallback();
void lookForHelpStringCallback();
void LookForHelpStringCallback();
void UpdateTabWidget(int);
void ResizeTabWidget( QResizeEvent* );
void CoutFilterCallback(const QString&);
void TabCloseCallback(int);
void ToolBoxActivated(int);
};
#endif
+146
View File
@@ -0,0 +1,146 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4UIbasic
# Package: Geant4.src.G4interfaces.G4UIbasic
#
# 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
#
# $Id: sources.cmake,v 1.4 2010/11/29 17:04:04 bmorgan Exp $
# GEANT4 Tag $Name: geant4-09-04 $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/common/include)
#
# Module has optional sources
#
include(Geant4MacroDefineModule)
# List those always built
set(G4INTERFACES_BASIC_MODULE_HEADERS
G4UIArrayString.hh
G4UIExecutive.hh
G4UIExecutive.icc
G4UIcsh.hh
G4UIterminal.hh
G4VUIshell.hh)
set(G4INTERFACES_BASIC_MODULE_SOURCES
G4UIArrayString.cc
G4UIcsh.cc
G4UIterminal.cc
G4VUIshell.cc)
set(G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES )
#
# Tcsh only on UNIX style systems
#
if(UNIX)
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UItcsh.hh)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UItcsh.cc)
endif()
#
# Win32 terminal only on Win32 and if selected.
#
if(WIN32 AND GEANT4_USE_WIN32TERMINAL)
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIWin32.hh)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIWin32.cc)
endif()
#
# Qt only if selected.
#
if(GEANT4_USE_QT)
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIQt.hh)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIQt.cc)
# Now need to add Qt in to build moc wrappers
include(${QT_USE_FILE})
# Add the moc sources - must use an absolute path to the files being
# wrapped
QT4_WRAP_CPP(G4INTERFACES_MOC_SOURCES
${CMAKE_SOURCE_DIR}/source/interfaces/basic/include/G4UIQt.hh
OPTIONS -DG4UI_BUILD_QT_SESSION)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES ${G4INTERFACES_MOC_SOURCES})
# Add the definitions
# We have to also add in G4INTY_BUILD_QT 'cause G4QT header needs that...
GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES G4UIQt.cc
COMPILE_DEFINITIONS G4UI_BUILD_QT_SESSION;G4INTY_BUILD_QT)
# and for the moc file...
set_source_files_properties(${G4INTERFACES_MOC_SOURCES}
PROPERTIES COMPILE_DEFINITIONS G4UI_BUILD_QT_SESSION)
# Add the extra libraries - seem to need to quote variables to get
# both linked in.
list(APPEND G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES
"${QT_QTGUI_LIBRARY};${QT_QTCORE_LIBRARY}")
endif()
#
# Xm and Xaw only on UNIX and if selected
#
if(UNIX)
if(GEANT4_USE_XM)
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIXm.hh)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIXm.cc)
# Any other includes, libraries here
endif()
if(GEANT4_USE_XAW)
list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIXaw.hh)
list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIXaw.cc)
# Any other includes, libraries here
endif()
endif()
#
# Define the Geant4 Module.
#
GEANT4_DEFINE_MODULE(NAME G4UIbasic
HEADERS
${G4INTERFACES_BASIC_MODULE_HEADERS}
SOURCES
${G4INTERFACES_BASIC_MODULE_SOURCES}
GRANULAR_DEPENDENCIES
G4UIcommon
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
G4global
G4intercoms
LINK_LIBRARIES
${G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES}
)
# List any source specific properties here
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4UIcommon
# Package: Geant4.src.G4interfaces.G4UIcommon
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:46:11 bmorgan Exp $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+2 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.4 2009/10/19 07:37:48 lgarnier Exp $
# $Id: GNUmakefile,v 1.5 2010/01/06 14:08:20 lgarnier Exp $
# -------------------------------------------------------------
# GNUmakefile for interfaces/common library. John Allison, 6/7/98.
@@ -18,5 +18,6 @@ include $(G4INSTALL)/config/interactivity.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include
CPPFLAGS += -I$(G4BASE)/intercoms/include
CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
include $(G4INSTALL)/config/common.gmk
+6 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Qt.hh,v 1.4 2008/11/06 10:06:33 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4Qt.hh,v 1.6 2010/05/20 07:01:03 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// To unify Qt event treatment between
// G4/interfaces Qt sessions and G4/visualizations Qt drivers.
@@ -38,6 +38,9 @@
#include "G4VInteractorManager.hh"
class QWidget;
class QString;
// Class description :
//
// G4Qt : a singleton to handle GUI sessions and visualization
@@ -55,6 +58,7 @@ public:
void* GetEvent();
void FlushAndWaitExecution();
virtual ~G4Qt();
private:
G4Qt (int,char**,char*);
static G4Qt* instance; // Pointer to single instance.
+108
View File
@@ -0,0 +1,108 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4UIcommon
# Package: Geant4.src.G4interfaces.G4UIcommon
#
# 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
#
# $Id: sources.cmake,v 1.4 2010/11/30 12:00:56 bmorgan Exp $
# GEANT4 Tag $Name: geant4-09-04 $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
#include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/basic/include)
#
# Module has optional sources
#
# List those always built
set(G4INTERFACES_COMMON_MODULE_HEADERS
G4InteractorMessenger.hh
G4VBasicShell.hh
G4VInteractiveSession.hh
G4VInteractorManager.hh)
set(G4INTERFACES_COMMON_MODULE_SOURCES
G4InteractorMessenger.cc
G4VBasicShell.cc
G4VInteractiveSession.cc
G4VInteractorManager.cc)
set(G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES )
#
# Add Qt if required
#
if(GEANT4_USE_QT)
# Add the sources
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Qt.hh)
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Qt.cc)
# Stuff for Moc etc, plus LINK_LIBRARIES here
include(${QT_USE_FILE})
# Must enable Qt source with a def...
GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES G4Qt.cc
COMPILE_DEFINITIONS G4INTY_BUILD_QT)
# It uses Qt core and gui(?) libs
list(APPEND G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES
"${QT_QTGUI_LIBRARY};${QT_QTCORE_LIBRARY}")
endif()
#
# Win32 option
#
if(MSVC AND GEANT4_USE_WIN32TERMINAL)
# Add the sources
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Win32.hh)
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Win32.cc)
# Any extra things here
endif()
#
# X11/Xt options
#
if(UNIX AND GEANT4_USE_X11TERMINAL)
# Add the sources
list(APPEND G4INTERFACES_COMMON_MODULE_HEADERS G4Xt.hh)
list(APPEND G4INTERFACES_COMMON_MODULE_SOURCES G4Xt.cc)
# Any extra things here
endif()
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4UIcommon
HEADERS
${G4INTERFACES_COMMON_MODULE_HEADERS}
SOURCES
${G4INTERFACES_COMMON_MODULE_SOURCES}
GRANULAR_DEPENDENCIES
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
G4global
G4intercoms
LINK_LIBRARIES
${G4INTERFACES_COMMON_MODULE_LINK_LIBRARIES}
)
# List any source specific properties here
+11 -5
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Qt.cc,v 1.14 2009/10/07 09:12:35 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4Qt.cc,v 1.17 2010/05/20 07:01:03 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
// L. Garnier
@@ -37,6 +37,7 @@
#include "G4ios.hh"
#include "G4Qt.hh"
#include <qwidget.h>
#include <qapplication.h>
@@ -72,7 +73,7 @@ G4Qt::G4Qt (
int a_argn
,char** a_args
,char* /*a_class */
)
)
/***************************************************************************/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
{
@@ -123,6 +124,9 @@ G4Qt::G4Qt (
#if QT_VERSION < 0x040000
qApp = new QApplication (*p_argn, args);
#else
#ifdef G4DEBUG_INTERFACES_COMMON
printf("G4Qt::G4Qt QAppl \n");
#endif
new QApplication (*p_argn, args);
#endif
if(!qApp) {
@@ -131,6 +135,9 @@ G4Qt::G4Qt (
} else {
QtInited = TRUE;
if (a_argn != 0) {
#ifdef G4DEBUG_INTERFACES_COMMON
printf("G4Qt::G4Qt SetMainInteractor\n");
#endif
SetMainInteractor (qApp);
}
SetArguments (a_argn,a_args);
@@ -142,7 +149,7 @@ G4Qt::G4Qt (
}
#ifdef G4DEBUG_INTERFACES_COMMON
if (qApp) {
printf("G4Qt::qApp exist\n");
printf("G4Qt::qApp already exist\n");
} else {
printf("G4Qt::qApp not exist\n");
}
@@ -200,4 +207,3 @@ void G4Qt::FlushAndWaitExecution (
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VBasicShell.cc,v 1.14 2009/11/17 17:41:33 lgarnier Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4VBasicShell.cc,v 1.16 2010/06/08 04:39:22 kmura Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
#include "G4VBasicShell.hh"