Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user