Changeset 1267 for trunk/source/interfaces/basic/src
- Timestamp:
- May 26, 2010, 3:54:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r1266 r1267 1226 1226 1227 1227 #if QT_VERSION < 0x040000 1228 if (myCommand.findRev("/") == ( myCommand.length()-1)) {1228 if (myCommand.findRev("/") == ((int)myCommand.length()-1)) { 1229 1229 myCommand = myCommand.left(myCommand.length()-1); 1230 1230 #else … … 1737 1737 fCoutTBTextArea->verticalScrollBar()->setSliderPosition(fCoutTBTextArea->verticalScrollBar()->maximum()); 1738 1738 #endif 1739 #ifdef G4DEBUG_INTERFACES_BASIC1740 printf("G4UIQt::CoutFilterCallback textSize:%d resSize:%d \n",fG4cout.join("").size(),result.join("").size());1741 #endif1742 1739 1743 1740 } … … 2016 2013 { 2017 2014 if (commandPath.indexOf("/") == 0) { 2015 #if QT_VERSION < 0x040000 2016 commandPath = commandPath.right(commandPath.length()-1); 2017 #else 2018 2018 commandPath = commandPath.right(commandPath.size()-1); 2019 } 2020 2019 #endif 2020 } 2021 2022 #if QT_VERSION < 0x040000 2023 commandPath = commandPath.right(commandPath.length()-commandPath.findRev("/",-2)-1); 2024 #else 2021 2025 commandPath = commandPath.right(commandPath.size()-commandPath.lastIndexOf("/",-2)-1); 2026 #endif 2022 2027 2028 #if QT_VERSION < 0x040000 2029 if (commandPath.findRev("/") == ((int)commandPath.length()-1)) { 2030 commandPath = commandPath.left(commandPath.length()-1); 2031 } 2032 #else 2023 2033 if (commandPath.lastIndexOf("/") == (commandPath.size()-1)) { 2024 2034 commandPath = commandPath.left(commandPath.size()-1); 2025 } 2035 } 2036 #endif 2026 2037 2027 2038 return commandPath; … … 2070 2081 2071 2082 void G4UIQt::TabCloseCallback(int a){ 2083 #if QT_VERSION < 0x040000 2084 QWidget* temp = fTabWidget->item(a); 2085 fTabWidget->removeItem (a); 2086 #else 2072 2087 QWidget* temp = fTabWidget->widget(a); 2073 2088 fTabWidget->removeTab (a); 2089 #endif 2090 2074 2091 delete temp; 2075 2092 2076 2093 if (fTabWidget->count() == 0) { 2094 #if QT_VERSION < 0x040000 2095 fEmptyViewerTabLabel->setParent(fMyVSplitter); 2096 fTabWidget->reparent(0,0,QPoint(0,0)); 2097 #else 2077 2098 fMyVSplitter->addWidget(fEmptyViewerTabLabel); 2078 #if QT_VERSION < 0x0400002079 fTabWidget->reparent(0,0,QPoint(0,0));2080 #else2081 2099 fTabWidget->setParent(0); 2082 2100 #endif … … 2087 2105 void G4UIQt::ToolBoxActivated(int a){ 2088 2106 2107 #if QT_VERSION < 0x040000 2108 if (fToolBox->item(a) == fHelpTBWidget) { 2109 #else 2089 2110 if (fToolBox->widget(a) == fHelpTBWidget) { 2111 #endif 2090 2112 // Rebuild the help tree 2091 2113 FillHelpTree(); … … 2098 2120 { 2099 2121 2122 #if QT_VERSION < 0x040000 2123 if (currentItem()) { 2124 #else 2100 2125 if (currentWidget()) { 2126 #endif 2127 2101 2128 #ifdef G4DEBUG_INTERFACES_BASIC 2102 2129 printf("G4QTabWidget::paintEvent repaint type : %d -- rect %d %d region:%d %d page : %d %d ________________________ i= %d\n", event->type(),event->rect().height(),event->rect().width(),event->region().boundingRect().width(),event->region().boundingRect().height(),currentWidget()->width(),currentWidget()->height(),currentIndex()); … … 2124 2151 if(UI != NULL) { 2125 2152 #if QT_VERSION < 0x040000 2126 UI->ApplyCommand(paramSelect.ascii() .c_str());2153 UI->ApplyCommand(paramSelect.ascii()); 2127 2154 #else 2128 2155 UI->ApplyCommand(paramSelect.toStdString().c_str());
Note: See TracChangeset
for help on using the changeset viewer.