Index: trunk/source/interfaces/#History#
===================================================================
--- trunk/source/interfaces/#History#	(revision 1350)
+++ trunk/source/interfaces/#History#	(revision 1350)
@@ -0,0 +1,659 @@
+$Id: History,v 1.158 2010/12/23 14:09:53 lgarnier Exp $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                      Category History file
+                      ---------------------
+This file should be used by G4 developers and category coordinators
+to briefly summarize all major modifications introduced in the code
+and keep track of all category-tags.
+It DOES NOT substitute the  CVS log-message one should put at every
+committal in the CVS repository !
+
+     ----------------------------------------------------------
+     * Reverse chronological order (last date on top), please *
+     ----------------------------------------------------------
+
+23, December L. Garnier 
+- basic/GNUmakefile : Remove OGL stuff from Makefile
+- common/GNUmakefile : Remove OGL stuff from Makefile
+
+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
+
+20 November, 2009 J. Allison (interfaces-V09-02-06)
+ - 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.
+
+18 November, 2009 L. Garnier
+ - G4UIQt: Add CTRL+A and CTRL+E to move to begin/end of command line
+
+17 November, 2009 L. Garnier
+ - G4VBasicShell: Fix commands strings that match some shorter 
+   commands are trimmed and executed as those shorter commands.
+
+5 November, 2009 L. Garnier
+ - G4UIQt Fix a problem introduce the 6th October 2009 and cause
+   some widget display strange things on qt3
+
+19 October, 2009 L. Garnier
+ - basic/GNUMakefile Add optionnal debug flag
+
+6 October, 2009 L. Garnier
+ - G4UIQt Fix a problem on macOSX 10.6 with Qt 4.6(preview)
+ - Change GEANT4_QT_DEBUG flag for G4DEBUG_INTERFACES_BASIC and 
+   G4DEBUG_INTERFACES_COMMON
+
+28 May, 2009 K. Murakami (interfaces-V09-02-03)
+ - G4UIExecutive: add  IsGUI() method / add GetSession() method
+
+18 May, 2009 K. Murakami (interfaces-V09-02-02)
+ - G4UIExecutive : fixed wrong #ifdef condition
+ - include changes by Laurent (7/May)
+
+15 May, 2009 K. Murakami (interfaces-V09-02-01)
+ - G4UIExecutive : Remove batch mode handling
+
+13 May, 2009 K. Murakami (interfaces-V09-02-00)
+ - G4UIExecutive : Add new class for automatic instantiation of user session
+ - G4VUIshell : Add SetLsColor()
+
+7, May, 2009 L. Garnier
+ - G4UIQt.cc : Fix Compilation warning 
+ - G4VBasicShell.cc : Better command completion in command Line 
+
+31, March, 2009 L.Garnier
+ - Fix a compilation warning in G4Qt.cc
+
+16 February 2009, Laurent Garnier
+ - G4UIQt : Add an Interactor to be able to add button on file and help menu
+ - G4UIQt : Add a public method to get the MainWindow
+
+27, November, 2008 K. Murakami (interfaces-V09-01-04)
+ - G4UIQt.cc: warning fix
+
+21, November, 2008 K. Murakami (interfaces-V09-01-03)
+ -tagged for release 9.2
+
+14 November, 2008 Laurent Garnier
+ - G4UIXm,G4Win32 : Renaming according to Geant4 code policy
+
+6 November, 2008 Laurent Garnier
+ - G4Qt : Re-fix problem on some linux with QApplication, should be better
+ - G4Qt : Add availabity to launch a G4Qt without a G4UIQt
+
+24 October, 2008 Laurent Garnier
+ - Change GEANT4_QT_DEBUG flag by QTDEBUG
+ - Suppress unuseful DEBUG messages
+
+15 October, 2008 Laurent Garnier
+ - Fix a problem on some linux with QApplication. But this is NOT the good way to do it...
+ - Fix a qt3 backward compatibility on G4UIQt.cc
+
+7 October, 2008 Laurent Garnier
+ - Fix a G4cout possible problem cause by recursive G4cout call.
+
+2 October, 2008 Laurent Garnier
+ - Add availability to have a external Qapp
+
+22 July, 2008 K.Murakami (interfaces-V09-01-02)
+ - tagged
+ - direct exit calls are replaced with G4Exception/another way of exit
+   G4UIGainServer.cc, G4UIterminal.cc : call G4Exception
+   G4UItcsh.cc : nomal exit instead of direct calling exit()
+
+14 June, 2008 K.Murakami (interfaces-V09-01-01)
+ - tagged
+
+30th April, Laurent Garnier
+ - Include moc config in GNUmakefile
+
+10th March, Laurent Garnier
+ - Improvments for layout in Qt driver for Qt3
+
+30th January 2007, Laurent Garnier
+ - Add a search area in the help widget
+
+15th January 2007, Laurent Garnier
+ - Fixed some layout problems
+ - GNUmakefile : Added a macro for moc file
+ - Moc files : Suppression of all theses files. They are now autogenerated 
+   thanks to config/common.gmk
+
+15 January 2007, Koichi Murakami (interfaces-V09-01-00)
+ - G4UItcsh.cc: fixed the problem with Ctl-D termination for bash users.
+
+30 November 2007, Laurent Garnier
+ - G4UIQt : Some improvements for Qt3, corrections of some bugs
+ - G4UIQt_moc.cc : Adding other versions for QT_MOC_REVISION 28,58 and
+   59, but this is not the right solution..
+ - GAG/Makefile : Suppression of linking on a unuseful library
+
+16 November 2007, Koichi Murakami (interfaces-V09-00-03)
+ - G4UIGainServer.cc: cleared a compilation warning.
+ - tagged for the 9.1 release.
+
+15 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Adding a GEANT4_QT_DEBUG flag to hide all debug messages
+ - G4UIQt,G4Qt : Compilation improvements for Qt3
+ - G4UIQt,G4Qt : Minors corrections on G4UIQt helpWidget
+
+13 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Moving all moc in one big file interface/G4UIQT_moc.cc,
+   including Qt3 and Qt4 moc support
+
+09 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Change all include directive to be compatible with Qt3
+
+27 Sept 2007, Laurent Garnier
+ - Adding sur files for G4UIQt driver
+
+06 November Koichi Murakami
+- G4UItcsh.cc: store shell history across sessions.
+
+30 October 2007 Koichi Murakami (interfaces-V09-00-02)
+- Guy committed the new Qt interface (28/Sep).
+- Add "#ifdef G4UI_BUILD_QT_SESSION" protection in src/G4UIQt_moc.cc.
+- Remove Qt interface from the current tag.
+- G4UIGAG.cc: suppress a compilation warning.
+
+30 October 2007 Koichi Murakami (interfaces-V09-00-01)
+- Makoto updated the implementation of the signal handler for Ctrl-C.
+
+28 October 2007, Makoto Asai
+- Remove improper dependency from interfaces/basic to run in GNUmakefile
+
+02 August 2007, Koichi Murakami (interfaces-V09-00-00)
+- Fix compilation warning on SUN-CC in G4UIterminal.cc
+
+19 June 2007, Gabriele Cosmo (interfaces-V08-03-02)
+- Fix compilation error on Windows ('theShell' not declared).
+
+14 June 2007, Koichi Murakami (interfaces-V08-03-01)
+- fixed the problem with Ctl-C termination for bash users.
+ * G4VUIshell   : add a virtual method ResetTerminal()
+ * G4UItcsh     : add a method ResetTerminal()
+ * G4UIterminal : add terminal reset when Ctl-C termination
+
+22 May 2007, Koichi Murakami (interface-V08-03-00)
+- G4UIterminal.cc: implement signal handler for soft-abort
+
+28 November 2005, Gabriele Cosmo (interface-V07-01-02)
+- G4UIXm.cc migrated to sstream
+
+21 November 2005, Hajime Yoshida (interface-V07-01-01)
+- G4UIGAG.cc and G4UIGainServer.cc migrated to sstream
+
+26 October 2005, Koichi Murakami (interfaces-V07-01-00)
+- G4UItcsh/G4UIterminal/G4VBasicShell: 
+  migration from strstream to sstream
+
+22 April 2005, Gabriele Cosmo (interfaces-V07-00-01)
+- G4UIGainServer: fixed conditional compilation for MacOS 10.4.
+
+26 January 2005, Gabriele Cosmo (interfaces-V07-00-00)
+- Removed explicit definition of G4TMPDIR in GNUmakefiles
+  (not necessary since already defined in common.gmk).
+
+27 November 2004, Hajime Yoshida (interfaces-V06-02-00)
+- Tagged.
+
+25 November 2004, Hajime Yoshida (interfaces-V06-01-02)
+- Tagged.
+
+21 November 2004, Guy Barrand
+- G4UIXm.cc: have some nice default resources in case XENVIRONMENT not set.
+
+07 June 2004, Gabriele Cosmo (interfaces-V06-01-01)
+- G4UIWin32.cc: move usage of inline methods to non-inline for DLLs
+  support on Windows.
+- GNUmakefile: added definition of GLOBLIBS for DLLs support on Windows.
+
+09 April 2004, John Allison (interfaces-V06-01-00 + vis-V06-01-01)
+- Tagged G4[UI]Win32[.hh,.cc] as below.  Joint with vis-V06-01-01.
+
+08 April 2004, Guy Barrand
+- G4[UI]Win32[.hh,.cc] : modify things in order to be able to use
+  a standard C main (and avoid the WinMain).
+
+22 October 2003, Guy Barrand (interfaces-V05-02-00)
+- OPACS : archived obsolete OPACS module and cleared build setup.
+
+17 October 2003, Guy Barrand
+- G4Xt.cc : removed unused and commented code.
+
+11 June 2003, Gabriele Cosmo (interfaces-V05-01-02)
+- G4UIWin32.cc: cleared warning on redefinition of 'pascal' reported on
+  WIN32-VC system.
+
+04 June 2003, Gabriele Cosmo (interfaces-V05-01-01)
+- Fixes for inclusion of <strstream> in G4UIXm.cc, G4UItcsh.cc and
+  G4UIterminal.cc in view of the g4std wrappers migration.
+
+30 May 2003, Gabriele Cosmo (interfaces-V05-01-00)
+- Fixed few pedantic warnings...
+- G4UIGainServer.cc: fixed compilation problem on Darwin-g++ with gcc-3.X.
+
+04 December 2002, Makoto Asai (interfaces-V04-01-01, interfaces-V04-01-02)
+- Migration to new G4ApplicationState.
+
+15 November 2002, Hajime Yoshida (interfaces-V04-01-00)
+- basic/src/G4UIArrayStrings.cc is now working for "konsole" type termcap.
+	by Koichi Murakami
+
+09 November 2002, Hajime Yoshida (interfaces-V04-00-05)
+- G4UIGainServer.cc uses socklen_t as before. It must work for Solaris CC and HP.
+- test/G4cout_test01 updated. An example of setCoutDestination(UI) by a user.
+
+06 November 2002, Guy Barrand
+- G4Xt.cc, G4UIXm.cc, G4UIXaw.cc : fix some warings.
+
+14 June 2002, Hajime Yoshida (interfaces-V04-00-04)
+- G4UIGainServer.cc/hh have a protection: #ifndef WIN32 ~ #endif not to compile
+	on WIndows.
+
+14 June 2002, Hajime Yoshida (interfaces-V04-00-04)
+- Added protection #ifndef WIN32 to new class G4UIGainServer in definition
+  and body, to prevent compilation on Windows platforms.
+
+12 June 2002, Gabriele Cosmo (interfaces-V04-00-03)
+- Fixes for porting on platforms other than Linux.
+  o socklen_t is Linux specific and not defined elsewhere; changed to int*.
+  o Fixed usage g4std/iostream, globals.hh and endl/G4endl.
+
+12 June 2002, Hajime Yoshida (interfaces-V04-00-02)
+- Introduced new class G4UIGainServer, socket extension for G4UIGAG.
+- added GAG/src/G4UIGainSErver.cc and GAG/include/G4UIGainServer.hh
+- G4UIGainServer is the new member of libG4UIGAG.so(a)
+	(no modification to GNUmakefiles)
+
+26 April 2002, Makoto Asai (interfaces-V04-00-01)
+- Corresponds to interfaces change in intercoms category (intercoms-V04-00-00)
+ Affected files :
+  basics/src/G4VUIshell.cc
+  common/src/G4VBasicShell.cc
+  GAG/src/G4UIGAG.cc
+
+25 February 2002, Makoto Asai (interfaces-V04-00-00)
+- fix for odd behavior on Windows in G4UIchs.cc
+
+03 December 2001 Guy Barrand (interfaces-V03-02-04)
+- G4VInteractorManager::RemoveDispatcher : change the "std::remove"
+  logic in order to fix a disfunctionning with vis/OpenInventor driver.
+- G4Xt.cc : remove some g++ compilation warnings about unused 
+  iconify functions.
+
+29 November 2001 Hajime Yoshida (interfaces-V03-02-03)
+- Fix G4UIGAG.cc for alias command (following G4UIterminal's modif)
+
+26 November 2002 Makoto Asai (interfaces-V03-02-02)
+- Fix compilation warnings caused by gcc-2.95.2 for basic sub-directory.
+
+23 November 2001 Makoto Asai (interfaces-V03-02-01)
+- Fix G4UIterminal to display a command line AFTER solving aliases
+  in case the command caused "command not found".
+- Fix G4UItcsh.hh not to have warning message.
+
+22 October 2001 Hajime Yoshida
+-G4UIGAG.cc no more compiler warning due to G4String
+
+22 October 2001 Hajime Yoshida
+- G4UIGAG ; no compilation warning with g++-2.95
+
+11 August 2001  John Allison (interfaces-V03-02-00)
+- Re-engineered G4UI variables.  Coworks with config-V03-02-04.
+- Changed GNUmakefile so that GAG, TERMINAL and TCSH built by default.
+- Nothing built if G4UI_NONE is set.
+
+29 November 2000 Makoto Asai (interfaces-V02-00-03)
+- Tag for Guy's correction.
+
+28 November 2000 Guy Barrand
+- G4Xt.cc ; SUN-CC : correct warning : argc hides G4VInteractorManager::argc.
+
+27 November 2000 Makoto Asai (interfaces-V02-00-02)
+- G4VUIShell.hh : add virtual keyword to the destructor.
+
+11 August 2000 Guy Barrand
+- G4UIWo.cc : add some cast in order to compile with OSF1/cxx strict_ansi mode.
+
+1 August 2000 Gabriele Cosmo (interfaces-V02-00-01)
+- Fixed warnings on HP-aCC system in G4UItcsh.cc, due to unproper usage of G4int
+  where unsigned (size_t) was requested instead.
+
+31 July 2000 Gonzalo Gracia
+- Modifications required to compile on NT
+  Operator string::[] requires size_t argument. 
+  Cast from integer to size_t in several places in basic/src/G4UIArrayString.cc
+  and G4VUIshell.cc
+
+22 July 2000 Makoto Asai (interfaces-V02-00-00)
+- Modify G4UIterminal, G4VUIshell, G4UIcsh and G4UItcsh to display the
+  break status as a prompt characters.
+
+25 June 2000 John Allison (interfaces-V01-01-06-old-G4UIterminal)
+- As interfaces-V01-01-06 but old revisions of G4UIterminal.cc/hh.
+
+23 June 2000 John Allison (interfaces-V01-01-06)
+- Protected G4UIterminal, G4Ui[t]csh against access by index to null strings.
+
+21 June 2000 John Allison (interfaces-V01-01-05)
+- Added include $(G4INSTALL)/config/G4VIS_BUILD.gmk to common/GNUmakefile.
+
+15 June 2000 John Allison (interfaces-V01-01-04)
+- More ISO compliance for G4UIterminal class.
+
+14 June 2000 Makoto Asai (interfaces-V01-01-03)
+- ISO compliance for G4UItcsh classes
+
+26 May 2000 Guy Barrand  (interfaces-V01-01-02)
+- G4UIXm.hh, G4UIWin32.hh : change comments about /gui for the doc.
+
+23 May 2000 John Allison (interfaces-V01-01-01-without-tcsh)
+- Tag without G4UIterminal(G4UItcsh) in case it is not needed in the release.
+
+20 May 2000 Guy Barrand  (interfaces-V01-01-01)
+- common/G4InteractorMessenger : change command name "interactor" to "gui".
+
+19 May 2000 John Allison  (interfaces-V01-01-00)
+- G4UIterminal displays a candidate list in case a given parameter is
+  wrong (Makoto Asai).
+
+26 Mar 2000 Makoto Asai
+- Introducing a new G4UIterminal with UNIX-like shell.
+
+10 Nov 1999 Hajime Yoshida  (interfaces-V00-01-03)
+- Added less<G4String> argument (Guy).
+- G4UIWin32.hh, G4UIXm.hh : usage of G4std::less in G4std::map.
+- G4VInteractorManager.cc : G4std::find, G4std::remove.
+
+08 Nov 1999 Hajime Yoshida
+- tag interfaces--V00-01-02 for STT
+
+08 Nov 1999 Hajime Yoshida
+- GAG/src/G4UIGAG.cc RWT => STL vector
+- basic/include/G4UIterminal.hh, GAG/include/G4UIGAG.hh => documentation
+
+02 Nov 1999 Guy Barrand
+- doc comments for G4UIWin32.hh, G4UIXm.hh, G4UIXaw.hh, G4Xt.hh, G4Win32.hh, G4VInterativeSession.hh, G4VInteractorManager.hh.
+
+02 Nov 1999 Guy Barrand
+- basic/G4UIWin32, G4UIXm : RW -> STL.
+- common/G4VBasicShell, G4VInteractiveSession, G4VInteractorManager : RW -> STL.
+29 Oct. 1999 Hajime Yoshida
+- tag interfaces-V00-01-01
+
+27 Oct. 1999 Guy Barrand
+- interfaces/common/src/G4Xt.cc : protect XtAppInit against 
+  shell zero widthxheight. Give a default to geometry resource.
+
+21 Oct. 1999 John Allison
+- Made XtAppContext appContext static in G4Xt.cc.  Speeds OGLSXm but
+  OGLIXm is still slow - why?
+
+12 Oct. 1999 John Allison for Hajime Yoshida (tag interfaces-V00-01-00a)
+- Protection for zero length strings for Sun in G4UIterminal and G4UIGAG.
+
+02 Sep. 1999 Hajime Yoshida
+  to geant4-00-01-ref-01 (Revision 1.9)
+  a new tag is interfaces-01-00-04
+  after which a tag interfaces-V00-01-00 was added identical to
+    interfaces-01-00-04 except for this History file.
+
+- G4UIterminal.cc and G4UIGAG.cc now shows prompt characters
+	to an input of return (or null command line).
+
+head 31 Mai 1999  Guy Barrand
+- G4VInteractorManager::SecondaryLoop : add a message to indicate
+  that we enter a "viewer" secondary X event loop and that someone
+  add to "Escape" it from the viewer to continue.
+
+interfaces-01-00-03  19th April 1999  John Allison
+- Protected G4VBasicShell.cc with if( tempPath.length()>0 ).
+
+interfaces-01-00-02  18th April 1999  John Allison
+- Tagged.
+
+head 11th Mai 1999  Guy Barrand
+1) G4UIXm : Linux, correct geometry management of the menubar.
+
+head 06th Mai 1999  Guy Barrand
+1) G4Win32, G4UIWin32 : modifications to compile with Visual-6.0.
+
+head 16th April 1999  Guy Barrand
+1) G4VBasicShell, G4UIXm, G4UIWin32 : command completion.
+2) G4InteractorMessenger, G4VInteractorManager : code polishement.
+
+interfaces-01-00-01  15th April 1999  Hajime Yoshida/Masayasu Nagamatu
+1) some code polishment after the messages by CodeWarriers (Guy)
+2) Help functions in G4VBasicShell and related rearrangement of
+        G4UIterminal etc.. (Guy)
+3) removal of ifdef for GNU_GCC in G4UIGAG. (Hajime)
+
+interfaces-00-03-07 9th December 1998 Hajime Yoshida/Masayasu Nagamatu
+- minor improvements in Help of G4UIterminal.cc
+- G4UIGAG's Help in terminal mode is now equivalent to G4UIterminal.cc
+
+interfaces-00-03-06 27th November 1998 Hajime Yoshida/Masayasu Nagamatu
+- added 'if' protection to the destructor of G4UIterminal/G4UIGAG.
+
+interfaces-00-03-05 12th November 1998 Masayasu Nagamatu
+-test/G4cout_test01/ added an example for redirectiong stream using G4cout
+
+interfaces-00-03-04  13th October 1998  Masayasu Nagamatu
+- G4cout - changes to G4UIterminal.cc, G4UIGAG.hh, G4UIGAG.cc.
+
+07 Ocotober 1998  Guy Barrand:
+- G4UIXm.cc, G4UIWin32.cc : cout, cerr control.
+
+interfaces-00-03-03 7th  October Hajime Yoshida
+- Bug fix to prevent "help" crashing in some circumstances.
+
+interfaces-00-03-02 14th Sep. Hajime Yoshida
+	- fix to G4UIGAG (not bugs but correction of minor 
+		ydifferences with G4UIterminal)
+
+interfaces-00-03-01  12th Sep.  Hajime Yoshida and Masayasu Nagamatu
+- CTRL-D doesn't invoke infinite loop.
+- CRTL-D now means
+	- EOF in the redirected cin
+	- End of Session, just as "exit" command of GEANT4
+- Affected files are basic/src/G4UIterminal.cc
+			GAG/src/G4UIGAG.cc
+
+interfaces-00-02-01  9th August  John Allison
+- Tagged Guy's changes.
+
+7th August  Guy Barrand.
+- common, OPACS : new interactor parenting logic.
+
+interfaces-00-01-04  8th July 1998  John Allison
+- Emptied xvt_standalone_test; files moved to environments/XVT.
+
+interfaces-00-01-03  7th July 1998  John Allison
+- Emptied standalone_test; files moved to environments/Momo or no
+  longer needed.
+
+7th July 1998  Guy Barrand
+- Added include $(G4INSTALL)/config/interactivity.gmk to GNUmakefiles.
+
+interfaces-00-01-02 7th July 1998  John Allison
+- Forced revision 2.1 on files in newly committed directories.
+
+interfaces-00-01-01 6th July 1998  John Allison
+- Big restructuring.  Moved files from include/ and src/ to:
+  common/, basic/, GAG/, OPACS/, XVT/.
+  Created G4UI_BUILD.gmk and G4UI_USE.gmk in config/.
+  Changed the GNUmakefiles accordingly.
+
+interfaces-00-07-01 2nd July 1998  Gabriele Cosmo
+- Updates to G4UIWo and G4VInteractorManager by G.Barrand.
+
+interfaces-00-06-05 26th June 1998  Gabriele Cosmo
+- Updated GNUmakefiles to new electromagnetics structure.
+
+interfaces-00-06-04a 22nd June 1998  John Allison
+- Removed ./standalone_test/run/example34/GNUmakefile.G4VIS_USE and
+  ./standalone_test/run/example35/GNUmakefile.G4VIS_USE
+
+interfaces-00-06-04 22nd June 1998  John Allison
+- Added #ifdef GNU_GCC for template instantiation in src/G4UIGAG.cc.
+- Changed GNUmakefiles for G4VIS_USE.gmk.
+
+May 6, 98 M.Asai
+- Introducing a new abstract base class G4VBasicShell.
+- G4UIterminal has been modified according to use G4VBasicShell.
+
+22th April 1998  Hajime Yoshida / Masayasu Nagamatsu (interfaces-00-05-03)
+-  the following three directories are tagged.
+ interfaces/standalone_test/Momo/java/GGE
+ interfaces/standalone_test/Momo/java/RMI
+ interfaces/standalone_test/run/example35
+
+20th April 1998  Hajime Yoshida / Masayasu Nagamatsu (interfaces-00-05-02)
+- update for Momo and G4UIGAG, including many improvement and bug fixes.
+  see the interfaces/standalone_test/README_Momo.html for datails.
+- example35 is added; new example program to show the capability of GUI(GAG).
+
+15th April 1998 : Guy Barrand
+- From discussion with John and Simone G4VToolkit 
+  has been renamed to G4VInteractorManager.
+
+4th April 1998 Nagamatu Masayasu (interfaces-00-05-01)
+- correspond to the modification by  G.Barrand
+  G4UI_BUILD_xxx_DRIVER -> G4UI_BUILD_xxx_SESSION
+  Modifications for Win32/NT.
+
+April 2, 98 G.Barrand
+- G4UI_BUILD_xxx_DRIVER -> G4UI_BUILD_xxx_SESSION
+- Modifications for Win32/NT.
+
+26th March 1998  John Allison
+- Changed G4VisManager to MyVisManager in example34.cc and xvt.benchmark.cc
+  for vis-00-05-01 and later.
+
+6th March 1998 Hajime Yoshida / Nagamatu Masayasu (interfaces-00-04-01)
+- First tag with modeling under visualization
+- small bug fix for Momo
+
+29th January 1998 Masayasu Nagamatu / Hajime Yoshida (interfaces-00-03-01)
+- Update of Momo(GAG/GGE), standalone_test/ directory.
+
+27th January 1998  John Allison
+- Simplfied use of G4VIS flags in test GNUmakefiles.
+- New way of instantiating G4VisManager in test main() programs.
+
+December 19, 97 G. Cosmo - (alpha03)
+
+- Created.
+
+Januray 19 , 98 G. Barrand
+
+- Update G4UIXaw, G4UIXm to take into account
+  pauseStartSession method.
+
Index: trunk/source/interfaces/CMakeLists.txt
===================================================================
--- trunk/source/interfaces/CMakeLists.txt	(revision 1350)
+++ trunk/source/interfaces/CMakeLists.txt	(revision 1350)
@@ -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()
+
Index: trunk/source/interfaces/GAG/CMakeLists.txt
===================================================================
--- trunk/source/interfaces/GAG/CMakeLists.txt	(revision 1350)
+++ trunk/source/interfaces/GAG/CMakeLists.txt	(revision 1350)
@@ -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()
+
Index: trunk/source/interfaces/GAG/sources.cmake
===================================================================
--- trunk/source/interfaces/GAG/sources.cmake	(revision 1350)
+++ trunk/source/interfaces/GAG/sources.cmake	(revision 1350)
@@ -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
+
Index: trunk/source/interfaces/History~
===================================================================
--- trunk/source/interfaces/History~	(revision 1350)
+++ trunk/source/interfaces/History~	(revision 1350)
@@ -0,0 +1,655 @@
+$Id: History,v 1.157 2010/11/02 17:39:48 allison Exp $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                      Category History file
+                      ---------------------
+This file should be used by G4 developers and category coordinators
+to briefly summarize all major modifications introduced in the code
+and keep track of all category-tags.
+It DOES NOT substitute the  CVS log-message one should put at every
+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
+
+20 November, 2009 J. Allison (interfaces-V09-02-06)
+ - 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.
+
+18 November, 2009 L. Garnier
+ - G4UIQt: Add CTRL+A and CTRL+E to move to begin/end of command line
+
+17 November, 2009 L. Garnier
+ - G4VBasicShell: Fix commands strings that match some shorter 
+   commands are trimmed and executed as those shorter commands.
+
+5 November, 2009 L. Garnier
+ - G4UIQt Fix a problem introduce the 6th October 2009 and cause
+   some widget display strange things on qt3
+
+19 October, 2009 L. Garnier
+ - basic/GNUMakefile Add optionnal debug flag
+
+6 October, 2009 L. Garnier
+ - G4UIQt Fix a problem on macOSX 10.6 with Qt 4.6(preview)
+ - Change GEANT4_QT_DEBUG flag for G4DEBUG_INTERFACES_BASIC and 
+   G4DEBUG_INTERFACES_COMMON
+
+28 May, 2009 K. Murakami (interfaces-V09-02-03)
+ - G4UIExecutive: add  IsGUI() method / add GetSession() method
+
+18 May, 2009 K. Murakami (interfaces-V09-02-02)
+ - G4UIExecutive : fixed wrong #ifdef condition
+ - include changes by Laurent (7/May)
+
+15 May, 2009 K. Murakami (interfaces-V09-02-01)
+ - G4UIExecutive : Remove batch mode handling
+
+13 May, 2009 K. Murakami (interfaces-V09-02-00)
+ - G4UIExecutive : Add new class for automatic instantiation of user session
+ - G4VUIshell : Add SetLsColor()
+
+7, May, 2009 L. Garnier
+ - G4UIQt.cc : Fix Compilation warning 
+ - G4VBasicShell.cc : Better command completion in command Line 
+
+31, March, 2009 L.Garnier
+ - Fix a compilation warning in G4Qt.cc
+
+16 February 2009, Laurent Garnier
+ - G4UIQt : Add an Interactor to be able to add button on file and help menu
+ - G4UIQt : Add a public method to get the MainWindow
+
+27, November, 2008 K. Murakami (interfaces-V09-01-04)
+ - G4UIQt.cc: warning fix
+
+21, November, 2008 K. Murakami (interfaces-V09-01-03)
+ -tagged for release 9.2
+
+14 November, 2008 Laurent Garnier
+ - G4UIXm,G4Win32 : Renaming according to Geant4 code policy
+
+6 November, 2008 Laurent Garnier
+ - G4Qt : Re-fix problem on some linux with QApplication, should be better
+ - G4Qt : Add availabity to launch a G4Qt without a G4UIQt
+
+24 October, 2008 Laurent Garnier
+ - Change GEANT4_QT_DEBUG flag by QTDEBUG
+ - Suppress unuseful DEBUG messages
+
+15 October, 2008 Laurent Garnier
+ - Fix a problem on some linux with QApplication. But this is NOT the good way to do it...
+ - Fix a qt3 backward compatibility on G4UIQt.cc
+
+7 October, 2008 Laurent Garnier
+ - Fix a G4cout possible problem cause by recursive G4cout call.
+
+2 October, 2008 Laurent Garnier
+ - Add availability to have a external Qapp
+
+22 July, 2008 K.Murakami (interfaces-V09-01-02)
+ - tagged
+ - direct exit calls are replaced with G4Exception/another way of exit
+   G4UIGainServer.cc, G4UIterminal.cc : call G4Exception
+   G4UItcsh.cc : nomal exit instead of direct calling exit()
+
+14 June, 2008 K.Murakami (interfaces-V09-01-01)
+ - tagged
+
+30th April, Laurent Garnier
+ - Include moc config in GNUmakefile
+
+10th March, Laurent Garnier
+ - Improvments for layout in Qt driver for Qt3
+
+30th January 2007, Laurent Garnier
+ - Add a search area in the help widget
+
+15th January 2007, Laurent Garnier
+ - Fixed some layout problems
+ - GNUmakefile : Added a macro for moc file
+ - Moc files : Suppression of all theses files. They are now autogenerated 
+   thanks to config/common.gmk
+
+15 January 2007, Koichi Murakami (interfaces-V09-01-00)
+ - G4UItcsh.cc: fixed the problem with Ctl-D termination for bash users.
+
+30 November 2007, Laurent Garnier
+ - G4UIQt : Some improvements for Qt3, corrections of some bugs
+ - G4UIQt_moc.cc : Adding other versions for QT_MOC_REVISION 28,58 and
+   59, but this is not the right solution..
+ - GAG/Makefile : Suppression of linking on a unuseful library
+
+16 November 2007, Koichi Murakami (interfaces-V09-00-03)
+ - G4UIGainServer.cc: cleared a compilation warning.
+ - tagged for the 9.1 release.
+
+15 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Adding a GEANT4_QT_DEBUG flag to hide all debug messages
+ - G4UIQt,G4Qt : Compilation improvements for Qt3
+ - G4UIQt,G4Qt : Minors corrections on G4UIQt helpWidget
+
+13 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Moving all moc in one big file interface/G4UIQT_moc.cc,
+   including Qt3 and Qt4 moc support
+
+09 Nov 2007, Laurent Garnier
+ - G4UIQt,G4Qt : Change all include directive to be compatible with Qt3
+
+27 Sept 2007, Laurent Garnier
+ - Adding sur files for G4UIQt driver
+
+06 November Koichi Murakami
+- G4UItcsh.cc: store shell history across sessions.
+
+30 October 2007 Koichi Murakami (interfaces-V09-00-02)
+- Guy committed the new Qt interface (28/Sep).
+- Add "#ifdef G4UI_BUILD_QT_SESSION" protection in src/G4UIQt_moc.cc.
+- Remove Qt interface from the current tag.
+- G4UIGAG.cc: suppress a compilation warning.
+
+30 October 2007 Koichi Murakami (interfaces-V09-00-01)
+- Makoto updated the implementation of the signal handler for Ctrl-C.
+
+28 October 2007, Makoto Asai
+- Remove improper dependency from interfaces/basic to run in GNUmakefile
+
+02 August 2007, Koichi Murakami (interfaces-V09-00-00)
+- Fix compilation warning on SUN-CC in G4UIterminal.cc
+
+19 June 2007, Gabriele Cosmo (interfaces-V08-03-02)
+- Fix compilation error on Windows ('theShell' not declared).
+
+14 June 2007, Koichi Murakami (interfaces-V08-03-01)
+- fixed the problem with Ctl-C termination for bash users.
+ * G4VUIshell   : add a virtual method ResetTerminal()
+ * G4UItcsh     : add a method ResetTerminal()
+ * G4UIterminal : add terminal reset when Ctl-C termination
+
+22 May 2007, Koichi Murakami (interface-V08-03-00)
+- G4UIterminal.cc: implement signal handler for soft-abort
+
+28 November 2005, Gabriele Cosmo (interface-V07-01-02)
+- G4UIXm.cc migrated to sstream
+
+21 November 2005, Hajime Yoshida (interface-V07-01-01)
+- G4UIGAG.cc and G4UIGainServer.cc migrated to sstream
+
+26 October 2005, Koichi Murakami (interfaces-V07-01-00)
+- G4UItcsh/G4UIterminal/G4VBasicShell: 
+  migration from strstream to sstream
+
+22 April 2005, Gabriele Cosmo (interfaces-V07-00-01)
+- G4UIGainServer: fixed conditional compilation for MacOS 10.4.
+
+26 January 2005, Gabriele Cosmo (interfaces-V07-00-00)
+- Removed explicit definition of G4TMPDIR in GNUmakefiles
+  (not necessary since already defined in common.gmk).
+
+27 November 2004, Hajime Yoshida (interfaces-V06-02-00)
+- Tagged.
+
+25 November 2004, Hajime Yoshida (interfaces-V06-01-02)
+- Tagged.
+
+21 November 2004, Guy Barrand
+- G4UIXm.cc: have some nice default resources in case XENVIRONMENT not set.
+
+07 June 2004, Gabriele Cosmo (interfaces-V06-01-01)
+- G4UIWin32.cc: move usage of inline methods to non-inline for DLLs
+  support on Windows.
+- GNUmakefile: added definition of GLOBLIBS for DLLs support on Windows.
+
+09 April 2004, John Allison (interfaces-V06-01-00 + vis-V06-01-01)
+- Tagged G4[UI]Win32[.hh,.cc] as below.  Joint with vis-V06-01-01.
+
+08 April 2004, Guy Barrand
+- G4[UI]Win32[.hh,.cc] : modify things in order to be able to use
+  a standard C main (and avoid the WinMain).
+
+22 October 2003, Guy Barrand (interfaces-V05-02-00)
+- OPACS : archived obsolete OPACS module and cleared build setup.
+
+17 October 2003, Guy Barrand
+- G4Xt.cc : removed unused and commented code.
+
+11 June 2003, Gabriele Cosmo (interfaces-V05-01-02)
+- G4UIWin32.cc: cleared warning on redefinition of 'pascal' reported on
+  WIN32-VC system.
+
+04 June 2003, Gabriele Cosmo (interfaces-V05-01-01)
+- Fixes for inclusion of <strstream> in G4UIXm.cc, G4UItcsh.cc and
+  G4UIterminal.cc in view of the g4std wrappers migration.
+
+30 May 2003, Gabriele Cosmo (interfaces-V05-01-00)
+- Fixed few pedantic warnings...
+- G4UIGainServer.cc: fixed compilation problem on Darwin-g++ with gcc-3.X.
+
+04 December 2002, Makoto Asai (interfaces-V04-01-01, interfaces-V04-01-02)
+- Migration to new G4ApplicationState.
+
+15 November 2002, Hajime Yoshida (interfaces-V04-01-00)
+- basic/src/G4UIArrayStrings.cc is now working for "konsole" type termcap.
+	by Koichi Murakami
+
+09 November 2002, Hajime Yoshida (interfaces-V04-00-05)
+- G4UIGainServer.cc uses socklen_t as before. It must work for Solaris CC and HP.
+- test/G4cout_test01 updated. An example of setCoutDestination(UI) by a user.
+
+06 November 2002, Guy Barrand
+- G4Xt.cc, G4UIXm.cc, G4UIXaw.cc : fix some warings.
+
+14 June 2002, Hajime Yoshida (interfaces-V04-00-04)
+- G4UIGainServer.cc/hh have a protection: #ifndef WIN32 ~ #endif not to compile
+	on WIndows.
+
+14 June 2002, Hajime Yoshida (interfaces-V04-00-04)
+- Added protection #ifndef WIN32 to new class G4UIGainServer in definition
+  and body, to prevent compilation on Windows platforms.
+
+12 June 2002, Gabriele Cosmo (interfaces-V04-00-03)
+- Fixes for porting on platforms other than Linux.
+  o socklen_t is Linux specific and not defined elsewhere; changed to int*.
+  o Fixed usage g4std/iostream, globals.hh and endl/G4endl.
+
+12 June 2002, Hajime Yoshida (interfaces-V04-00-02)
+- Introduced new class G4UIGainServer, socket extension for G4UIGAG.
+- added GAG/src/G4UIGainSErver.cc and GAG/include/G4UIGainServer.hh
+- G4UIGainServer is the new member of libG4UIGAG.so(a)
+	(no modification to GNUmakefiles)
+
+26 April 2002, Makoto Asai (interfaces-V04-00-01)
+- Corresponds to interfaces change in intercoms category (intercoms-V04-00-00)
+ Affected files :
+  basics/src/G4VUIshell.cc
+  common/src/G4VBasicShell.cc
+  GAG/src/G4UIGAG.cc
+
+25 February 2002, Makoto Asai (interfaces-V04-00-00)
+- fix for odd behavior on Windows in G4UIchs.cc
+
+03 December 2001 Guy Barrand (interfaces-V03-02-04)
+- G4VInteractorManager::RemoveDispatcher : change the "std::remove"
+  logic in order to fix a disfunctionning with vis/OpenInventor driver.
+- G4Xt.cc : remove some g++ compilation warnings about unused 
+  iconify functions.
+
+29 November 2001 Hajime Yoshida (interfaces-V03-02-03)
+- Fix G4UIGAG.cc for alias command (following G4UIterminal's modif)
+
+26 November 2002 Makoto Asai (interfaces-V03-02-02)
+- Fix compilation warnings caused by gcc-2.95.2 for basic sub-directory.
+
+23 November 2001 Makoto Asai (interfaces-V03-02-01)
+- Fix G4UIterminal to display a command line AFTER solving aliases
+  in case the command caused "command not found".
+- Fix G4UItcsh.hh not to have warning message.
+
+22 October 2001 Hajime Yoshida
+-G4UIGAG.cc no more compiler warning due to G4String
+
+22 October 2001 Hajime Yoshida
+- G4UIGAG ; no compilation warning with g++-2.95
+
+11 August 2001  John Allison (interfaces-V03-02-00)
+- Re-engineered G4UI variables.  Coworks with config-V03-02-04.
+- Changed GNUmakefile so that GAG, TERMINAL and TCSH built by default.
+- Nothing built if G4UI_NONE is set.
+
+29 November 2000 Makoto Asai (interfaces-V02-00-03)
+- Tag for Guy's correction.
+
+28 November 2000 Guy Barrand
+- G4Xt.cc ; SUN-CC : correct warning : argc hides G4VInteractorManager::argc.
+
+27 November 2000 Makoto Asai (interfaces-V02-00-02)
+- G4VUIShell.hh : add virtual keyword to the destructor.
+
+11 August 2000 Guy Barrand
+- G4UIWo.cc : add some cast in order to compile with OSF1/cxx strict_ansi mode.
+
+1 August 2000 Gabriele Cosmo (interfaces-V02-00-01)
+- Fixed warnings on HP-aCC system in G4UItcsh.cc, due to unproper usage of G4int
+  where unsigned (size_t) was requested instead.
+
+31 July 2000 Gonzalo Gracia
+- Modifications required to compile on NT
+  Operator string::[] requires size_t argument. 
+  Cast from integer to size_t in several places in basic/src/G4UIArrayString.cc
+  and G4VUIshell.cc
+
+22 July 2000 Makoto Asai (interfaces-V02-00-00)
+- Modify G4UIterminal, G4VUIshell, G4UIcsh and G4UItcsh to display the
+  break status as a prompt characters.
+
+25 June 2000 John Allison (interfaces-V01-01-06-old-G4UIterminal)
+- As interfaces-V01-01-06 but old revisions of G4UIterminal.cc/hh.
+
+23 June 2000 John Allison (interfaces-V01-01-06)
+- Protected G4UIterminal, G4Ui[t]csh against access by index to null strings.
+
+21 June 2000 John Allison (interfaces-V01-01-05)
+- Added include $(G4INSTALL)/config/G4VIS_BUILD.gmk to common/GNUmakefile.
+
+15 June 2000 John Allison (interfaces-V01-01-04)
+- More ISO compliance for G4UIterminal class.
+
+14 June 2000 Makoto Asai (interfaces-V01-01-03)
+- ISO compliance for G4UItcsh classes
+
+26 May 2000 Guy Barrand  (interfaces-V01-01-02)
+- G4UIXm.hh, G4UIWin32.hh : change comments about /gui for the doc.
+
+23 May 2000 John Allison (interfaces-V01-01-01-without-tcsh)
+- Tag without G4UIterminal(G4UItcsh) in case it is not needed in the release.
+
+20 May 2000 Guy Barrand  (interfaces-V01-01-01)
+- common/G4InteractorMessenger : change command name "interactor" to "gui".
+
+19 May 2000 John Allison  (interfaces-V01-01-00)
+- G4UIterminal displays a candidate list in case a given parameter is
+  wrong (Makoto Asai).
+
+26 Mar 2000 Makoto Asai
+- Introducing a new G4UIterminal with UNIX-like shell.
+
+10 Nov 1999 Hajime Yoshida  (interfaces-V00-01-03)
+- Added less<G4String> argument (Guy).
+- G4UIWin32.hh, G4UIXm.hh : usage of G4std::less in G4std::map.
+- G4VInteractorManager.cc : G4std::find, G4std::remove.
+
+08 Nov 1999 Hajime Yoshida
+- tag interfaces--V00-01-02 for STT
+
+08 Nov 1999 Hajime Yoshida
+- GAG/src/G4UIGAG.cc RWT => STL vector
+- basic/include/G4UIterminal.hh, GAG/include/G4UIGAG.hh => documentation
+
+02 Nov 1999 Guy Barrand
+- doc comments for G4UIWin32.hh, G4UIXm.hh, G4UIXaw.hh, G4Xt.hh, G4Win32.hh, G4VInterativeSession.hh, G4VInteractorManager.hh.
+
+02 Nov 1999 Guy Barrand
+- basic/G4UIWin32, G4UIXm : RW -> STL.
+- common/G4VBasicShell, G4VInteractiveSession, G4VInteractorManager : RW -> STL.
+29 Oct. 1999 Hajime Yoshida
+- tag interfaces-V00-01-01
+
+27 Oct. 1999 Guy Barrand
+- interfaces/common/src/G4Xt.cc : protect XtAppInit against 
+  shell zero widthxheight. Give a default to geometry resource.
+
+21 Oct. 1999 John Allison
+- Made XtAppContext appContext static in G4Xt.cc.  Speeds OGLSXm but
+  OGLIXm is still slow - why?
+
+12 Oct. 1999 John Allison for Hajime Yoshida (tag interfaces-V00-01-00a)
+- Protection for zero length strings for Sun in G4UIterminal and G4UIGAG.
+
+02 Sep. 1999 Hajime Yoshida
+  to geant4-00-01-ref-01 (Revision 1.9)
+  a new tag is interfaces-01-00-04
+  after which a tag interfaces-V00-01-00 was added identical to
+    interfaces-01-00-04 except for this History file.
+
+- G4UIterminal.cc and G4UIGAG.cc now shows prompt characters
+	to an input of return (or null command line).
+
+head 31 Mai 1999  Guy Barrand
+- G4VInteractorManager::SecondaryLoop : add a message to indicate
+  that we enter a "viewer" secondary X event loop and that someone
+  add to "Escape" it from the viewer to continue.
+
+interfaces-01-00-03  19th April 1999  John Allison
+- Protected G4VBasicShell.cc with if( tempPath.length()>0 ).
+
+interfaces-01-00-02  18th April 1999  John Allison
+- Tagged.
+
+head 11th Mai 1999  Guy Barrand
+1) G4UIXm : Linux, correct geometry management of the menubar.
+
+head 06th Mai 1999  Guy Barrand
+1) G4Win32, G4UIWin32 : modifications to compile with Visual-6.0.
+
+head 16th April 1999  Guy Barrand
+1) G4VBasicShell, G4UIXm, G4UIWin32 : command completion.
+2) G4InteractorMessenger, G4VInteractorManager : code polishement.
+
+interfaces-01-00-01  15th April 1999  Hajime Yoshida/Masayasu Nagamatu
+1) some code polishment after the messages by CodeWarriers (Guy)
+2) Help functions in G4VBasicShell and related rearrangement of
+        G4UIterminal etc.. (Guy)
+3) removal of ifdef for GNU_GCC in G4UIGAG. (Hajime)
+
+interfaces-00-03-07 9th December 1998 Hajime Yoshida/Masayasu Nagamatu
+- minor improvements in Help of G4UIterminal.cc
+- G4UIGAG's Help in terminal mode is now equivalent to G4UIterminal.cc
+
+interfaces-00-03-06 27th November 1998 Hajime Yoshida/Masayasu Nagamatu
+- added 'if' protection to the destructor of G4UIterminal/G4UIGAG.
+
+interfaces-00-03-05 12th November 1998 Masayasu Nagamatu
+-test/G4cout_test01/ added an example for redirectiong stream using G4cout
+
+interfaces-00-03-04  13th October 1998  Masayasu Nagamatu
+- G4cout - changes to G4UIterminal.cc, G4UIGAG.hh, G4UIGAG.cc.
+
+07 Ocotober 1998  Guy Barrand:
+- G4UIXm.cc, G4UIWin32.cc : cout, cerr control.
+
+interfaces-00-03-03 7th  October Hajime Yoshida
+- Bug fix to prevent "help" crashing in some circumstances.
+
+interfaces-00-03-02 14th Sep. Hajime Yoshida
+	- fix to G4UIGAG (not bugs but correction of minor 
+		ydifferences with G4UIterminal)
+
+interfaces-00-03-01  12th Sep.  Hajime Yoshida and Masayasu Nagamatu
+- CTRL-D doesn't invoke infinite loop.
+- CRTL-D now means
+	- EOF in the redirected cin
+	- End of Session, just as "exit" command of GEANT4
+- Affected files are basic/src/G4UIterminal.cc
+			GAG/src/G4UIGAG.cc
+
+interfaces-00-02-01  9th August  John Allison
+- Tagged Guy's changes.
+
+7th August  Guy Barrand.
+- common, OPACS : new interactor parenting logic.
+
+interfaces-00-01-04  8th July 1998  John Allison
+- Emptied xvt_standalone_test; files moved to environments/XVT.
+
+interfaces-00-01-03  7th July 1998  John Allison
+- Emptied standalone_test; files moved to environments/Momo or no
+  longer needed.
+
+7th July 1998  Guy Barrand
+- Added include $(G4INSTALL)/config/interactivity.gmk to GNUmakefiles.
+
+interfaces-00-01-02 7th July 1998  John Allison
+- Forced revision 2.1 on files in newly committed directories.
+
+interfaces-00-01-01 6th July 1998  John Allison
+- Big restructuring.  Moved files from include/ and src/ to:
+  common/, basic/, GAG/, OPACS/, XVT/.
+  Created G4UI_BUILD.gmk and G4UI_USE.gmk in config/.
+  Changed the GNUmakefiles accordingly.
+
+interfaces-00-07-01 2nd July 1998  Gabriele Cosmo
+- Updates to G4UIWo and G4VInteractorManager by G.Barrand.
+
+interfaces-00-06-05 26th June 1998  Gabriele Cosmo
+- Updated GNUmakefiles to new electromagnetics structure.
+
+interfaces-00-06-04a 22nd June 1998  John Allison
+- Removed ./standalone_test/run/example34/GNUmakefile.G4VIS_USE and
+  ./standalone_test/run/example35/GNUmakefile.G4VIS_USE
+
+interfaces-00-06-04 22nd June 1998  John Allison
+- Added #ifdef GNU_GCC for template instantiation in src/G4UIGAG.cc.
+- Changed GNUmakefiles for G4VIS_USE.gmk.
+
+May 6, 98 M.Asai
+- Introducing a new abstract base class G4VBasicShell.
+- G4UIterminal has been modified according to use G4VBasicShell.
+
+22th April 1998  Hajime Yoshida / Masayasu Nagamatsu (interfaces-00-05-03)
+-  the following three directories are tagged.
+ interfaces/standalone_test/Momo/java/GGE
+ interfaces/standalone_test/Momo/java/RMI
+ interfaces/standalone_test/run/example35
+
+20th April 1998  Hajime Yoshida / Masayasu Nagamatsu (interfaces-00-05-02)
+- update for Momo and G4UIGAG, including many improvement and bug fixes.
+  see the interfaces/standalone_test/README_Momo.html for datails.
+- example35 is added; new example program to show the capability of GUI(GAG).
+
+15th April 1998 : Guy Barrand
+- From discussion with John and Simone G4VToolkit 
+  has been renamed to G4VInteractorManager.
+
+4th April 1998 Nagamatu Masayasu (interfaces-00-05-01)
+- correspond to the modification by  G.Barrand
+  G4UI_BUILD_xxx_DRIVER -> G4UI_BUILD_xxx_SESSION
+  Modifications for Win32/NT.
+
+April 2, 98 G.Barrand
+- G4UI_BUILD_xxx_DRIVER -> G4UI_BUILD_xxx_SESSION
+- Modifications for Win32/NT.
+
+26th March 1998  John Allison
+- Changed G4VisManager to MyVisManager in example34.cc and xvt.benchmark.cc
+  for vis-00-05-01 and later.
+
+6th March 1998 Hajime Yoshida / Nagamatu Masayasu (interfaces-00-04-01)
+- First tag with modeling under visualization
+- small bug fix for Momo
+
+29th January 1998 Masayasu Nagamatu / Hajime Yoshida (interfaces-00-03-01)
+- Update of Momo(GAG/GGE), standalone_test/ directory.
+
+27th January 1998  John Allison
+- Simplfied use of G4VIS flags in test GNUmakefiles.
+- New way of instantiating G4VisManager in test main() programs.
+
+December 19, 97 G. Cosmo - (alpha03)
+
+- Created.
+
+Januray 19 , 98 G. Barrand
+
+- Update G4UIXaw, G4UIXm to take into account
+  pauseStartSession method.
+
Index: trunk/source/interfaces/basic/CMakeLists.txt
===================================================================
--- trunk/source/interfaces/basic/CMakeLists.txt	(revision 1350)
+++ trunk/source/interfaces/basic/CMakeLists.txt	(revision 1350)
@@ -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()
+
Index: trunk/source/interfaces/basic/GNUmakefile~
===================================================================
--- trunk/source/interfaces/basic/GNUmakefile~	(revision 1350)
+++ trunk/source/interfaces/basic/GNUmakefile~	(revision 1350)
@@ -0,0 +1,31 @@
+# $Id: GNUmakefile,v 1.7 2009/10/19 07:37:48 lgarnier Exp $
+# -------------------------------------------------------------
+# GNUmakefile for interfaces/basic library.  John Allison, 6/7/98.
+
+name := G4UIbasic
+
+ifndef G4INSTALL
+  G4INSTALL = ../../..
+endif
+
+# Definition of macro for moc files (for Qt use only)
+MOC_MACRO = -DG4UI_BUILD_QT_SESSION
+
+# For debug mode
+CPPFLAGS += -DG4DEBUG_INTERFACES_BASIC
+
+include $(G4INSTALL)/config/architecture.gmk
+include $(G4INSTALL)/config/G4UI_BUILD.gmk
+include $(G4INSTALL)/config/interactivity.gmk
+
+# NO need OGL, then reset OGLGLAGS
+OGLFLAGS = ""
+OGLLIBS  = ""
+
+CPPFLAGS += -I$(G4BASE)/global/management/include
+CPPFLAGS += -I$(G4BASE)/interfaces/common/include
+CPPFLAGS += -I$(G4BASE)/intercoms/include
+
+include $(G4INSTALL)/config/moc.gmk
+include $(G4INSTALL)/config/common.gmk
+
Index: trunk/source/interfaces/basic/include/G4UIQt.hh~
===================================================================
--- trunk/source/interfaces/basic/include/G4UIQt.hh~	(revision 1350)
+++ trunk/source/interfaces/basic/include/G4UIQt.hh~	(revision 1350)
@@ -0,0 +1,220 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $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 
+
+#if defined(G4UI_BUILD_QT_SESSION) || defined(G4UI_USE_QT)
+
+#include <map>
+
+#include "G4VBasicShell.hh"
+#include "G4VInteractiveSession.hh"
+
+#include <qobject.h>
+#include <qmap.h>
+#include <qstringlist.h>
+#include <qtabwidget.h>
+
+class QMainWindow;
+class QLineEdit;
+class G4UIsession;
+#if QT_VERSION < 0x040000
+class QListView;
+class QListViewItem;
+#else
+class QListWidget;
+class QTreeWidget;
+class QTreeWidgetItem;
+#endif
+class QTextEdit;
+class QLabel;
+class QResizeEvent;
+class QToolBox;
+class QStringList;
+class QSplitter;
+
+// Class description :
+//
+//  G4UIQt : class to handle a Qt interactive session.
+// G4UIQt is the Qt version of G4UIterminal.
+//
+//  A command box is at disposal for entering/recalling Geant4 commands.
+//  A menubar could be customized through the AddMenu, AddButton methods.
+//  Note that there are corresponding Geant4 commands to add a 
+// menus in the menubar and add buttons in a menu.
+//  Ex : 
+//    /gui/addMenu   test Test
+//    /gui/addButton test Init /run/initialize
+//    /gui/addButton test "Set gun" "/control/execute gun.g4m"
+//    /gui/addButton test "Run one event" "/run/beamOn 1"
+//
+//  Command completion, by typing "tab" key, is available on the 
+// command line.
+//
+// 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
+
+public: // With description
+  G4UIQt(int,char**);
+  // (argv, argc) or (0, NULL) had to be given.
+  G4UIsession* SessionStart();
+  // To enter interactive X loop ; waiting/executing command,...
+  void AddMenu(const char*,const char*);
+  // To add a pulldown menu in the menu bar. 
+  // First argument is the name of the menu.
+  // Second argument is the label of the cascade button.
+  // Ex : AddMenu("my_menu","My menu")
+  void AddButton(const char*,const char*,const char*);
+  // To add a push button in a pulldown menu.
+  // First argument is the name of the menu.
+  // 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);
+  void SessionTerminate();
+  void PauseSessionStart(G4String);
+  G4int ReceiveG4cout(G4String);
+  G4int ReceiveG4cerr(G4String);
+  //   G4String GetCommand(Widget);
+
+private:
+  void SecondaryLoop(G4String); // a VIRER
+  void CreateHelpWidget();
+  void InitHelpTree();
+  void FillHelpTree();
+  void ExitHelp();
+
+#if QT_VERSION < 0x040000
+  void CreateChildTree(QListViewItem*,G4UIcommandTree*);
+  QListViewItem* FindTreeItem(QListViewItem *,const QString&);
+#else
+  void CreateChildTree(QTreeWidgetItem*,G4UIcommandTree*);
+  QTreeWidgetItem* FindTreeItem(QTreeWidgetItem *,const QString&);
+#endif
+
+  QString GetCommandList(const G4UIcommand*);
+
+  G4bool GetHelpChoice(G4int&) ;// 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:
+
+  //  Widget form,shell,command,menuBar,text;
+  //  std::map<QAction*,G4String, std::less<QAction*> > commands;
+  //  static void commandEnteredCallback(Widget,XtPointer,XtPointer);
+  //  static void keyHandler(Widget,XtPointer,XEvent*,Boolean*);
+  QMainWindow * fMainWindow;
+  QLabel *fCommandLabel;
+  QLineEdit * fCommandArea;
+  QTextEdit *fCoutTBTextArea;
+  QTextEdit *fHelpArea;
+  QToolBox* fToolBox;
+  QStringList fG4cout;
+  QLineEdit * fCoutFilter;
+
+#if QT_VERSION < 0x040000
+  QListView *fHistoryTBTableList;
+  QListView *fHelpTreeWidget;
+#else
+  QListWidget *fHistoryTBTableList;
+  QTreeWidget *fHelpTreeWidget;
+#endif
+  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();
+  void ClearButtonCallback();
+  void CommandEnteredCallback();
+  void ButtonCallback(const QString&);
+  void HelpTreeClicCallback();
+  void HelpTreeDoubleClicCallback();
+  void ShowHelpCallback();
+  void CommandHistoryCallback();
+  void LookForHelpStringCallback();
+  void UpdateTabWidget(int);
+  void ResizeTabWidget( QResizeEvent* );
+  void CoutFilterCallback(const QString&);
+  void TabCloseCallback(int);
+  void ToolBoxActivated(int);
+};
+
+#endif
+
+#endif
+
Index: trunk/source/interfaces/basic/sources.cmake
===================================================================
--- trunk/source/interfaces/basic/sources.cmake	(revision 1350)
+++ trunk/source/interfaces/basic/sources.cmake	(revision 1350)
@@ -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-ref-00 $
+#
+#------------------------------------------------------------------------------
+
+# 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
+
Index: trunk/source/interfaces/basic/src/G4UIQt.cc~
===================================================================
--- trunk/source/interfaces/basic/src/G4UIQt.cc~	(revision 1350)
+++ trunk/source/interfaces/basic/src/G4UIQt.cc~	(revision 1350)
@@ -0,0 +1,2251 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4UIQt.cc,v 1.52 2010/10/08 10:14:54 lgarnier Exp $
+// GEANT4 tag $Name:  $
+//
+// L. Garnier
+
+#ifdef G4UI_BUILD_QT_SESSION
+
+#include "G4Types.hh"
+
+#include <string.h>
+
+#include "G4UIQt.hh"
+#include "G4UImanager.hh"
+#include "G4StateManager.hh"
+#include "G4UIcommandTree.hh"
+#include "G4UIcommandStatus.hh"
+
+#include "G4Qt.hh"
+
+#include <qapplication.h>
+#include <qlineedit.h>
+#include <qwidget.h>
+#include <qmenubar.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qtoolbox.h>
+#include <qsplitter.h>
+#include <qscrollbar.h>
+#include <qdialog.h>
+#include <qevent.h>
+#include <qtextedit.h>
+#include <qsignalmapper.h>
+#include <qtabwidget.h>
+#include <qtabbar.h>
+#include <qstringlist.h>
+
+#include <qmainwindow.h>
+#if QT_VERSION >= 0x040000
+#include <qmenu.h>
+#include <qlistwidget.h>
+#include <qtreewidget.h>
+#else
+#include <qaction.h>
+#include <qheader.h>
+#include <qlistview.h>
+#include <qpopupmenu.h>
+#include <qwidgetlist.h>
+#endif
+
+
+
+#include <stdlib.h>
+
+// Pourquoi Static et non  variables de classe ?
+static G4bool exitSession = true;
+static G4bool exitPause = true;
+
+/**   Build a Qt window with a menubar, output area and promt area<br> 
+<pre>
+   +-----------------------+
+   |exit menu|             |
+   |                       |
+   | +-------------------+ |
+   | |                   | |
+   | |  Output area      | |
+   | |                   | |
+   | +-------------------+ |
+   |      | clear |        |
+   | +-------------------+ |
+   | |  promt history    | |
+   | +-------------------+ |
+   | +-------------------+ |
+   | |> promt area       | |
+   | +-------------------+ |
+   +-----------------------+
+</pre>
+*/
+G4UIQt::G4UIQt (
+ int argc
+,char** argv
+)
+:fHelpArea(NULL)
+,fG4cout("")
+,fHelpTreeWidget(NULL)
+,fHelpTBWidget(NULL)
+,fHistoryTBWidget(NULL)
+,fCoutTBWidget(NULL)
+,fVisParametersTBWidget(NULL)
+,fViewComponentsTBWidget(NULL)
+,fHelpLine(NULL)
+,fTabWidget(NULL)
+,fCoutText("Output")
+{
+
+  G4Qt* interactorManager = G4Qt::getInstance (argc,argv,(char*)"Qt");
+  if (!(QApplication*)interactorManager->GetMainInteractor()) {
+    G4cout        << "G4UIQt : Unable to init Qt. Aborted" << G4endl;
+  }
+  
+  G4UImanager* UI = G4UImanager::GetUIpointer();
+  if(UI!=NULL) UI->SetSession(this);
+  if(UI!=NULL) UI->SetG4UIWindow(this);
+
+  // Check if already define in external app QMainWindow
+  bool found = false;
+#if QT_VERSION < 0x040000
+  // theses lines does nothing exept this one "GLWindow = new QDialog(0..."
+  // but if I comment them, it doesn't work...
+  QWidgetList  *list = QApplication::allWidgets();
+  QWidgetListIt it( *list );         // iterate over the widgets
+  QWidget * widget;
+  while ( (widget=it.current()) != 0 ) {  // for each widget...
+    ++it;
+    if ((found== false) && (widget->inherits("QMainWindow"))) {
+      found = true;
+    }
+  }
+  delete list;                      // delete the list, not the widgets
+#else
+  foreach (QWidget *widget, QApplication::allWidgets()) {
+    if ((found== false) && (widget->inherits("QMainWindow"))) {
+      found = true;
+    }
+  }
+#endif
+
+  if (found) {
+    G4cout        << "G4UIQt : Found an external App with a QMainWindow already defined. Aborted" << G4endl;
+    return ;
+  }
+  fMainWindow = new QMainWindow();
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::Initialise after main window creation +++++++++++\n");
+#endif
+
+  QWidget *mainWidget = new QWidget(fMainWindow);
+#if QT_VERSION < 0x040000
+  fMyVSplitter = new QSplitter(Qt::Horizontal,fMainWindow);
+  fToolBox = new QToolBox(fMyVSplitter);
+#else
+  fMyVSplitter = new QSplitter(Qt::Horizontal,fMainWindow);
+  fToolBox = new QToolBox();
+#endif
+
+  // Set layouts
+
+  QWidget* commandLineWidget = new QWidget(mainWidget);
+#if QT_VERSION < 0x040000
+  QVBoxLayout *layoutCommandLine = new QVBoxLayout(commandLineWidget);
+#else
+  QVBoxLayout *layoutCommandLine = new QVBoxLayout();
+#endif
+
+  // fill them
+
+  fCommandLabel = new QLabel("",commandLineWidget);
+
+  fCommandArea = new QLineEdit(commandLineWidget);
+  fCommandArea->installEventFilter(this);
+#if QT_VERSION < 0x040000
+  fCommandArea->setActiveWindow();
+#else
+  fCommandArea->activateWindow();
+#endif
+
+#if QT_VERSION < 0x040000
+  fCommandArea->setFocusPolicy ( QWidget::StrongFocus );
+  fCommandArea->setFocus();
+#else
+  fCommandArea->setFocusPolicy ( Qt::StrongFocus );
+  fCommandArea->setFocus(Qt::TabFocusReason);
+#endif
+
+
+
+  layoutCommandLine->addWidget(fCommandLabel);
+  layoutCommandLine->addWidget(fCommandArea);
+  QVBoxLayout *mainLayout;
+#if QT_VERSION >= 0x040000
+  mainLayout = new QVBoxLayout();
+#else
+  mainLayout = new QVBoxLayout(mainWidget);
+#endif
+
+  fHelpTBWidget = new QWidget(fToolBox);
+  fHistoryTBWidget = new QWidget(fToolBox);
+  fCoutTBWidget = new QWidget(fToolBox);
+  fVisParametersTBWidget = new QWidget(fToolBox);
+  fViewComponentsTBWidget = new QWidget(fToolBox);
+  
+  CreateVisParametersTBWidget();
+  CreateViewComponentsTBWidget();
+  CreateHelpTBWidget();
+  CreateCoutTBWidget();
+  CreateHistoryTBWidget();
+
+  // the splitter 
+  //  fToolBox->addItem(fVisParametersTBWidget,"Vis parameters");
+  //  fToolBox->addItem(fViewComponentsTBWidget,"Viewer components");
+  fToolBox->addItem(fHelpTBWidget,"Help");
+  fToolBox->addItem(fCoutTBWidget,"Cout");
+  fToolBox->addItem(fHistoryTBWidget,"History");
+
+
+
+  fToolBox->setSizePolicy (QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed));
+
+#if QT_VERSION < 0x040000
+  fEmptyViewerTabLabel = new QLabel(fToolBox,"         If you want to have a Viewer, please use /vis/open commands. ");
+#else
+  fEmptyViewerTabLabel = new QLabel("         If you want to have a Viewer, please use /vis/open commands. ");
+#endif
+
+  // Only at creation. Will be set visible when sessionStart();
+#if QT_VERSION >= 0x040000
+ #if QT_VERSION >= 0x040200
+  fEmptyViewerTabLabel->setVisible(false);
+ #else
+  fEmptyViewerTabLabel->hide();
+ #endif
+#else
+  fEmptyViewerTabLabel->hide();
+#endif
+
+
+#if QT_VERSION >= 0x040000
+  fMyVSplitter->addWidget(fToolBox);
+  fMyVSplitter->addWidget(fEmptyViewerTabLabel);
+#endif
+
+
+#if QT_VERSION >= 0x040000
+  commandLineWidget->setLayout(layoutCommandLine);
+#endif
+  commandLineWidget->setSizePolicy (QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
+  mainLayout->addWidget(fMyVSplitter,1);
+  mainLayout->addWidget(commandLineWidget);
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt :: 5\n");
+#endif
+
+#if QT_VERSION >= 0x040000
+  mainWidget->setLayout(mainLayout);
+#endif
+
+  fMainWindow->setCentralWidget(mainWidget);
+
+#if QT_VERSION < 0x040000
+
+  // Add a quit subMenu
+  QPopupMenu *fileMenu = new QPopupMenu( fMainWindow);
+  fileMenu->insertItem( "&Quit",  this, SLOT(ExitSession()), CTRL+Key_Q );
+  fMainWindow->menuBar()->insertItem( QString("&File"), fileMenu );
+
+#else
+
+  // Add a quit subMenu
+  QMenu *fileMenu = fMainWindow->menuBar()->addMenu("File");
+  fileMenu->addAction("Quit", this, SLOT(ExitSession()));
+
+#endif
+
+  AddInteractor ("file",(G4Interactor)fileMenu);
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt :: 6\n");
+#endif
+
+  // Connect signal
+  connect(fCommandArea, SIGNAL(returnPressed()), SLOT(CommandEnteredCallback()));
+  connect(fToolBox, SIGNAL(currentChanged(int)), SLOT(ToolBoxActivated(int)));
+
+  if(UI!=NULL) UI->SetCoutDestination(this);  // TO KEEP
+
+#if QT_VERSION < 0x040000
+  fMainWindow->setCaption( tr( "G4UI Session" ));
+  fMainWindow->resize(900,600); 
+  fMainWindow->move(50,100);
+#else
+  fMainWindow->setWindowTitle( tr("G4UI Session") ); 
+  fMainWindow->resize(900,600); 
+  fMainWindow->move(QPoint(50,100));
+#endif
+
+  // Set not visible until session start
+#if QT_VERSION >= 0x040000
+ #if QT_VERSION >= 0x040200
+  fMainWindow->setVisible(false);
+ #else
+  fMainWindow->hide();
+ #endif
+#else
+  fMainWindow->hide();
+#endif
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt END\n");
+#endif
+}
+
+
+
+G4UIQt::~G4UIQt(
+) 
+{ 
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::~G4UIQt Delete\n");
+#endif
+  G4UImanager* UI = G4UImanager::GetUIpointer();  // TO KEEP
+  if(UI!=NULL) {  // TO KEEP
+    UI->SetSession(NULL);  // TO KEEP
+    UI->SetG4UIWindow(NULL);
+    UI->SetCoutDestination(NULL);  // TO KEEP
+  }
+  
+  if (fMainWindow!=NULL) {
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::~G4UIQt DELETE fMainWindow\n");
+#endif
+    delete fMainWindow;
+  }
+}
+
+/** Create the History ToolBox Widget
+ */
+void G4UIQt::CreateHistoryTBWidget(
+) 
+{
+
+#if QT_VERSION < 0x040000
+  QVBoxLayout *layoutHistoryTB = new QVBoxLayout(fHistoryTBWidget);
+
+  fHistoryTBTableList = new QListView(fHistoryTBWidget);
+  fHistoryTBTableList->setSorting (-1, FALSE);
+  fHistoryTBTableList->setSelectionMode(QListView::Single);
+  fHistoryTBTableList->addColumn("");
+  fHistoryTBTableList->header()->hide();
+  connect(fHistoryTBTableList, SIGNAL(selectionChanged()), SLOT(CommandHistoryCallback()));
+#else
+  QVBoxLayout *layoutHistoryTB = new QVBoxLayout();
+  fHistoryTBTableList = new QListWidget();
+  fHistoryTBTableList->setSelectionMode(QAbstractItemView::SingleSelection);
+  connect(fHistoryTBTableList, SIGNAL(itemSelectionChanged()), SLOT(CommandHistoryCallback()));
+#endif
+  fHistoryTBTableList->installEventFilter(this);
+
+  layoutHistoryTB->addWidget(fHistoryTBTableList);
+
+#if QT_VERSION >= 0x040000
+  fHistoryTBWidget->setLayout(layoutHistoryTB);
+#endif
+}
+
+/** Create the Help ToolBox Widget
+ */
+void G4UIQt::CreateHelpTBWidget(
+) 
+{
+
+  
+#if QT_VERSION < 0x040000
+  QWidget *helpWidget = new QWidget(fHelpTBWidget);
+  QHBoxLayout *helpLayout = new QHBoxLayout(helpWidget);
+  fHelpVSplitter = new QSplitter(Qt::Horizontal,fHelpTBWidget);
+#else
+  QWidget *helpWidget = new QWidget();
+  QHBoxLayout *helpLayout = new QHBoxLayout();
+  QVBoxLayout *vLayout = new QVBoxLayout();
+  fHelpVSplitter = new QSplitter(Qt::Horizontal);
+#endif
+  fHelpLine = new QLineEdit(fHelpTBWidget);
+  helpLayout->addWidget(new QLabel("Search :",helpWidget));
+  helpLayout->addWidget(fHelpLine);
+#if QT_VERSION < 0x040000
+  connect( fHelpLine, SIGNAL( returnPressed () ), this, SLOT( LookForHelpStringCallback() ) );
+#else
+  connect( fHelpLine, SIGNAL( editingFinished () ), this, SLOT( LookForHelpStringCallback() ) );
+#endif
+  
+  // Create Help tree
+  FillHelpTree();
+  
+  fHelpArea = new QTextEdit(fHelpVSplitter);
+  fHelpArea->setReadOnly(true);
+  
+  // Set layouts
+  
+#if QT_VERSION >= 0x040000
+  if (fHelpTreeWidget) {
+    fHelpVSplitter->addWidget(fHelpTreeWidget);
+  }
+  fHelpVSplitter->addWidget(fHelpArea);
+#endif
+  
+  
+#if QT_VERSION >= 0x040000
+  vLayout->addWidget(helpWidget);
+  vLayout->addWidget(fHelpVSplitter,1);
+#endif
+  
+  fHelpTBWidget->setMinimumSize(50,50);
+  fHelpTBWidget->setSizePolicy (QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
+  // set the splitter size
+#if QT_VERSION >= 0x040000
+  QList<int> list;
+#else
+  QValueList<int> list;
+#endif
+  list.append( 50 );
+  list.append( 50 );
+  fHelpVSplitter->setSizes(list);
+  
+#if QT_VERSION >= 0x040000
+  helpWidget->setLayout(helpLayout);
+  fHelpTBWidget->setLayout(vLayout);
+#endif  
+}
+
+
+/** Create the Cout ToolBox Widget
+ */
+void G4UIQt::CreateCoutTBWidget(
+) 
+{
+#if QT_VERSION >= 0x040000
+  QVBoxLayout *layoutCoutTB = new QVBoxLayout();
+#else
+  QVBoxLayout *layoutCoutTB = new QVBoxLayout(fCoutTBWidget);
+#endif
+
+  fCoutTBTextArea = new QTextEdit(fCoutTBWidget);
+  fCoutFilter = new QLineEdit(fCoutTBWidget);
+  QLabel* coutFilterLabel = new QLabel("Filter : ",fCoutTBWidget);
+
+  QPushButton *coutTBClearButton = new QPushButton("clear",fCoutTBWidget);
+  connect(coutTBClearButton, SIGNAL(clicked()), SLOT(ClearButtonCallback()));
+  connect(fCoutFilter, SIGNAL(textEdited ( const QString &)), SLOT(CoutFilterCallback( const QString &)));
+
+  fCoutTBTextArea->setReadOnly(true);
+
+  QWidget* coutButtonWidget = new QWidget(fCoutTBWidget);
+  QHBoxLayout* layoutCoutTBButtons = new QHBoxLayout(coutButtonWidget);
+  layoutCoutTBButtons->addWidget(coutTBClearButton);
+  layoutCoutTBButtons->addWidget(coutFilterLabel);
+  layoutCoutTBButtons->addWidget(fCoutFilter);
+
+  layoutCoutTB->addWidget(fCoutTBTextArea);
+  layoutCoutTB->addWidget(coutButtonWidget);
+
+#if QT_VERSION >= 0x040000
+  fCoutTBWidget->setLayout(layoutCoutTB);
+#endif
+}
+
+
+/** Create the VisParameters ToolBox Widget
+ */
+void G4UIQt::CreateVisParametersTBWidget(
+) 
+{
+}
+
+
+/** Create the ViewComponents ToolBox Widget
+ */
+void G4UIQt::CreateViewComponentsTBWidget(
+) 
+{
+}
+
+
+/**   Add a new tab widget.
+  Create the tab if it was not done
+*/
+bool G4UIQt::AddTabWidget(
+ QWidget* aWidget
+,QString name
+,int sizeX
+,int sizeY
+)
+{
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::AddTabWidget %d %d\n",sizeX, sizeY);
+#endif
+
+  if (fTabWidget == NULL) {
+#ifdef G4DEBUG_INTERFACES_BASIC
+    printf("G4UIQt::AddTabWidget +++++\n");
+#endif
+    fTabWidget = new G4QTabWidget(fMyVSplitter);
+#if QT_VERSION >= 0x040500
+    fTabWidget->setTabsClosable (true); 
+#endif
+    
+#if QT_VERSION >= 0x040200
+    fTabWidget->setUsesScrollButtons (true);
+#endif
+    
+    fTabWidget->setSizePolicy (QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum));
+    
+    QSizePolicy policy = fTabWidget->sizePolicy();
+#if QT_VERSION < 0x040000
+    policy.setHorStretch(1);
+    policy.setVerStretch(1);
+#else
+    policy.setHorizontalStretch(1);
+    policy.setVerticalStretch(1);
+#endif
+    fTabWidget->setSizePolicy(policy);
+    
+#if QT_VERSION >= 0x040500
+    connect(fTabWidget,   SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int)));
+#endif
+    connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int))); 
+  }
+
+  fLastQTabSizeX = sizeX;
+  fLastQTabSizeY = sizeY;
+
+  if (!aWidget) {
+    return false;
+  }
+
+  // Remove QLabel 
+
+  // L.Garnier 26/05/2010 : not exactly the same in qt3. Could cause some
+  // troubles
+#if QT_VERSION >= 0x040000
+  if ( fMyVSplitter->indexOf(fEmptyViewerTabLabel) != -1) {
+#endif
+
+#if QT_VERSION < 0x040000
+    fEmptyViewerTabLabel->reparent(0,0,QPoint(0,0));  
+    fEmptyViewerTabLabel->hide();
+    delete fEmptyViewerTabLabel;
+    fEmptyViewerTabLabel = NULL;
+
+#else
+    fEmptyViewerTabLabel->hide();
+    fEmptyViewerTabLabel->setParent(NULL);
+    delete fEmptyViewerTabLabel;
+    fEmptyViewerTabLabel = NULL;
+
+    fMyVSplitter->addWidget(fTabWidget);
+#endif
+
+#if QT_VERSION < 0x040000
+    aWidget->reparent(fTabWidget,0,QPoint(0,0));  
+#else
+    aWidget->setParent(fTabWidget);
+#endif
+#if QT_VERSION >= 0x040000
+  }
+#endif
+
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::AddTabWidget ADD %d %d + %d %d---------------------------------------------------\n",sizeX, sizeY,sizeX-fTabWidget->width(),sizeY-fTabWidget->height());
+#endif
+
+  if (fMainWindow->isVisible()) {
+
+    // get the size of the tabbar
+    int tabBarX = 0;
+    int tabBarY = 0;
+    if (fTabWidget->count() >0) {
+#if QT_VERSION < 0x040000
+      tabBarX = fTabWidget->width()-fTabWidget->page(0)->width();
+      tabBarY = fTabWidget->height()-fTabWidget->page(0)->height();
+#else
+      tabBarX = fTabWidget->width()-fTabWidget->widget(0)->width();
+      tabBarY = fTabWidget->height()-fTabWidget->widget(0)->height();
+#endif
+    }
+
+    fMainWindow->resize(tabBarX+fMainWindow->width()+sizeX-fTabWidget->width(),tabBarY+fMainWindow->height()+sizeY-fTabWidget->height());
+  }
+
+  // Problems with resize. The widgets are not realy drawn at this step,
+  // then we have to force them on order to check the size
+
+#if QT_VERSION < 0x040000
+  fTabWidget->insertTab(aWidget,name,fTabWidget->count());
+#else
+  fTabWidget->insertTab(fTabWidget->count(),aWidget,name);
+#endif
+  
+#if QT_VERSION < 0x040000
+  fTabWidget->setCurrentPage(fTabWidget->count()-1);
+#else
+  fTabWidget->setCurrentIndex(fTabWidget->count()-1);
+#endif
+
+  // Set visible
+#if QT_VERSION >= 0x040000
+ #if QT_VERSION >= 0x040200
+   fTabWidget->setLastTabCreated(fTabWidget->currentIndex());
+ #else
+   fTabWidget->setLastTabCreated(fTabWidget->currentIndex());
+ #endif
+#else
+  fTabWidget->setLastTabCreated(fTabWidget->currentPageIndex());
+#endif
+  
+  return true;
+}
+
+
+void G4UIQt::UpdateTabWidget(int tabNumber) {
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::UpdateTabWidget %d\n",tabNumber);
+#endif
+  if (  fTabWidget == NULL) {
+    fTabWidget = new G4QTabWidget;
+  }
+  
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::UpdateTabWidget CALL REPAINT tabGL\n");
+#endif
+
+#if QT_VERSION < 0x040000
+  fTabWidget->setCurrentPage(tabNumber);
+#else
+  fTabWidget->setCurrentIndex(tabNumber);
+#endif
+
+  // Send this signal to unblock graphic updates !
+  fTabWidget->setTabSelected(false);
+
+#if QT_VERSION >= 0x040000
+ #if QT_VERSION >= 0x040200
+  fTabWidget->setVisible(true);
+ #else
+  fTabWidget->show();
+ #endif
+#else
+  fTabWidget->show();
+#endif
+
+  // This will send a paintEvent to OGL Viewers
+  fTabWidget->setTabSelected(true);
+
+#if QT_VERSION < 0x040000
+  QApplication::sendPostedEvents () ;
+#else
+  QCoreApplication::sendPostedEvents () ;
+#endif
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::UpdateTabWidget END\n");
+#endif
+}
+
+
+/** Send resize event to all tabs
+ */
+void G4UIQt::ResizeTabWidget( QResizeEvent* e) {
+  for (G4int a=0;a<fTabWidget->count() ;a++) {
+#ifdef G4DEBUG_INTERFACES_BASIC
+    printf("G4UIQt::ResizeTabWidget +++++++++++++++++++++++++++++++++++++++\n");
+#endif
+#if QT_VERSION < 0x040000
+    fTabWidget->page(a)->resize(e->size());
+#else
+    fTabWidget->widget(a)->resize(e->size());
+#endif
+  }
+}
+
+
+/**   Start the Qt main loop
+*/
+G4UIsession* G4UIQt::SessionStart (
+)
+{
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt SessionStart\n");
+#endif
+
+  G4Qt* interactorManager = G4Qt::getInstance ();
+
+  Prompt("Session :");
+  exitSession = false;
+
+  if (fEmptyViewerTabLabel != NULL) {
+    bool visible = false;
+    if (fTabWidget != NULL) {
+      if (fTabWidget->isVisible()) {
+        visible = true;
+      }
+    }
+  }
+
+#if QT_VERSION >= 0x040000
+  #if QT_VERSION >= 0x040200
+      fMainWindow->setVisible(true);
+  #else
+      fMainWindow->show();
+  #endif
+#else
+      fMainWindow->show();
+#endif
+  // get the size of the tabbar
+  int tabBarX = 0;
+  int tabBarY = 0;
+
+  if (fTabWidget != NULL) {
+#if QT_VERSION < 0x040000
+    tabBarX = -fTabWidget->page(0)->width();
+    tabBarY = -fTabWidget->page(0)->height();
+#else
+    tabBarX = -fTabWidget->widget(0)->width();
+    tabBarY = -fTabWidget->widget(0)->height();
+#endif
+  }
+  fMainWindow->resize(tabBarX+fMainWindow->width()+fLastQTabSizeX,tabBarY+fMainWindow->height()+fLastQTabSizeY);
+
+#if QT_VERSION < 0x040000
+  QApplication::sendPostedEvents () ;
+#else
+  QCoreApplication::sendPostedEvents () ;
+#endif
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::G4UIQt SessionStart2\n");
+#endif
+  interactorManager->DisableSecondaryLoop (); // TO KEEP
+  if ((QApplication*)interactorManager->GetMainInteractor())
+    ((QApplication*)interactorManager->GetMainInteractor())->exec();
+
+  // on ne passe pas le dessous ? FIXME ????
+  // je ne pense pas 13/06
+
+  //   void* event; // TO KEEP
+  //   while((event = interactorManager->GetEvent())!=NULL) {  // TO KEEP
+  //     interactorManager->DispatchEvent(event); // TO KEEP
+  //     if(exitSession==true) break; // TO KEEP
+  //   } // TO KEEP
+
+  interactorManager->EnableSecondaryLoop ();
+  return this;
+}
+
+
+/**   Display the prompt in the prompt area
+   @param aPrompt : string to display as the promt label
+   //FIXME : probablement inutile puisque le seul a afficher qq chose d'autre
+   que "session" est SecondaryLoop()
+*/
+void G4UIQt::Prompt (
+ G4String aPrompt
+)
+{
+  if (!aPrompt) return;
+
+  fCommandLabel->setText((char*)aPrompt.data());
+}
+
+
+
+void G4UIQt::SessionTerminate (
+)
+{
+  G4Qt* interactorManager = G4Qt::getInstance ();
+  fMainWindow->close();
+  ((QApplication*)interactorManager->GetMainInteractor())->exit(); 
+}
+
+
+
+/**
+   Called by intercoms/src/G4UImanager.cc<br>
+   Called by visualization/management/src/G4VisCommands.cc with "EndOfEvent" argument<br>
+   It have to pause the session command terminal.<br>
+   Call SecondaryLoop to wait for exit event<br>
+   @param aState
+   @see : G4VisCommandReviewKeptEvents::SetNewValue
+*/
+void G4UIQt::PauseSessionStart (
+ G4String aState
+)
+{
+  if (!aState) return;
+
+  if(aState=="G4_pause> ") {  // TO KEEP
+    SecondaryLoop ("Pause, type continue to exit this state"); // TO KEEP
+  } // TO KEEP
+
+  if(aState=="EndOfEvent") { // TO KEEP
+    // Picking with feed back in event data Done here !!!
+    SecondaryLoop ("End of event, type continue to exit this state"); // TO KEEP
+  } // TO KEEP
+}
+
+
+
+/**
+   Begin the secondary loop
+   @param a_prompt : label to display as the prompt label
+ */
+void G4UIQt::SecondaryLoop (
+ G4String aPrompt
+)
+{
+  if (!aPrompt) return;
+
+  G4Qt* interactorManager = G4Qt::getInstance (); // TO KEEP ?
+  Prompt(aPrompt); // TO KEEP
+  exitPause = false; // TO KEEP
+  void* event; // TO KEEP
+  while((event = interactorManager->GetEvent())!=NULL) {  // TO KEEP
+    interactorManager->DispatchEvent(event); // TO KEEP
+    if(exitPause==true) break; // TO KEEP
+  } // TO KEEP
+  Prompt("Session :"); // TO KEEP
+}
+
+
+
+/**
+   Receive a cout from Geant4. We have to display it in the cout zone
+   @param aString : label to add in the display area
+   @return 0
+*/
+G4int G4UIQt::ReceiveG4cout (
+ G4String aString
+ )
+{
+  if (!aString) return 0;
+  
+  QStringList newStr;
+  
+  // Add to stringList
+#if QT_VERSION < 0x040000
+  newStr = QStringList(QString((char*)aString.data()).simplifyWhiteSpace());
+#else
+  newStr = QStringList(QString((char*)aString.data()).trimmed());
+#endif
+  fG4cout += newStr;
+ 
+#if QT_VERSION >= 0x040000
+  QStringList result = newStr.filter(fCoutFilter->text());
+#else
+  //L. Garnier : in qt3 filter will does nothing
+  QStringList result = "";
+#endif
+
+  if (result.join("\n").isEmpty()) {
+    return 0;
+  }
+  fCoutTBTextArea->append(result.join("\n"));
+  fCoutTBTextArea->repaint();
+
+#if QT_VERSION < 0x040000
+  fCoutTBTextArea->verticalScrollBar()->setValue(fCoutTBTextArea->verticalScrollBar()->maxValue());
+#else
+  fCoutTBTextArea->verticalScrollBar()->setSliderPosition(fCoutTBTextArea->verticalScrollBar()->maximum());
+#endif
+
+  return 0;
+}
+
+
+/**
+   Receive a cerr from Geant4. We have to display it in the cout zone
+   @param aString : label to add in the display area
+   @return 0
+*/
+G4int G4UIQt::ReceiveG4cerr (
+ G4String aString
+)
+{
+  if (!aString) return 0;
+
+  QStringList newStr;
+
+  // Add to stringList
+#if QT_VERSION < 0x040000
+  newStr = QStringList(QString((char*)aString.data()).simplifyWhiteSpace());
+#else
+  newStr = QStringList(QString((char*)aString.data()).trimmed());
+#endif
+  fG4cout += newStr;
+ 
+#if QT_VERSION < 0x040000
+  //L. Garnier : in qt3 filter will does nothing
+  QStringList result = "";
+#else
+  QStringList result = newStr.filter(fCoutFilter->text());
+#endif
+
+#if QT_VERSION < 0x040000
+  QColor previousColor = fCoutTBTextArea->color();
+  fCoutTBTextArea->setColor(Qt::red);
+  fCoutTBTextArea->append(result.join("\n"));
+  fCoutTBTextArea->setColor(previousColor);
+  fCoutTBTextArea->verticalScrollBar()->setValue(fCoutTBTextArea->verticalScrollBar()->maxValue());
+#else
+  QColor previousColor = fCoutTBTextArea->textColor();
+  fCoutTBTextArea->setTextColor(Qt::red);
+  fCoutTBTextArea->append(result.join("\n"));
+  fCoutTBTextArea->setTextColor(previousColor);
+  fCoutTBTextArea->verticalScrollBar()->setSliderPosition(fCoutTBTextArea->verticalScrollBar()->maximum());
+#endif
+  fCoutTBTextArea->repaint();
+  return 0;
+}
+
+
+
+/**
+   Add a new menu to the menu bar
+   @param aName name of menu
+   @param aLabel label to display
+ */
+void G4UIQt::AddMenu (
+ const char* aName
+,const char* aLabel
+)
+{
+  if (aName == NULL) return;
+  if (aLabel == NULL) return;
+
+#if QT_VERSION < 0x040000
+  QPopupMenu *fileMenu = new QPopupMenu( fMainWindow);
+  fMainWindow->menuBar()->insertItem( aLabel, fileMenu );
+#else
+  QMenu *fileMenu = new QMenu(aLabel);
+  fMainWindow->menuBar()->insertMenu(fMainWindow->menuBar()->actions().last(),fileMenu); 
+#endif
+
+  AddInteractor (aName,(G4Interactor)fileMenu);
+}
+
+
+/**
+   Add a new button to a menu
+   @param aMenu : parent menu
+   @param aLabel : label to display
+   @param aCommand : command to execute as a callback
+ */
+void G4UIQt::AddButton (
+ const char* aMenu
+,const char* aLabel
+,const char* aCommand
+)
+{
+  if(aMenu==NULL) return; // TO KEEP
+  if(aLabel==NULL) return; // TO KEEP
+  if(aCommand==NULL) return; // TO KEEP
+
+#if QT_VERSION < 0x040000
+  QPopupMenu *parent = (QPopupMenu*)GetInteractor(aMenu);
+#else
+  QMenu *parent = (QMenu*)GetInteractor(aMenu);
+#endif
+
+  if(parent==NULL) return;
+  
+  QSignalMapper *signalMapper = new QSignalMapper(this);
+#if QT_VERSION < 0x030200
+  QAction *action = new QAction(QString(aLabel),QString(aLabel),QKeySequence(),signalMapper, SLOT(map()));
+  action->addTo(parent);
+ connect(action,SIGNAL(activated()),signalMapper,SLOT(map()));
+
+#elif QT_VERSION < 0x040000
+  QAction *action = new QAction(QString(aLabel),QKeySequence(),signalMapper, SLOT(map()));
+  action->addTo(parent);
+ connect(action,SIGNAL(activated()),signalMapper,SLOT(map()));
+
+#else
+  QAction *action = parent->addAction(aLabel, signalMapper, SLOT(map()));
+
+#endif
+  connect(signalMapper, SIGNAL(mapped(const QString &)),this, SLOT(ButtonCallback(const QString&)));
+  signalMapper->setMapping(action, QString(aCommand));
+}
+
+
+
+
+void G4UIQt::ActivateCommand(
+ G4String newCommand
+)
+{
+  if (!fHelpTreeWidget) {
+    return;
+  }
+  // Look for the choosen command "newCommand"
+  size_t i = newCommand.index(" ");
+  G4String targetCom ="";
+  if( i != std::string::npos )
+    {
+      G4String newValue = newCommand(i+1,newCommand.length()-(i+1));
+      newValue.strip(G4String::both);
+      targetCom = ModifyToFullPathCommand( newValue );
+    }
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::ActivateCommand found : %s \n",targetCom.data());
+#endif
+  if (targetCom != "") {
+    OpenHelpTreeOnCommand(targetCom.data());
+  }
+
+#if QT_VERSION < 0x040000
+  fToolBox->setCurrentItem(fHelpTBWidget);
+#else
+  fToolBox->setCurrentWidget(fHelpTBWidget);
+#endif
+}
+
+
+
+/**
+   Create the help tree widget
+   @param parent : parent of tree widget
+   @return the widget containing the tree or NULL if it could not have beeen created
+ */
+
+void G4UIQt::InitHelpTree()
+{
+
+  if (! fHelpTreeWidget ) {
+#if QT_VERSION < 0x040000
+    fHelpTreeWidget = new QListView(fHelpVSplitter);
+#else
+    fHelpTreeWidget = new QTreeWidget();
+#endif
+  }
+
+
+  // build widget
+#if QT_VERSION < 0x040000
+  fHelpTreeWidget->setSelectionMode(QListView::Single);
+  fHelpTreeWidget->setRootIsDecorated(true);
+  fHelpTreeWidget->addColumn("Command");
+  fHelpTreeWidget->header()->setResizeEnabled(FALSE,1);
+#else
+  fHelpTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+  QStringList labels;
+  labels << QString("Command");
+  fHelpTreeWidget->setHeaderLabels(labels);
+#endif
+
+
+#if QT_VERSION < 0x040000
+  connect(fHelpTreeWidget, SIGNAL(selectionChanged ()),this, SLOT(HelpTreeClicCallback()));  
+  connect(fHelpTreeWidget, SIGNAL(doubleClicked (QListViewItem*)),this, SLOT(HelpTreeDoubleClicCallback()));
+#else
+  connect(fHelpTreeWidget, SIGNAL(itemSelectionChanged ()),this, SLOT(HelpTreeClicCallback()));  
+  connect(fHelpTreeWidget, SIGNAL(itemDoubleClicked (QTreeWidgetItem*,int)),this, SLOT(HelpTreeDoubleClicCallback()));  
+#endif
+
+}
+/**
+   Create the help tree widget
+   @param parent : parent of tree widget
+   @return the widget containing the tree or NULL if it could not have beeen created
+ */
+
+void G4UIQt::FillHelpTree()
+{
+  if (! fHelpTreeWidget ) {
+    InitHelpTree();
+  }
+
+  QString searchText = fHelpLine->text();
+
+  if (searchText =="") {
+    // clear old help tree
+    fHelpTreeWidget->clear();
+#if QT_VERSION < 0x040000
+    fHelpTreeWidget->removeColumn(1);
+    fHelpTreeWidget->removeColumn(0);
+#endif
+  } else {
+    return; 
+  }
+
+  if (fHelpArea) {
+#if QT_VERSION < 0x040200
+    fHelpArea->clear();
+#else
+    fHelpArea->setText("");
+#endif
+  }
+
+  if (fHelpLine) {
+#if QT_VERSION < 0x040200
+    fHelpLine->clear();
+#else
+    fHelpLine->setText("");
+#endif
+  }
+
+  G4UImanager* UI = G4UImanager::GetUIpointer();
+  if(UI==NULL) return;
+  G4UIcommandTree * treeTop = UI->GetTree();
+
+  G4int treeSize = treeTop->GetTreeEntry();
+#if QT_VERSION < 0x040000
+  QListViewItem * newItem = NULL;
+#else
+  QTreeWidgetItem * newItem = NULL;
+#endif
+  QString commandText = "";
+  for (int a=0;a<treeSize;a++) {
+    // Creating new item
+    newItem = NULL;
+
+#if QT_VERSION < 0x040000
+    commandText = QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace();
+#else
+    commandText = QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()).trimmed();
+#endif
+
+    // if already exist, don't create it !
+#if QT_VERSION < 0x040000
+    QListViewItem* tmpAddItem = fHelpTreeWidget->firstChild();
+    while (tmpAddItem != 0) {
+      if (!newItem) {
+        newItem = FindTreeItem(tmpAddItem,commandText);
+      }
+      tmpAddItem = tmpAddItem->nextSibling();
+    }
+#else
+    for (int b=0;b<fHelpTreeWidget->topLevelItemCount();b++) {
+      if (!newItem)
+        newItem = FindTreeItem(fHelpTreeWidget->topLevelItem(b),commandText);
+    }
+#endif
+
+    if (newItem == NULL) {
+      
+#if QT_VERSION < 0x040000
+      newItem = new QListViewItem(fHelpTreeWidget);
+#else
+      newItem = new QTreeWidgetItem(fHelpTreeWidget);
+#endif
+      newItem->setText(0,GetShortCommandPath(commandText));
+    }
+
+    // look for childs
+    CreateChildTree(newItem,treeTop->GetTree(a+1));
+  }
+
+}
+
+
+
+/**   Fill the Help Tree Widget
+   @param aParent : parent item to fill
+   @param aCommandTree : commandTree node associate with this part of the Tree
+*/
+#if QT_VERSION < 0x040000
+void G4UIQt::CreateChildTree(
+ QListViewItem *aParent
+,G4UIcommandTree *aCommandTree
+#else
+void G4UIQt::CreateChildTree(
+ QTreeWidgetItem *aParent
+,G4UIcommandTree *aCommandTree
+#endif
+)
+{
+  if (aParent == NULL) return;
+  if (aCommandTree == NULL) return;
+
+
+  // Creating new item
+#if QT_VERSION < 0x040000
+  QListViewItem * newItem;
+#else
+  QTreeWidgetItem * newItem;
+#endif
+
+  QString commandText = "";
+  // Get the Sub directories
+  for (int a=0;a<aCommandTree->GetTreeEntry();a++) {
+
+#if QT_VERSION < 0x040000
+    commandText = QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).simplifyWhiteSpace();
+#else
+    commandText = QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()).trimmed();
+#endif
+    
+    // if already exist, don't create it !
+    newItem = FindTreeItem(aParent,commandText);
+    if (newItem == NULL) {
+#if QT_VERSION < 0x040000
+      newItem = new QListViewItem(aParent);
+#else
+      newItem = new QTreeWidgetItem(aParent);
+#endif
+      newItem->setText(0,GetShortCommandPath(commandText));
+    }
+    CreateChildTree(newItem,aCommandTree->GetTree(a+1));
+  }
+
+
+
+  // Get the Commands
+
+  for (int a=0;a<aCommandTree->GetCommandEntry();a++) {
+    
+    QStringList stringList;
+#if QT_VERSION < 0x040000
+    commandText = QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).simplifyWhiteSpace();
+#else
+    commandText = QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()).trimmed();
+#endif
+
+    // if already exist, don't create it !
+    newItem = FindTreeItem(aParent,commandText);
+    if (newItem == NULL) {
+#if QT_VERSION < 0x040000
+      newItem = new QListViewItem(aParent);
+      newItem->setText(0,GetShortCommandPath(commandText));
+      newItem->setOpen(false);
+      
+#else
+      newItem = new QTreeWidgetItem(aParent);
+      newItem->setText(0,GetShortCommandPath(commandText));
+#if QT_VERSION < 0x040202
+      fHelpTreeWidget->setItemExpanded(newItem,false); 
+#else
+      newItem->setExpanded(false);
+#endif
+#endif
+    }
+  }
+}
+
+ 
+/** Find a treeItemWidget in the help tree
+    @param aCommand item's String to look for
+    @return item if found, NULL if not
+*/
+#if QT_VERSION < 0x040000
+QListViewItem* G4UIQt::FindTreeItem(
+ QListViewItem *aParent
+#else
+QTreeWidgetItem* G4UIQt::FindTreeItem(
+ QTreeWidgetItem *aParent
+#endif
+,const QString& aCommand
+)
+{
+  if (aParent == NULL) return NULL;
+
+  // Suppress last "/"
+  QString myCommand = aCommand;
+  
+#if QT_VERSION < 0x040000
+  if (myCommand.findRev("/") == ((int)myCommand.length()-1)) {
+    myCommand = myCommand.left(myCommand.length()-1);
+#else
+  if (myCommand.lastIndexOf("/") == (myCommand.size()-1)) {
+    myCommand = myCommand.left(myCommand.size()-1);
+#endif
+  }
+
+  if (GetLongCommandPath(aParent) == myCommand)
+    return aParent;
+  
+#if QT_VERSION < 0x040000
+  QListViewItem * tmp = NULL;
+  QListViewItem* tmpItem = aParent->firstChild();
+    while (tmpItem != 0) {
+      if (!tmp)
+        tmp = FindTreeItem(tmpItem,myCommand);
+      tmpItem = tmpItem->nextSibling();
+    }
+#else
+  QTreeWidgetItem * tmp = NULL;
+  for (int a=0;a<aParent->childCount();a++) {
+    if (!tmp)
+      tmp = FindTreeItem(aParent->child(a),myCommand);
+  }
+#endif
+  return tmp;
+}
+
+
+
+/**   Build the command list parameters in a QString<br>
+   Reimplement partialy the G4UIparameter.cc
+   @param aCommand : command to list parameters
+   @see G4UIparameter::List()
+   @see G4UIcommand::List()
+   @return the command list parameters, or "" if nothing
+*/
+QString G4UIQt::GetCommandList (
+ const G4UIcommand *aCommand
+)
+{
+
+  QString txt ="";
+  if (aCommand == NULL)
+    return txt;
+
+  G4String commandPath = aCommand->GetCommandPath();
+  G4String rangeString = aCommand->GetRange();
+  G4int n_guidanceEntry = aCommand->GetGuidanceEntries();
+  G4int n_parameterEntry = aCommand->GetParameterEntries();
+  
+  if ((commandPath == "") && 
+      (rangeString == "") &&
+      (n_guidanceEntry == 0) &&
+      (n_parameterEntry == 0)) {
+    return txt;
+  }
+
+  if((commandPath.length()-1)!='/') {
+    txt += "Command " + QString((char*)(commandPath).data()) + "\n";
+  }
+  txt += "Guidance :\n";
+  
+  for( G4int i_thGuidance=0; i_thGuidance < n_guidanceEntry; i_thGuidance++ ) {
+    txt += QString((char*)(aCommand->GetGuidanceLine(i_thGuidance)).data()) + "\n";
+  }
+  if( ! rangeString.isNull() ) {
+    txt += " Range of parameters : " + QString((char*)(rangeString).data()) + "\n";
+  }
+  if( n_parameterEntry > 0 ) {
+    G4UIparameter *param;
+    
+    // Re-implementation of G4UIparameter.cc
+    
+    for( G4int i_thParameter=0; i_thParameter<n_parameterEntry; i_thParameter++ ) {
+      param = aCommand->GetParameter(i_thParameter);
+      txt += "\nParameter : " + QString((char*)(param->GetParameterName()).data()) + "\n";
+      if( ! param->GetParameterGuidance().isNull() )
+        txt += QString((char*)(param->GetParameterGuidance()).data())+ "\n" ;
+      txt += " Parameter type  : " + QString(QChar(param->GetParameterType())) + "\n";
+      if(param->IsOmittable()){
+        txt += " Omittable       : True\n";
+      } else {
+        txt += " Omittable       : False\n";
+      }
+      if( param->GetCurrentAsDefault() ) {
+        txt += " Default value   : taken from the current value\n";
+      } else if( ! param->GetDefaultValue().isNull() ) {
+        txt += " Default value   : " + QString((char*)(param->GetDefaultValue()).data())+ "\n";
+      }
+      if( ! param->GetParameterRange().isNull() ) {
+        txt += " Parameter range : " + QString((char*)(param->GetParameterRange()).data())+ "\n";
+      }
+      if( ! param->GetParameterCandidates().isNull() ) {
+        txt += " Candidates      : " + QString((char*)(param->GetParameterCandidates()).data())+ "\n";
+      }
+    }
+  }
+  return txt;
+}
+
+
+
+/**  Implement G4VBasicShell vurtual function
+ */
+G4bool G4UIQt::GetHelpChoice(
+ G4int&
+)
+{
+#ifdef G4DEBUG_INTERFACES_BASIC
+  printf("G4UIQt::GetHelpChoice SHOULD NEVER GO HERE");
+#endif
+  return true;
+}
+
+
+/**   Event filter method. Every event from QtApplication goes here.<br/>
+   We apply a filter only for the Up and Down Arrow press when the QLineEdit<br/>
+   is active. If this filter match, Up arrow we give the previous command<br/>
+   and Down arrow will give the next if exist.<br/>
+   @param obj Emitter of the event
+   @param event Kind of event
+*/
+bool G4UIQt::eventFilter( // Should stay with a minuscule eventFilter because of Qt
+ QObject *aObj
+,QEvent *aEvent
+)
+{
+  bool moveCommandCursor = false;
+  if (aObj == NULL) return false;
+  if (aEvent == NULL) return false;
+
+  if (aObj == fHistoryTBTableList) {
+    if (aEvent->type() == QEvent::KeyPress) {
+      fCommandArea->setFocus();
+    }
+  }
+  if (aObj == fCommandArea) {
+    if (aEvent->type() == QEvent::KeyPress) {
+      QKeyEvent *e = static_cast<QKeyEvent*>(aEvent);
+      if ((e->key() == (Qt::Key_Down)) ||
+          (e->key() == (Qt::Key_PageDown)) ||
+          (e->key() == (Qt::Key_Up)) ||
+          (e->key() == (Qt::Key_PageUp))) {
+#if QT_VERSION < 0x040000
+        // count rows...
+        QListViewItem* tmpItem = fHistoryTBTableList->firstChild();
+        int selection = -1;
+        int index = 0;
+        while (tmpItem != 0) {
+          if (tmpItem == fHistoryTBTableList->selectedItem()) {
+            selection = index;
+          }
+          index ++;
+          tmpItem = tmpItem->nextSibling();
+        }
+        if (fHistoryTBTableList->childCount()) {
+          if (selection == -1) {
+            selection = fHistoryTBTableList->childCount()-1;
+          } else {
+            if (e->key() == (Qt::Key_Down)) {
+              if (selection <(fHistoryTBTableList->childCount()-1))
+                selection++;
+            } else if (e->key() == (Qt::Key_PageDown)) {
+              selection = fHistoryTBTableList->childCount()-1;
+#else
+        int selection = fHistoryTBTableList->currentRow();
+        if (fHistoryTBTableList->count()) {
+          if (selection == -1) {
+            selection = fHistoryTBTableList->count()-1;
+          } else {
+            if (e->key() == (Qt::Key_Down)) {
+              if (selection <(fHistoryTBTableList->count()-1))
+                selection++;
+            } else if (e->key() == (Qt::Key_PageDown)) {
+              selection = fHistoryTBTableList->count()-1;
+#endif
+            } else if (e->key() == (Qt::Key_Up)) {
+              if (selection >0)
+                selection --;
+            } else if (e->key() == (Qt::Key_PageUp)) {
+              selection = 0;
+            }
+          }
+          fHistoryTBTableList->clearSelection();
+#if QT_VERSION < 0x040000
+          QListViewItem* tmpItem = fHistoryTBTableList->firstChild();
+          int index = 0;
+          while (tmpItem != 0) {
+            if (index == selection) {
+              tmpItem->setSelected(true);
+              fHistoryTBTableList->setCurrentItem(tmpItem);
+          }
+          index ++;
+          tmpItem = tmpItem->nextSibling();
+        }
+#else
+#if QT_VERSION < 0x040202
+          fHistoryTBTableList->setItemSelected(fHistoryTBTableList->item(selection),true);
+#else
+          fHistoryTBTableList->item(selection)->setSelected(true);
+#endif      
+          fHistoryTBTableList->setCurrentItem(fHistoryTBTableList->item(selection));
+#endif
+        }
+        moveCommandCursor = true;
+      } else if (e->key() == (Qt::Key_Tab)) {
+#if QT_VERSION < 0x040000
+        G4String ss = Complete(fCommandArea->text().ascii());
+#else
+        G4String ss = Complete(fCommandArea->text().toStdString().c_str());
+#endif
+        fCommandArea->setText((char*)(ss.data()));
+
+        // do not pass by parent, it will disable widget tab focus !
+        return true;
+#if QT_VERSION >= 0x040000
+        // L.Garnier : MetaModifier is CTRL for MAC, but I don't want to put a MAC 
+        // specific #ifdef
+      } else if (((e->modifiers () == Qt::ControlModifier) || (e->modifiers () == Qt::MetaModifier)) && (e->key() == Qt::Key_A)) {
+       fCommandArea->home(false);
+       return true;
+      } else if (((e->modifiers () == Qt::ControlModifier) || (e->modifiers () == Qt::MetaModifier)) && (e->key() == Qt::Key_E)) {
+       fCommandArea->end(false);
+       return true;
+#endif
+      }
+    }
+  }
+  bool res= false;
+  // change cursor position if needed
+  if (moveCommandCursor == true) {
+#ifdef G4DEBUG_INTERFACES_BASIC
+    printf("G4UIQt::eventFilter setCursor Position\n");
+#endif
+    fCommandArea->setCursorPosition ( fCommandArea->text().length() );
+    fCommandArea->setCursorPosition (4);
+  } else {
+    // pass the event on to the parent class
+    res = QObject::eventFilter(aObj, aEvent);
+  }
+  return res;
+}
+
+
+
+
+/***************************************************************************/
+//
+//             SLOTS DEFINITIONS
+//
+/***************************************************************************/
+
+/**   Called when user give "help" command.
+*/
+void G4UIQt::ShowHelpCallback (
+)
+{
+  TerminalHelp("");
+}
+
+
+/**   Called when user click on clear button. Clear the text Output area
+*/
+void G4UIQt::ClearButtonCallback (
+)
+{
+  fCoutTBTextArea->clear();
+  fG4cout.clear();
+}
+
+/**   Called when user exit session
+*/
+void G4UIQt::ExitSession (
+)
+{
+  SessionTerminate();
+}
+
+void G4UIQt::ExitHelp(
+)
+{
+}
+
+/**   Callback call when "click on a menu entry.<br>
+   Send the associated command to geant4
+*/
+void G4UIQt::CommandEnteredCallback (
+)
+{
+#if QT_VERSION < 0x040000
+  G4String command (fCommandArea->text().ascii());
+  if (fCommandArea->text().simplifyWhiteSpace() != "") {
+
+    QListViewItem *newItem = new QListViewItem(fHistoryTBTableList);
+    newItem->setText(0,fCommandArea->text());
+    fHistoryTBTableList->insertItem(newItem);
+    // now we have to arrange 
+    QListViewItem *temp= fHistoryTBTableList->lastItem();
+    for (int i=0; i<fHistoryTBTableList->childCount()-1;i++) {
+      fHistoryTBTableList->takeItem(temp);
+      fHistoryTBTableList->insertItem(temp);
+      temp= fHistoryTBTableList->lastItem();
+    }
+#else
+  G4String command (fCommandArea->text().toStdString().c_str());
+  if (fCommandArea->text().trimmed() != "") {
+    fHistoryTBTableList->addItem(fCommandArea->text());
+#endif
+    fHistoryTBTableList->clearSelection();
+    fHistoryTBTableList->setCurrentItem(NULL);
+    fCommandArea->setText("");
+
+    G4Qt* interactorManager = G4Qt::getInstance ();
+    if (interactorManager) { 
+      interactorManager->FlushAndWaitExecution();
+    }
+    if (command(0,4) != "help") {
+      ApplyShellCommand (command,exitSession,exitPause);
+    } else {
+      ActivateCommand(command);
+    }
+    // Rebuild help tree
+    FillHelpTree();
+
+    if(exitSession==true) 
+      SessionTerminate();
+  }
+}
+
+
+/**   Callback call when "enter" clicked on the command zone.<br>
+   Send the command to geant4
+   @param aCommand
+*/
+void G4UIQt::ButtonCallback (
+ const QString& aCommand
+)
+{
+#if QT_VERSION < 0x040000
+  G4String ss = G4String(aCommand.ascii());
+#else
+  G4String ss = G4String(aCommand.toStdString().c_str());
+#endif
+  ApplyShellCommand(ss,exitSession,exitPause);
+
+  // Rebuild help tree
+  FillHelpTree();
+
+  if(exitSession==true) 
+    SessionTerminate();
+}
+
+
+
+/**   This callback is activated when user selected a item in the help tree
+*/
+void G4UIQt::HelpTreeClicCallback (
+)
+{
+#if QT_VERSION < 0x040000
+  QListViewItem* item =  NULL;
+#else
+  QTreeWidgetItem* item =  NULL;
+#endif
+  if (!fHelpTreeWidget)
+    return ;
+
+  if (!fHelpArea)
+    return;
+  
+#if QT_VERSION < 0x040000
+  item =fHelpTreeWidget->selectedItem();
+#else
+  QList<QTreeWidgetItem *> list =fHelpTreeWidget->selectedItems();
+  if (list.isEmpty())
+    return;
+  item = list.first();
+#endif
+  if (!item)
+    return;
+  
+  G4UImanager* UI = G4UImanager::GetUIpointer();
+  if(UI==NULL) return;
+  G4UIcommandTree * treeTop = UI->GetTree();
+
+#if QT_VERSION < 0x040000
+  std::string itemText = GetLongCommandPath(item).ascii();
+#else
+  std::string itemText = GetLongCommandPath(item).toStdString();
+#endif
+  
+  G4UIcommand* command = treeTop->FindPath(itemText.c_str());
+
+  if (command) {
+#if QT_VERSION >= 0x040000
+#if QT_VERSION < 0x040200
+    fHelpArea->clear();
+    fHelpArea->append(GetCommandList(command));
+#else
+    fHelpArea->setText(GetCommandList(command));
+#endif
+#else
+    fHelpArea->setText(GetCommandList(command));
+#endif
+  } else {  // this is a command
+    G4UIcommandTree* path = treeTop->FindCommandTree(itemText.c_str());
+    if ( path) {
+      // this is not a command, this is a sub directory
+      // We display the Title
+#if QT_VERSION >= 0x040000
+#if QT_VERSION < 0x040200
+      fHelpArea->clear();
+      fHelpArea->append(path->GetTitle().data());
+#else
+      fHelpArea->setText(path->GetTitle().data());
+#endif
+#else
+      fHelpArea->setText(path->GetTitle().data());
+#endif
+    }
+  }
+}
+ 
+/**   This callback is activated when user double clic on a item in the help tree
+*/
+void G4UIQt::HelpTreeDoubleClicCallback (
+)
+{
+  HelpTreeClicCallback();
+
+#if QT_VERSION < 0x040000
+  QListViewItem* item =  NULL;
+#else
+  QTreeWidgetItem* item =  NULL;
+#endif
+  if (!fHelpTreeWidget)
+    return ;
+
+  if (!fHelpArea)
+    return;
+  
+#if QT_VERSION < 0x040000
+  item =fHelpTreeWidget->selectedItem();
+#else
+  QList<QTreeWidgetItem *> list =fHelpTreeWidget->selectedItems();
+  if (list.isEmpty())
+    return;
+  item = list.first();
+#endif
+  if (!item)
+    return;
+
+  fCommandArea->clear();
+  fCommandArea->setText(GetLongCommandPath(item));
+}
+
+
+/**   Callback called when user select an old command in the command history<br>
+   Give it to the command area.
+*/
+void G4UIQt::CommandHistoryCallback(
+)
+{
+#if QT_VERSION < 0x040000
+  QListViewItem* item =  NULL;
+#else
+  QListWidgetItem* item =  NULL;
+#endif
+  if (!fHistoryTBTableList)
+    return ;
+
+  
+#if QT_VERSION < 0x040000
+  item =fHistoryTBTableList->selectedItem();
+#else
+  QList<QListWidgetItem *> list =fHistoryTBTableList->selectedItems();
+  if (list.isEmpty())
+    return;
+  item = list.first();
+#endif
+  if (!item)
+    return;
+#if QT_VERSION < 0x040000
+  fCommandArea->setText(item->text(0));
+#else
+  fCommandArea->setText(item->text());
+#endif
+#ifdef G4DEBUG_INTERFACES_BASIC
+    printf("G4UIQt::CommandHistoryCallback change text\n");
+#endif
+}
+
+
+void G4UIQt::CoutFilterCallback(
+#if QT_VERSION < 0x040000
+const QString &) {
+#else
+const QString & text) {
+#endif
+
+#if QT_VERSION < 0x040000
+  QStringList result = "";
+#else
+  QStringList result = fG4cout.filter(text);
+  fCoutTBTextArea->setPlainText(result.join("\n"));
+#endif
+
+  fCoutTBTextArea->repaint();
+#if QT_VERSION < 0x040000
+  fCoutTBTextArea->verticalScrollBar()->setValue(fCoutTBTextArea->verticalScrollBar()->maxValue());
+#else
+  fCoutTBTextArea->verticalScrollBar()->setSliderPosition(fCoutTBTextArea->verticalScrollBar()->maximum());
+#endif
+
+ }
+
+/**   Callback called when user give a new string to look for<br>
+   Display a list of matching commands descriptions. If no string is set,
+   will display the complete help tree
+*/
+void G4UIQt::LookForHelpStringCallback(
+)
+{
+  QString searchText = fHelpLine->text();
+
+#if QT_VERSION < 0x040200
+  fHelpArea->clear();
+#else
+  fHelpArea->setText("");
+#endif
+  if (searchText =="") {
+    // clear old help tree
+    fHelpTreeWidget->clear();
+#if QT_VERSION < 0x040000
+    fHelpTreeWidget->removeColumn(1);
+    fHelpTreeWidget->removeColumn(0);
+#endif
+
+    FillHelpTree();
+
+    return;
+  } else {
+    OpenHelpTreeOnCommand(searchText);
+  }
+}
+
+
+void G4UIQt::OpenHelpTreeOnCommand(
+ const QString & searchText
+)
+{
+  // the help tree
+  G4UImanager* UI = G4UImanager::GetUIpointer();
+  if(UI==NULL) return;
+  G4UIcommandTree * treeTop = UI->GetTree();
+  
+  G4int treeSize = treeTop->GetTreeEntry();
+
+  // clear old help tree
+  fHelpTreeWidget->clear();
+#if QT_VERSION < 0x040000
+  fHelpTreeWidget->removeColumn(1);
+  fHelpTreeWidget->removeColumn(0);
+#endif
+
+  // look for new items
+
+  int tmp = 0;
+#if QT_VERSION < 0x040000
+  int multFactor = 1000; // factor special for having double keys in Qt3
+  int doubleKeyAdd = 0;  // decay for doubleKeys in Qt3
+#endif
+
+  QMap<int,QString> commandResultMap;
+  QMap<int,QString> commandChildResultMap;
+
+  for (int a=0;a<treeSize;a++) {
+    G4UIcommand* command = treeTop->FindPath(treeTop->GetTree(a+1)->GetPathName().data());
+#if QT_VERSION > 0x040000
+    tmp = GetCommandList (command).count(searchText,Qt::CaseInsensitive);
+#else
+    tmp = GetCommandList (command).contains(searchText,false);
+#endif
+    if (tmp >0) {
+#if QT_VERSION > 0x040000
+      commandResultMap.insertMulti(tmp,QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()));
+#else // tricky thing for Qt3...
+      doubleKeyAdd = 0;
+      while (commandResultMap.find( tmp*multFactor+doubleKeyAdd) != commandResultMap.end()) {
+        doubleKeyAdd ++;
+      }
+      commandResultMap.insert( tmp*multFactor+doubleKeyAdd,QString((char*)(treeTop->GetTree(a+1)->GetPathName()).data()) );
+#endif
+    }
+    // look for childs
+    commandChildResultMap = LookForHelpStringInChildTree(treeTop->GetTree(a+1),searchText);
+    // insert new childs
+    if (!commandChildResultMap.empty()) {
+#if QT_VERSION > 0x040000
+      QMap<int,QString>::const_iterator i = commandChildResultMap.constBegin();
+      while (i != commandChildResultMap.constEnd()) {
+        commandResultMap.insertMulti(i.key(),i.value());
+#else // tricky thing for Qt3...
+      QMap<int,QString>::const_iterator i = commandChildResultMap.begin();
+      while (i != commandChildResultMap.end()) {
+        doubleKeyAdd = 0;
+        while (commandResultMap.find( i.key()*multFactor+doubleKeyAdd) != commandResultMap.end()) {
+          doubleKeyAdd ++;
+        }
+        commandResultMap.insert(i.key()*multFactor+doubleKeyAdd,i.data());
+#endif
+        i++;
+      }
+      commandChildResultMap.clear();
+    }
+  }
+
+  // build new help tree
+#if QT_VERSION < 0x040000
+  fHelpTreeWidget->setSelectionMode(QListView::Single);
+  fHelpTreeWidget->setRootIsDecorated(true);
+  fHelpTreeWidget->addColumn("Command");
+  fHelpTreeWidget->addColumn("Match");
+  //  fHelpTreeWidget->header()->setResizeEnabled(FALSE,1);
+#else
+  fHelpTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+  fHelpTreeWidget->setColumnCount(2);
+  QStringList labels;
+  labels << QString("Command") << QString("Match");
+  fHelpTreeWidget->setHeaderLabels(labels);
+#endif
+
+  if (commandResultMap.empty()) {
+#if QT_VERSION < 0x040200
+    fHelpArea->clear();
+    fHelpArea->append("No match found");
+#else
+    fHelpArea->setText("No match found");
+#endif
+    return;
+  }
+
+#if QT_VERSION > 0x040000
+  QMap<int,QString>::const_iterator i = commandResultMap.constEnd();
+#else
+  QMap<int,QString>::const_iterator i = commandResultMap.end();
+#endif
+  i--;
+  // 10 maximum progress values
+  float multValue = 10.0/(float)(i.key());
+  QString progressChar = "|";
+  QString progressStr = "|";
+
+#if QT_VERSION < 0x040000
+  QListViewItem * newItem;
+#else
+  QTreeWidgetItem * newItem;
+#endif
+  bool end = false;
+  while (!end) {
+#if QT_VERSION > 0x040000
+    if (i == commandResultMap.constBegin()) {
+#else
+    if (i == commandResultMap.begin()) {
+#endif
+      end = true;
+    }
+    for(int a=0;a<int(i.key()*multValue);a++) {
+      progressStr += progressChar;
+    }
+#if QT_VERSION < 0x040000
+    newItem = new QListViewItem(fHelpTreeWidget);
+    QString commandStr = i.data().simplifyWhiteSpace();
+#else
+    newItem = new QTreeWidgetItem(fHelpTreeWidget);
+    QString commandStr = i.value().trimmed();
+#endif
+
+#if QT_VERSION < 0x040000
+    if (commandPath.find("/") == 0) {
+      commandStr = commandStr.right(commandStr.length()-1);
+#else
+    if (commandStr.indexOf("/") == 0) {
+      commandStr = commandStr.right(commandStr.size()-1);
+#endif
+    }
+      
+    newItem->setText(0,commandStr);
+    newItem->setText(1,progressStr);
+    
+#if QT_VERSION >= 0x040200
+    newItem->setForeground ( 1, QBrush(Qt::blue) );
+#endif
+    progressStr = "|";
+    i--;
+  }
+  // FIXME :  to be checked on Qt3
+#if QT_VERSION < 0x040000
+  fHelpTreeWidget->setColumnWidthMode (1,QListView::Maximum);
+  fHelpTreeWidget->setSorting(1,false);
+#else
+  fHelpTreeWidget->resizeColumnToContents (0);
+  fHelpTreeWidget->sortItems(1,Qt::DescendingOrder);
+  //  fHelpTreeWidget->setColumnWidth(1,10);//resizeColumnToContents (1);
+#endif
+}
+
+
+
+
+QMap<int,QString> G4UIQt::LookForHelpStringInChildTree(
+ G4UIcommandTree *aCommandTree
+,const QString & text
+ )
+{
+  QMap<int,QString> commandResultMap;
+  if (aCommandTree == NULL) return commandResultMap;
+  
+#if QT_VERSION < 0x040000
+  int multFactor = 1000; // factor special for having double keys in Qt3
+  int doubleKeyAdd = 0;  // decay for doubleKeys in Qt3
+#endif
+
+  // Get the Sub directories
+  int tmp = 0;
+  QMap<int,QString> commandChildResultMap;
+  
+  for (int a=0;a<aCommandTree->GetTreeEntry();a++) {
+    const G4UIcommand* command = aCommandTree->GetGuidance();
+#if QT_VERSION > 0x040000
+    tmp = GetCommandList (command).count(text,Qt::CaseInsensitive);
+#else
+    tmp = GetCommandList (command).contains(text,false);
+#endif
+    if (tmp >0) {
+#if QT_VERSION > 0x040000
+      commandResultMap.insertMulti(tmp,QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()));
+#else // tricky thing for Qt3...
+      doubleKeyAdd = 0;
+      while (commandResultMap.find( tmp*multFactor+doubleKeyAdd) != commandResultMap.end()) {
+        doubleKeyAdd ++;
+      }
+      commandResultMap.insert(tmp*multFactor+doubleKeyAdd,QString((char*)(aCommandTree->GetTree(a+1)->GetPathName()).data()));
+#endif
+    }
+    // look for childs
+    commandChildResultMap = LookForHelpStringInChildTree(aCommandTree->GetTree(a+1),text);
+    
+    if (!commandChildResultMap.empty()) {
+      // insert new childs
+#if QT_VERSION > 0x040000
+      QMap<int,QString>::const_iterator i = commandChildResultMap.constBegin();
+      while (i != commandChildResultMap.constEnd()) {
+        commandResultMap.insertMulti(i.key(),i.value());
+#else // tricky thing for Qt3...
+      QMap<int,QString>::const_iterator i = commandChildResultMap.begin();
+      while (i != commandChildResultMap.end()) {
+        doubleKeyAdd = 0;
+        while (commandResultMap.find( i.key()*multFactor+doubleKeyAdd) != commandResultMap.end()) {
+          doubleKeyAdd ++;
+        }
+        commandResultMap.insert(i.key()*multFactor+doubleKeyAdd,i.data());
+#endif
+        i++;
+      }
+      commandChildResultMap.clear();
+    }
+  }
+  // Get the Commands
+  
+  for (int a=0;a<aCommandTree->GetCommandEntry();a++) {
+    const G4UIcommand* command = aCommandTree->GetCommand(a+1);
+#if QT_VERSION > 0x040000
+    tmp = GetCommandList (command).count(text,Qt::CaseInsensitive);
+#else
+    tmp = GetCommandList (command).contains(text,false);
+#endif
+    if (tmp >0) {
+#if QT_VERSION > 0x040000
+      commandResultMap.insertMulti(tmp,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()));
+#else // tricky thing for Qt3...
+      doubleKeyAdd = 0;
+      while (commandResultMap.find( tmp*multFactor+doubleKeyAdd) != commandResultMap.end()) {
+        doubleKeyAdd ++;
+      }
+      commandResultMap.insert(tmp*multFactor+doubleKeyAdd,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()));
+#endif
+    }
+    
+  }
+  return commandResultMap;
+}
+
+  
+QString G4UIQt::GetShortCommandPath(
+QString commandPath
+)
+{
+#if QT_VERSION < 0x040000
+  if (commandPath.find("/") == 0) {
+    commandPath = commandPath.right(commandPath.length()-1);
+#else
+  if (commandPath.indexOf("/") == 0) {
+    commandPath = commandPath.right(commandPath.size()-1);
+#endif
+  }
+
+#if QT_VERSION < 0x040000
+  commandPath = commandPath.right(commandPath.length()-commandPath.findRev("/",-2)-1);
+#else
+  commandPath = commandPath.right(commandPath.size()-commandPath.lastIndexOf("/",-2)-1);
+#endif
+ 
+#if QT_VERSION < 0x040000
+  if (commandPath.findRev("/") == ((int)commandPath.length()-1)) {
+    commandPath = commandPath.left(commandPath.length()-1);
+ }
+#else
+ if (commandPath.lastIndexOf("/") == (commandPath.size()-1)) {
+    commandPath = commandPath.left(commandPath.size()-1);
+ }
+#endif
+
+ return commandPath;
+}
+
+
+QString G4UIQt::GetLongCommandPath(
+#if QT_VERSION < 0x040000
+ QListViewItem* item
+#else
+ QTreeWidgetItem* item
+#endif
+)
+{
+  if (item == NULL) return "";
+
+  // rebuild path:
+  QString itemText = "";
+  itemText = item->text(0);
+
+  while (item->parent() != NULL) {
+    itemText = item->parent()->text(0)+"/"+itemText;
+    item = item->parent();
+  }
+  itemText = "/"+itemText;
+  
+  return itemText;
+}
+
+G4QTabWidget::G4QTabWidget(
+QSplitter*& split
+):QTabWidget(split)
+ ,tabSelected(false)
+ ,lastCreated(-1)
+{
+}
+
+G4QTabWidget::G4QTabWidget(
+):QTabWidget()
+ ,tabSelected(false)
+ ,lastCreated(-1)
+{
+}
+
+
+  
+#if QT_VERSION >= 0x040500
+void G4UIQt::TabCloseCallback(int a){
+#else
+void G4UIQt::TabCloseCallback(int){
+#endif
+#if QT_VERSION >= 0x040500
+  QWidget* temp = fTabWidget->widget(a);
+  fTabWidget->removeTab (a);
+
+  delete temp;
+
+  if (fTabWidget->count() == 0) {
+    if (fEmptyViewerTabLabel == NULL) {
+#if QT_VERSION < 0x040000
+      fEmptyViewerTabLabel = new QLabel(fToolBox,"         If you want to have a Viewer, please use /vis/open commands. ");
+#else
+      fEmptyViewerTabLabel = new QLabel("         If you want to have a Viewer, please use /vis/open commands. ");
+#endif
+    }
+
+    fMyVSplitter->addWidget(fEmptyViewerTabLabel);
+    fMyVSplitter->show();
+    fEmptyViewerTabLabel->show();
+    fTabWidget->setParent(0);
+#if QT_VERSION >= 0x040000
+  #if QT_VERSION >= 0x040200
+      fTabWidget->setVisible(false);
+  #else
+      fMainWindow->hide();
+  #endif
+#else
+      fMainWindow->hide();
+#endif
+    delete fTabWidget;
+    fTabWidget = NULL;
+  }
+#endif
+}
+
+
+void G4UIQt::ToolBoxActivated(int a){
+
+#if QT_VERSION < 0x040000
+  if (fToolBox->item(a) == fHelpTBWidget) {
+#else
+  if (fToolBox->widget(a) == fHelpTBWidget) {
+#endif
+    // Rebuild the help tree
+    FillHelpTree();
+  }
+}
+
+void G4QTabWidget::paintEvent(
+QPaintEvent *
+)
+{
+
+#if QT_VERSION < 0x040000
+  if (currentPage()) {
+#else
+  if (currentWidget()) {
+#endif
+
+    if ( isTabSelected()) {
+
+#if QT_VERSION < 0x040000
+      QApplication::sendPostedEvents () ;
+#else
+      QCoreApplication::sendPostedEvents () ;
+#endif
+
+#ifdef G4DEBUG_INTERFACES_BASIC
+      printf("G4QTabWidget::paintEvent OK\n");
+#endif
+#if QT_VERSION < 0x040000
+      QString text = label (currentPageIndex()); 
+#else
+      QString text = tabText (currentIndex()); 
+#endif
+
+      if (lastCreated == -1) {
+        QString paramSelect = QString("/vis/viewer/select ")+text;
+        G4UImanager* UI = G4UImanager::GetUIpointer();
+        if(UI != NULL)  {
+#if QT_VERSION < 0x040000
+          UI->ApplyCommand(paramSelect.ascii());
+#else
+          UI->ApplyCommand(paramSelect.toStdString().c_str());
+#endif
+        }
+      } else {
+        lastCreated = -1;
+      }
+      setTabSelected(false);
+    }
+  }
+}
+
+#endif
Index: trunk/source/interfaces/common/#GNUmakefile#
===================================================================
--- trunk/source/interfaces/common/#GNUmakefile#	(revision 1350)
+++ trunk/source/interfaces/common/#GNUmakefile#	(revision 1350)
@@ -0,0 +1,27 @@
+# $Id: GNUmakefile,v 1.5 2010/01/06 14:08:20 lgarnier Exp $
+# -------------------------------------------------------------
+# GNUmakefile for interfaces/common library.  John Allison, 6/7/98.
+
+name := G4UIcommon
+
+ifndef G4INSTALL
+  G4INSTALL = ../../..
+endif
+
+# For debug mode
+# CPPFLAGS += -DG4DEBUG_INTERFACES_COMMON
+
+include $(G4INSTALL)/config/architecture.gmk
+#include $(G4INSTALL)/config/G4VIS_BUILD.gmk
+include $(G4INSTALL)/config/G4UI_BUILD.gmk
+include $(G4INSTALL)/config/interactivity.gmk
+
+# NO need OGL, then reset OGLGLAGS
+OGLFLAGS = ""
+OGLLIBS  = ""
+
+CPPFLAGS += -I$(G4BASE)/global/management/include
+CPPFLAGS += -I$(G4BASE)/intercoms/include
+CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
+
+include $(G4INSTALL)/config/common.gmk
Index: trunk/source/interfaces/common/CMakeLists.txt
===================================================================
--- trunk/source/interfaces/common/CMakeLists.txt	(revision 1350)
+++ trunk/source/interfaces/common/CMakeLists.txt	(revision 1350)
@@ -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()
+
Index: trunk/source/interfaces/common/GNUmakefile~
===================================================================
--- trunk/source/interfaces/common/GNUmakefile~	(revision 1350)
+++ trunk/source/interfaces/common/GNUmakefile~	(revision 1350)
@@ -0,0 +1,27 @@
+# $Id: GNUmakefile,v 1.5 2010/01/06 14:08:20 lgarnier Exp $
+# -------------------------------------------------------------
+# GNUmakefile for interfaces/common library.  John Allison, 6/7/98.
+
+name := G4UIcommon
+
+ifndef G4INSTALL
+  G4INSTALL = ../../..
+endif
+
+# For debug mode
+# CPPFLAGS += -DG4DEBUG_INTERFACES_COMMON
+
+include $(G4INSTALL)/config/architecture.gmk
+#include $(G4INSTALL)/config/G4VIS_BUILD.gmk
+include $(G4INSTALL)/config/G4UI_BUILD.gmk
+include $(G4INSTALL)/config/interactivity.gmk
+
+# NO need OGL, then reset OGLGLAGS
+OGLFLAGS = ""
+OGLLIBS  = ""
+
+CPPFLAGS += -I$(G4BASE)/global/management/include
+CPPFLAGS += -I$(G4BASE)/intercoms/include
+CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
+
+include $(G4INSTALL)/config/common.gmk
Index: trunk/source/interfaces/common/sources.cmake
===================================================================
--- trunk/source/interfaces/common/sources.cmake	(revision 1350)
+++ trunk/source/interfaces/common/sources.cmake	(revision 1350)
@@ -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:  $
+#
+#------------------------------------------------------------------------------
+
+# 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
+
Index: trunk/source/interfaces/common/src/G4Qt.cc~
===================================================================
--- trunk/source/interfaces/common/src/G4Qt.cc~	(revision 1350)
+++ trunk/source/interfaces/common/src/G4Qt.cc~	(revision 1350)
@@ -0,0 +1,209 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4Qt.cc,v 1.17 2010/05/20 07:01:03 lgarnier Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-01 $
+//
+// L. Garnier
+
+#if defined(G4INTY_BUILD_QT) || defined(G4INTY_USE_QT)
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "G4ios.hh"
+
+#include "G4Qt.hh"
+#include <qwidget.h>
+
+#include <qapplication.h>
+
+
+G4Qt* G4Qt::instance    = NULL;
+
+static G4bool QtInited  = FALSE;
+
+/***************************************************************************/
+G4Qt* G4Qt::getInstance (
+) 
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  return G4Qt::getInstance (0,NULL,(char*)"Geant4");
+}
+/***************************************************************************/
+G4Qt* G4Qt::getInstance (
+ int    a_argn
+,char** a_args
+,char*  a_class
+) 
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  if (instance==NULL) {
+    instance = new G4Qt(a_argn,a_args,a_class);
+  }
+  return instance;
+}
+/***************************************************************************/
+G4Qt::G4Qt (
+ int    a_argn
+,char** a_args
+ ,char*  /*a_class */
+ )
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  argn = 0;
+  args = NULL;
+
+#ifdef G4DEBUG_INTERFACES_COMMON
+  printf("G4Qt::G4Qt try to inited Qt\n");
+#endif
+  // Check if Qt already init in another external app
+  if(qApp) {
+    QtInited  = TRUE;
+    //#if QT_VERSION < 0x040000
+    //      SetMainInteractor (&qApp);
+    //#else
+    SetMainInteractor (qApp);
+    //#endif
+    SetArguments      (a_argn,a_args);
+    
+#ifdef G4DEBUG_INTERFACES_COMMON
+    printf("G4Qt::G4Qt alredy inited in external \n");
+#endif
+  } else {
+    
+    if(QtInited==FALSE) {  //Qt should be Inited once !
+      // Then two cases :
+      // - It is the first time we create G4UI  (argc!=0)
+      //   -> Inited and register
+      // - It is the first time we create G4VIS  (argc == 0)
+      //   -> Inited and NOT register
+      
+      if (a_argn != 0) {
+        argn = a_argn;
+        args = a_args;
+
+      } else { //argc = 0
+
+        // FIXME : That's not the good arguments, but I don't know how to get args from other Interactor.
+        // Ex: How to get them from G4Xt ?
+        argn = 1;
+        args = (char **)malloc( 1 * sizeof(char *) );
+        args[0] = (char *)malloc(10 * sizeof(char));
+        strncpy(args[0], "my_app \0", 9);
+      }
+
+      int *p_argn = (int*)malloc(sizeof(int));
+      *p_argn = argn;
+#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) {
+        
+        G4cout        << "G4Qt : Unable to init Qt." << G4endl;
+      } else {
+        QtInited  = TRUE;
+        if (a_argn != 0) {
+#ifdef G4DEBUG_INTERFACES_COMMON
+        printf("G4Qt::G4Qt SetMainInteractor\n");
+#endif
+          SetMainInteractor (qApp);
+        }
+        SetArguments      (a_argn,a_args);
+#ifdef G4DEBUG_INTERFACES_COMMON
+        printf("G4Qt::G4Qt inited Qt END\n");
+#endif
+      }
+    }
+  }
+#ifdef G4DEBUG_INTERFACES_COMMON
+  if (qApp) {
+    printf("G4Qt::qApp already exist\n");
+  }  else {
+    printf("G4Qt::qApp not exist\n");
+  }
+#endif
+  //  AddDispatcher     ((G4DispatchFunction)XtDispatchEvent);
+}
+/***************************************************************************/
+G4Qt::~G4Qt (
+) 
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  if(this==instance) {
+    instance = NULL;
+  }
+}
+/***************************************************************************/
+G4bool G4Qt::Inited (
+)
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  return QtInited;
+}
+/***************************************************************************/
+/**
+  Si j'ai bien compris, cette fonction ne sert à rien
+ */
+void* G4Qt::GetEvent (
+) 
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+//FIXME
+//   G4cout        << "G4Qt : Rien compris a cette fonction G4Qt::GetEvent." << G4endl;
+//  static XEvent  event;
+//  if(appContext==NULL) return NULL;
+//  if(mainApp==NULL) return NULL;
+//  QtAppNextEvent (appContext, &event);
+//  return         &event;
+  printf("*");
+  return 0;
+}
+/***************************************************************************/
+void G4Qt::FlushAndWaitExecution (
+)
+/***************************************************************************/
+/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+{
+  //  printf("G4Qt::FlushAndWaitExecution ::  Flush ....\n");
+  if(!qApp) return;
+  qApp->processEvents();
+}
+
+#endif
+
+
