- Timestamp:
- May 26, 2010, 3:47:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r1265 r1266 261 261 // Only at creation. Will be set visible when sessionStart(); 262 262 #if QT_VERSION >= 0x040000 263 #if QT_VERSION >= 0x040200263 #if QT_VERSION >= 0x040200 264 264 fTabWidget->setVisible(false); 265 265 fEmptyViewerTabLabel->setVisible(false); 266 #else266 #else 267 267 fTabWidget->hide(); 268 268 fEmptyViewerTabLabel->hide(); 269 #endif269 #endif 270 270 #else 271 271 fTabWidget->hide(); … … 343 343 // Set visible 344 344 #if QT_VERSION >= 0x040000 345 #if QT_VERSION >= 0x040200345 #if QT_VERSION >= 0x040200 346 346 fMainWindow->setVisible(true); 347 #else347 #else 348 348 fMainWindow->show(); 349 #endif349 #endif 350 350 #else 351 351 fMainWindow->show(); … … 695 695 696 696 #if QT_VERSION >= 0x040000 697 #if QT_VERSION >= 0x040200697 #if QT_VERSION >= 0x040200 698 698 fTabWidget->setVisible(true); 699 #else 699 fEmptyViewerTabLabel->setVisible(true); 700 #else 700 701 fTabWidget->show(); 701 #endif 702 fEmptyViewerTabLabel->show(); 703 #endif 702 704 #else 703 705 fTabWidget->show(); 704 #endif 705 706 fEmptyViewerTabLabel->setVisible(true); 707 708 #if QT_VERSION >= 0x040000 709 #if QT_VERSION >= 0x040200706 fEmptyViewerTabLabel->show(); 707 #endif 708 709 710 #if QT_VERSION >= 0x040000 711 #if QT_VERSION >= 0x040200 710 712 fMainWindow->setVisible(true); 711 #else713 #else 712 714 fMainWindow->show(); 713 #endif715 #endif 714 716 #else 715 717 fMainWindow->show(); … … 842 844 QStringList result = newStr.filter(fCoutFilter->text()); 843 845 #else 844 QStringList result = fCoutFilter->text(); 846 //L. Garnier : in qt3 filter will does nothing 847 QStringList result = ""; 845 848 #endif 846 849 … … 882 885 fG4cout += newStr; 883 886 884 QStringList result = newStr.filter(fCoutFilter->text()); 887 #if QT_VERSION < 0x040000 888 //L. Garnier : in qt3 filter will does nothing 889 QStringList result = ""; 890 #else 891 QStringList result = newStr.filter(fCoutFilter->text()); 892 #endif 885 893 886 894 #if QT_VERSION < 0x040000 … … 997 1005 } 998 1006 1007 #if QT_VERSION < 0x040000 1008 fToolBox->setCurrentItem(fHelpTBWidget); 1009 #else 999 1010 fToolBox->setCurrentWidget(fHelpTBWidget); 1011 #endif 1000 1012 } 1001 1013 … … 1013 1025 if (! fHelpTreeWidget ) { 1014 1026 #if QT_VERSION < 0x040000 1015 fHelpTreeWidget = new QListView( splitter);1027 fHelpTreeWidget = new QListView(fHelpVSplitter); 1016 1028 #else 1017 1029 fHelpTreeWidget = new QTreeWidget(); … … 1213 1225 QString myCommand = aCommand; 1214 1226 1227 #if QT_VERSION < 0x040000 1228 if (myCommand.findRev("/") == (myCommand.length()-1)) { 1229 myCommand = myCommand.left(myCommand.length()-1); 1230 #else 1215 1231 if (myCommand.lastIndexOf("/") == (myCommand.size()-1)) { 1216 1232 myCommand = myCommand.left(myCommand.size()-1); 1233 #endif 1217 1234 } 1218 1235 … … 1596 1613 G4UIcommandTree * treeTop = UI->GetTree(); 1597 1614 1615 #if QT_VERSION < 0x040000 1616 std::string itemText = GetLongCommandPath(item).ascii(); 1617 #else 1598 1618 std::string itemText = GetLongCommandPath(item).toStdString(); 1619 #endif 1599 1620 1600 1621 G4UIcommand* command = treeTop->FindPath(itemText.c_str()); … … 1703 1724 const QString & text) { 1704 1725 1705 #ifdef G4DEBUG_INTERFACES_BASIC 1706 printf("G4UIQt::CoutFilterCallback : %s\n",text.toStdString().c_str()); 1707 #endif 1708 1726 #if QT_VERSION < 0x040000 1727 QStringList result = ""; 1728 #else 1709 1729 QStringList result = fG4cout.filter(text); 1730 #endif 1710 1731 1711 1732 fCoutTBTextArea->setText(result.join("\n")); … … 2102 2123 G4UImanager* UI = G4UImanager::GetUIpointer(); 2103 2124 if(UI != NULL) { 2125 #if QT_VERSION < 0x040000 2126 UI->ApplyCommand(paramSelect.ascii().c_str()); 2127 #else 2104 2128 UI->ApplyCommand(paramSelect.toStdString().c_str()); 2129 #endif 2105 2130 } 2106 2131 } else {
Note: See TracChangeset
for help on using the changeset viewer.