Changeset 1321 for trunk/source/interfaces/basic
- Timestamp:
- Jun 23, 2010, 2:56:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r1318 r1321 25 25 // 26 26 // 27 // $Id: G4UIQt.cc,v 1.4 5 2010/06/10 16:01:38 lgarnier Exp $27 // $Id: G4UIQt.cc,v 1.48 2010/06/22 18:24:18 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 711 711 712 712 if (fEmptyViewerTabLabel != NULL) { 713 if (fTabWidget->isVisible()) { 713 bool visible = false; 714 if (fTabWidget != NULL) { 715 if (fTabWidget->isVisible()) { 716 visible = true; 717 } 718 } 719 if (visible) { 714 720 #if QT_VERSION >= 0x040000 715 721 #if QT_VERSION >= 0x040200 … … 744 750 #endif 745 751 // get the size of the tabbar 746 int tabBarX; 747 int tabBarY; 748 #if QT_VERSION < 0x040000 749 tabBarX = fTabWidget->width()-fTabWidget->page(0)->width(); 750 tabBarY = fTabWidget->height()-fTabWidget->page(0)->height(); 751 #else 752 tabBarX = fTabWidget->width()-fTabWidget->widget(0)->width(); 753 tabBarY = fTabWidget->height()-fTabWidget->widget(0)->height(); 754 #endif 755 756 fMainWindow->resize(tabBarX+fMainWindow->width()+fLastQTabSizeX-fTabWidget->width(),tabBarY+fMainWindow->height()+fLastQTabSizeY-fTabWidget->height()); 752 int tabBarX = 0; 753 int tabBarY = 0; 754 755 if (fTabWidget != NULL) { 756 #if QT_VERSION < 0x040000 757 tabBarX = -fTabWidget->page(0)->width(); 758 tabBarY = -fTabWidget->page(0)->height(); 759 #else 760 tabBarX = -fTabWidget->widget(0)->width(); 761 tabBarY = -fTabWidget->widget(0)->height(); 762 #endif 763 } 764 fMainWindow->resize(tabBarX+fMainWindow->width()+fLastQTabSizeX,tabBarY+fMainWindow->height()+fLastQTabSizeY); 757 765 758 766 #if QT_VERSION < 0x040000 … … 1760 1768 1761 1769 void G4UIQt::CoutFilterCallback( 1770 #if QT_VERSION < 0x040000 1771 const QString &) { 1772 #else 1762 1773 const QString & text) { 1774 #endif 1763 1775 1764 1776 #if QT_VERSION < 0x040000 … … 2119 2131 2120 2132 2133 #if QT_VERSION >= 0x040500 2121 2134 void G4UIQt::TabCloseCallback(int a){ 2135 #else 2136 void G4UIQt::TabCloseCallback(int){ 2137 #endif 2122 2138 #if QT_VERSION >= 0x040500 2123 2139 QWidget* temp = fTabWidget->widget(a); … … 2168 2184 2169 2185 void G4QTabWidget::paintEvent( 2170 QPaintEvent * event2186 QPaintEvent * 2171 2187 ) 2172 2188 {
Note: See TracChangeset
for help on using the changeset viewer.