Changeset 1237


Ignore:
Timestamp:
Feb 8, 2010, 5:35:08 PM (14 years ago)
Author:
garnier
Message:

debug mode

Location:
trunk/source/interfaces/basic
Files:
2 edited

Legend:

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

    r1236 r1237  
    189189  QString fCoutText;
    190190
    191 signals :
    192   void refreshTab(const QString &text);
    193 
    194191private slots :
    195192  void ExitSession();
     
    205202  void ResizeTabWidget( QResizeEvent* );
    206203  void CoutFilterCallback(const QString&);
    207   void RefreshTabCallback (const QString&);
    208 
    209204};
    210205
    211 
    212 #endif
    213 
    214 #endif
    215 
     206#endif
     207
     208#endif
     209
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1236 r1237  
    287287
    288288  connect(fCommandArea, SIGNAL(returnPressed()), SLOT(CommandEnteredCallback()));
    289   connect(this, SIGNAL(refreshTab(const QString &)), SLOT(RefreshTabCallback(const QString&)));
     289
    290290  if(UI!=NULL) UI->SetCoutDestination(this);  // TO KEEP
    291291
     
    588588  }
    589589 
    590  
    591   //Must be BEFORE repaint of OGL
    592590#ifdef G4DEBUG_INTERFACES_BASIC
    593591  printf("G4UIQt::UpdateTabWidget CALL REPAINT tabGL\n");
    594592#endif
    595 //   QPaintEvent e(fTabWidget->currentWidget()->rect());
    596 //   QApplication::sendEvent(fTabWidget->currentWidget(), &e);
    597 
    598 #ifdef G4DEBUG_INTERFACES_BASIC
    599   printf("G4UIQt::UpdateTabWidget CALL REPAINT tabWidget\n");
    600 #endif
    601 //   QPaintEvent e2(fTabWidget->rect());
    602 //   QApplication::postEvent(fTabWidget, &e2);
    603 
    604   // Emit signal in order to refresh glView after all paint tab
    605   // signals have been send
    606 //  emit(refreshTab(fTabWidget->tabText (fTabWidget->currentIndex())));
    607   //  fTabWidget->repaint();
    608 #ifdef G4DEBUG_INTERFACES_BASIC
    609   printf("G4UIQt::UpdateTabWidget CALL REPAINT END\n");
    610 #endif
    611 
    612 //   QString text = fTabWidget->tabText (fTabWidget->currentIndex());
    613 //   QString paramSelect = QString("/vis/viewer/select ")+text;
    614 //   //  QString paramFlush = QString("/vis/viewer/flush ")+text;
    615 //   G4UImanager* UI = G4UImanager::GetUIpointer();
    616 //   if(UI!=NULL)  {
    617 //     UI->ApplyCommand(paramSelect.toStdString().c_str());
    618 //     //    UI->ApplyCommand(paramFlush.toStdString().c_str());
    619 //   }
    620  
    621 
    622593
    623594  fTabWidget->setTabSelected();
    624   // Then we have to do /vis/viewer/select on the selelected tab
    625   // And resize selected tab
    626   //  fTabWidget->currentWidget()->resize(fTabWidget->currentWidget()->width(),fTabWidget->currentWidget()->height());
    627 
    628   //  ((QGLWIdget*)fTabWidget->currentWidget())->makeCurrent();
    629  
    630 // #ifdef G4DEBUG_INTERFACES_BASIC
    631 //   printf("G4UIQt::UpdateTabWidget REPAINT END\n");
    632 // #endif
    633   //  QCoreApplication::flush ();
     595
    634596#ifdef G4DEBUG_INTERFACES_BASIC
    635597  printf("G4UIQt::UpdateTabWidget END\n");
     
    18731835 
    18741836
    1875 void G4UIQt::RefreshTabCallback (
    1876  const QString &text
    1877 )
    1878 {
    1879 #ifdef G4DEBUG_INTERFACES_BASIC
    1880       printf("G4UIQt::RefreshTabCallback   BEGIN +++++++++++++++++++++\n");
    1881 #endif
    1882   QString paramSelect = QString("/vis/viewer/select ")+text;
    1883   //  QString paramFlush = QString("/vis/viewer/flush ")+text;
    1884   G4UImanager* UI = G4UImanager::GetUIpointer();
    1885   if(UI!=NULL)  {
    1886     UI->ApplyCommand(paramSelect.toStdString().c_str());
    1887     //    UI->ApplyCommand(paramFlush.toStdString().c_str());
    1888   }
    1889 #ifdef G4DEBUG_INTERFACES_BASIC
    1890       printf("G4UIQt::RefreshTabCallback   BEGIN -+-+-+-+-+-+-+-+-+-+-+\n");
    1891 #endif
    1892 }
    1893 
    18941837G4QTabWidget::G4QTabWidget(
    18951838QSplitter*& split
     
    19161859#endif
    19171860   
    1918     //    QTabWidget::paintEvent(event);
    1919 
    19201861    if ( isTabSelected()) {
    19211862#ifdef G4DEBUG_INTERFACES_BASIC
     
    19311872      }
    19321873
     1874      unselectTab();
    19331875      repaint();
    1934       unselectTab();
    19351876    }
    19361877  }
Note: See TracChangeset for help on using the changeset viewer.