00001 //<<<<<< INCLUDES >>>>>> 00002 00003 #include "VisSimulation/VisSimBase/interface/VisSimContent.h" 00004 #include "Iguana/Studio/interface/IgQtObjectMenuService.h" 00005 #include "Iguana/Studio/interface/IgQtObjectMenuMessage.h" 00006 #include "Iguana/Studio/interface/IgTwigOps.h" 00007 #include "VisGeant4/VisG4Core/interface/VisG4VisManager.h" 00008 #include "VisGeant4/VisG4Core/interface/VisG4UIManager.h" 00009 #include "VisGeant4/VisG4Volumes/interface/VisG4TwigOps.h" 00010 #include <classlib/utils/Callback.h> 00011 #include <qapplication.h> 00012 00013 //<<<<<< PRIVATE DEFINES >>>>>> 00014 //<<<<<< PRIVATE CONSTANTS >>>>>> 00015 //<<<<<< PRIVATE TYPES >>>>>> 00016 //<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> 00017 //<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> 00018 //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> 00019 00020 IG_DEFINE_STATE_ELEMENT (VisSimContent, "Data/Simulation/Core"); 00021 00022 //<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> 00023 //<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> 00024 //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> 00025 00027 VisSimContent::VisSimContent (IgState *state) 00028 : VisContent (state, s_key, MAIN_THREAD, 00029 lat::CreateCallback (this, &VisSimContent::init)) 00030 {} 00031 00033 void 00034 VisSimContent::init (void) 00035 { 00036 // Setup G4 00037 qApp->lock (); 00038 new VisG4VisManager (state ()); 00039 new VisG4UIManager (state ()); 00040 00041 // Register object action menus 00042 ASSERT (IgQtObjectMenuService::get (state ())); 00043 IgQtObjectMenuService::get (state ()) 00044 ->add (lat::CreateCallback (new IgTwigOps, &IgTwigOps::menuAction)); 00045 IgQtObjectMenuService::get (state ()) 00046 ->add (lat::CreateCallback (new VisG4TwigOps, &VisG4TwigOps::menuAction)); 00047 qApp->unlock (false); 00048 }