Changeset 1237 for trunk/source/interfaces/basic/src
- Timestamp:
- Feb 8, 2010, 5:35:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r1236 r1237 287 287 288 288 connect(fCommandArea, SIGNAL(returnPressed()), SLOT(CommandEnteredCallback())); 289 connect(this, SIGNAL(refreshTab(const QString &)), SLOT(RefreshTabCallback(const QString&))); 289 290 290 if(UI!=NULL) UI->SetCoutDestination(this); // TO KEEP 291 291 … … 588 588 } 589 589 590 591 //Must be BEFORE repaint of OGL592 590 #ifdef G4DEBUG_INTERFACES_BASIC 593 591 printf("G4UIQt::UpdateTabWidget CALL REPAINT tabGL\n"); 594 592 #endif 595 // QPaintEvent e(fTabWidget->currentWidget()->rect());596 // QApplication::sendEvent(fTabWidget->currentWidget(), &e);597 598 #ifdef G4DEBUG_INTERFACES_BASIC599 printf("G4UIQt::UpdateTabWidget CALL REPAINT tabWidget\n");600 #endif601 // QPaintEvent e2(fTabWidget->rect());602 // QApplication::postEvent(fTabWidget, &e2);603 604 // Emit signal in order to refresh glView after all paint tab605 // signals have been send606 // emit(refreshTab(fTabWidget->tabText (fTabWidget->currentIndex())));607 // fTabWidget->repaint();608 #ifdef G4DEBUG_INTERFACES_BASIC609 printf("G4UIQt::UpdateTabWidget CALL REPAINT END\n");610 #endif611 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 622 593 623 594 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 634 596 #ifdef G4DEBUG_INTERFACES_BASIC 635 597 printf("G4UIQt::UpdateTabWidget END\n"); … … 1873 1835 1874 1836 1875 void G4UIQt::RefreshTabCallback (1876 const QString &text1877 )1878 {1879 #ifdef G4DEBUG_INTERFACES_BASIC1880 printf("G4UIQt::RefreshTabCallback BEGIN +++++++++++++++++++++\n");1881 #endif1882 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_BASIC1890 printf("G4UIQt::RefreshTabCallback BEGIN -+-+-+-+-+-+-+-+-+-+-+\n");1891 #endif1892 }1893 1894 1837 G4QTabWidget::G4QTabWidget( 1895 1838 QSplitter*& split … … 1916 1859 #endif 1917 1860 1918 // QTabWidget::paintEvent(event);1919 1920 1861 if ( isTabSelected()) { 1921 1862 #ifdef G4DEBUG_INTERFACES_BASIC … … 1931 1872 } 1932 1873 1874 unselectTab(); 1933 1875 repaint(); 1934 unselectTab();1935 1876 } 1936 1877 }
Note: See TracChangeset
for help on using the changeset viewer.