Changeset 1243 for trunk/source


Ignore:
Timestamp:
Apr 21, 2010, 3:51:50 PM (14 years ago)
Author:
garnier
Message:

update

Location:
trunk/source/interfaces
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/include/G4UIExecutive.hh

    r1117 r1243  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UIExecutive.hh,v 1.3 2009/05/28 06:13:03 kmura Exp $
     26// $Id: G4UIExecutive.hh,v 1.4 2009/11/20 22:10:31 kmura Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    6565
    6666public:
    67   G4UIExecutive(G4int argc=1, char** argv=0);
     67  G4UIExecutive(G4int argc, char** argv);
    6868  ~G4UIExecutive();
    6969
  • trunk/source/interfaces/basic/include/G4UIExecutive.icc

    r1210 r1243  
    2525//
    2626//
    27 // $Id: G4UIExecutive.icc,v 1.4 2009/05/28 06:13:03 kmura Exp $
     27// $Id: G4UIExecutive.icc,v 1.6 2009/11/20 22:10:31 kmura Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5555#endif
    5656
     57#define DISCARD_PARAMETER(p) (void)p
     58
    5759/////////////////////////////////////////////////////
    58 #if defined(G4UI_USE_XM) || defined(G4UI_USE_QT)
    5960G4UIExecutive::G4UIExecutive(G4int argc, char** argv)
    60 #else
    61 G4UIExecutive::G4UIExecutive(G4int, char**)
    62 #endif
    6361  : session(0), shell(0),isGUI(false)
    6462/////////////////////////////////////////////////////
    6563{
    6664#if defined(G4UI_USE_TCSH)
     65  DISCARD_PARAMETER(argc);
     66  DISCARD_PARAMETER(argv);
     67
    6768  shell = new G4UItcsh;
    6869  session = new G4UIterminal(shell);
     
    7374
    7475#elif defined(G4UI_USE_WIN32)
     76  DISCARD_PARAMETER(argc);
     77  DISCARD_PARAMETER(argv);
     78
    7579  session = new G4UIWin32();
    7680
    7781#elif defined(G4UI_USE_QT)
    78 //  G4int argc2 = 0;
    79 //  char** argv2 = 0;
    8082  session = new G4UIQt(argc, argv);
    81 //  session = new G4UIQt(argc2, argv2);
    8283  isGUI = true;
    8384   
    8485#else
     86  DISCARD_PARAMETER(argc);
     87  DISCARD_PARAMETER(argv);
     88
    8589  shell = new G4UIcsh;
    8690  session = new G4UIterminal(shell);
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1239 r1243  
    116116,fTabWidget(NULL)
    117117,fCoutText("Output")
    118 
    119118{
    120119
     
    249248  fEmptyViewerTabLabel = new QLabel("         If you want to have a Viewer, please use /vis/open commands. ");
    250249
     250  // Only at creation. Will be set visible when sessionStart();
     251  fTabWidget->setVisible(false);
     252  fEmptyViewerTabLabel->setVisible(false);
     253
    251254  fMyVSplitter->addWidget(fToolBox);
    252255  fMyVSplitter->addWidget(fEmptyViewerTabLabel);
     
    300303  connect(fCommandArea, SIGNAL(returnPressed()), SLOT(CommandEnteredCallback()));
    301304  connect(fTabWidget,   SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int)));
    302   //  connect(fTabWidget,   SIGNAL(currentChanged(int)), this, SLOT(CurrentChangedCallback(int)));
    303305  connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int)));
    304306  if(UI!=NULL) UI->SetCoutDestination(this);  // TO KEEP
     
    517519)
    518520{
    519 
    520521#ifdef G4DEBUG_INTERFACES_BASIC
    521522  printf("G4UIQt::AddTabWidget %d %d\n",sizeX, sizeY);
    522523#endif
    523   if (!aWidget) return false;
    524  
     524  if (!aWidget) {
     525    return false;
     526  }
     527
    525528  // Remove QLabel
    526529  if ( fMyVSplitter->indexOf(fEmptyViewerTabLabel) != -1) {
     
    605608// // #endif
    606609 
     610  fTabWidget->setVisible(true);
     611
    607612  return true;
    608613}
     
    623628
    624629  fTabWidget->setCurrentIndex(tabNumber);
     630
     631  // Send this signal to unblock graphic updates !
     632  fTabWidget->setVisible(true);
     633
     634  // This will send a paintEvent to OGL Viewers
    625635  fTabWidget->setTabSelected();
    626636
     
    657667  exitSession = false;
    658668
     669  fTabWidget->setVisible(true);
     670  fEmptyViewerTabLabel->setVisible(true);
     671
    659672#if QT_VERSION >= 0x040000
    660673#if QT_VERSION >= 0x040200
     
    666679  fMainWindow->show();
    667680#endif
     681
     682  QCoreApplication::sendPostedEvents () ;
    668683
    669684#ifdef G4DEBUG_INTERFACES_BASIC
  • trunk/source/interfaces/common/src/G4Qt.cc

    r1232 r1243  
    131131#else
    132132#ifdef G4DEBUG_INTERFACES_COMMON
    133       printf("G4Qt::G4Qt QAppl \n");
     133    printf("G4Qt::G4Qt QAppl \n");
    134134#endif
    135135      new QApplication (*p_argn, args);
    136 #ifdef G4DEBUG_INTERFACES_COMMON
    137         printf("G4Qt::G4Qt 0\n");
    138 #endif
    139136#endif
    140137      if(!qApp) {
     
    142139        G4cout        << "G4Qt : Unable to init Qt." << G4endl;
    143140      } else {
    144 #ifdef G4DEBUG_INTERFACES_COMMON
    145         printf("G4Qt::G4Qt 1\n");
    146 #endif
    147141        QtInited  = TRUE;
    148142        if (a_argn != 0) {
Note: See TracChangeset for help on using the changeset viewer.