Changeset 836


Ignore:
Timestamp:
Jun 11, 2008, 2:29:46 PM (16 years ago)
Author:
garnier
Message:

import all except CVS

Location:
trunk/source/interfaces
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r793 r836  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.16 2008/03/10 17:03:16 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.17 2008/05/05 13:24:00 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
    3030// L. Garnier
    3131
    32 //define GEANT4_QT_DEBUG
     32#define GEANT4_QT_DEBUG
    3333
    3434#ifdef G4UI_BUILD_QT_SESSION
     
    285285#endif
    286286  interactorManager->DisableSecondaryLoop (); // TO KEEP
     287
     288  // launch app
    287289  if ((QApplication*)interactorManager->GetMainInteractor())
    288290    ((QApplication*)interactorManager->GetMainInteractor())->exec();
    289 
    290   // on ne passe pas le dessous ? FIXME ????
    291   // je ne pense pas 13/06
    292 
    293   //   void* event; // TO KEEP
    294   //   while((event = interactorManager->GetEvent())!=NULL) {  // TO KEEP
    295   //     interactorManager->DispatchEvent(event); // TO KEEP
    296   //     if(exitSession==true) break; // TO KEEP
    297   //   } // TO KEEP
    298 
     291 
     292 
     293  void* event;
     294  while((event = interactorManager->GetEvent())!=NULL) {
     295    interactorManager->DispatchEvent(event);
     296    if(exitSession==true) break;
     297  }
     298 
    299299  interactorManager->EnableSecondaryLoop ();
    300300#ifdef GEANT4_QT_DEBUG
     
    307307/**   Display the prompt in the prompt area
    308308   @param aPrompt : string to display as the promt label
    309    //FIXME : probablement inutile puisque le seul a afficher qq chose d'autre
    310    que "session" est SecondaryLoop()
    311309*/
    312310void G4UIQt::Prompt (
  • trunk/source/interfaces/common/src/G4Qt.cc

    r632 r836  
    2929//
    3030// L. Garnier
     31
     32#define GEANT4_QT_DEBUG
    3133
    3234#if defined(G4INTY_BUILD_QT) || defined(G4INTY_USE_QT)
     
    9395  if(QtInited==FALSE) {  //Qt should be Inited once !
    9496#ifdef GEANT4_QT_DEBUG
    95     printf("G4Qt::G4Qt inited Qt\n");
    96 #endif
    97 #if QT_VERSION < 0x040000
    98     qApp = new QApplication (a_argn, a_args);
    99     //    QApplication qApp(a_argn, a_args);
    100     //    if(&qApp == NULL) {
    101 #else
    102     new QApplication (a_argn, a_args);
    10397#endif
    10498    if(!qApp) {
    105 
     99#if QT_VERSION < 0x040000
     100      qApp = new QApplication (a_argn, a_args);
     101      //    QApplication qApp(a_argn, a_args);
     102      //    if(&qApp == NULL) {
     103#else
     104      new QApplication (a_argn, a_args);
     105#endif
     106    }
     107    if(!qApp) {
    106108      G4cout        << "G4Qt : Unable to init Qt." << G4endl;
    107109    } else {
    108110      QtInited  = TRUE;
    109       //#if QT_VERSION < 0x040000
    110       //      SetMainInteractor (&qApp);
    111       //#else
    112111      SetMainInteractor (qApp);
    113       //#endif
    114112      SetArguments      (a_argn,a_args);
    115113#ifdef GEANT4_QT_DEBUG
     
    146144}
    147145/***************************************************************************/
    148 /**
    149   Si j'ai bien compris, cette fonction ne sert à rien
    150  */
     146// Should do nothing in Qt
    151147void* G4Qt::GetEvent (
    152148)
     
    154150/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    155151{
    156 //FIXME
    157 //   G4cout        << "G4Qt : Rien compris a cette fonction G4Qt::GetEvent." << G4endl;
    158 //  static XEvent  event;
    159 //  if(appContext==NULL) return NULL;
    160 //  if(mainApp==NULL) return NULL;
    161 //  QtAppNextEvent (appContext, &event);
    162 //  return         &event;
    163   printf("*");
    164152  return 0;
    165153}
     
    170158/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    171159{
    172   //  printf("G4Qt::FlushAndWaitExecution ::  Flush ....\n");
    173160  if(!qApp) return;
    174161  qApp->processEvents();
Note: See TracChangeset for help on using the changeset viewer.