Changeset 1267 for trunk


Ignore:
Timestamp:
May 26, 2010, 3:54:16 PM (14 years ago)
Author:
garnier
Message:

test qt3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1266 r1267  
    12261226 
    12271227#if QT_VERSION < 0x040000
    1228   if (myCommand.findRev("/") == (myCommand.length()-1)) {
     1228  if (myCommand.findRev("/") == ((int)myCommand.length()-1)) {
    12291229    myCommand = myCommand.left(myCommand.length()-1);
    12301230#else
     
    17371737  fCoutTBTextArea->verticalScrollBar()->setSliderPosition(fCoutTBTextArea->verticalScrollBar()->maximum());
    17381738#endif
    1739 #ifdef G4DEBUG_INTERFACES_BASIC
    1740   printf("G4UIQt::CoutFilterCallback textSize:%d resSize:%d \n",fG4cout.join("").size(),result.join("").size());
    1741 #endif
    17421739
    17431740 }
     
    20162013{
    20172014  if (commandPath.indexOf("/") == 0) {
     2015#if QT_VERSION < 0x040000
     2016    commandPath = commandPath.right(commandPath.length()-1);
     2017#else
    20182018    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
    20212025  commandPath = commandPath.right(commandPath.size()-commandPath.lastIndexOf("/",-2)-1);
     2026#endif
    20222027 
     2028#if QT_VERSION < 0x040000
     2029  if (commandPath.findRev("/") == ((int)commandPath.length()-1)) {
     2030    commandPath = commandPath.left(commandPath.length()-1);
     2031 }
     2032#else
    20232033 if (commandPath.lastIndexOf("/") == (commandPath.size()-1)) {
    20242034    commandPath = commandPath.left(commandPath.size()-1);
    2025   }
     2035 }
     2036#endif
    20262037
    20272038 return commandPath;
     
    20702081 
    20712082void G4UIQt::TabCloseCallback(int a){
     2083#if QT_VERSION < 0x040000
     2084  QWidget* temp = fTabWidget->item(a);
     2085  fTabWidget->removeItem (a);
     2086#else
    20722087  QWidget* temp = fTabWidget->widget(a);
    20732088  fTabWidget->removeTab (a);
     2089#endif
     2090
    20742091  delete temp;
    20752092
    20762093  if (fTabWidget->count() == 0) {
     2094#if QT_VERSION < 0x040000
     2095    fEmptyViewerTabLabel->setParent(fMyVSplitter);
     2096    fTabWidget->reparent(0,0,QPoint(0,0)); 
     2097#else
    20772098    fMyVSplitter->addWidget(fEmptyViewerTabLabel);
    2078 #if QT_VERSION < 0x040000
    2079     fTabWidget->reparent(0,0,QPoint(0,0)); 
    2080 #else
    20812099    fTabWidget->setParent(0);
    20822100#endif
     
    20872105void G4UIQt::ToolBoxActivated(int a){
    20882106
     2107#if QT_VERSION < 0x040000
     2108  if (fToolBox->item(a) == fHelpTBWidget) {
     2109#else
    20892110  if (fToolBox->widget(a) == fHelpTBWidget) {
     2111#endif
    20902112    // Rebuild the help tree
    20912113    FillHelpTree();
     
    20982120{
    20992121
     2122#if QT_VERSION < 0x040000
     2123  if (currentItem()) {
     2124#else
    21002125  if (currentWidget()) {
     2126#endif
     2127
    21012128#ifdef G4DEBUG_INTERFACES_BASIC
    21022129    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());
     
    21242151        if(UI != NULL)  {
    21252152#if QT_VERSION < 0x040000
    2126           UI->ApplyCommand(paramSelect.ascii().c_str());
     2153          UI->ApplyCommand(paramSelect.ascii());
    21272154#else
    21282155          UI->ApplyCommand(paramSelect.toStdString().c_str());
Note: See TracChangeset for help on using the changeset viewer.