Changeset 1266


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

test qt3

File:
1 edited

Legend:

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

    r1265 r1266  
    261261  // Only at creation. Will be set visible when sessionStart();
    262262#if QT_VERSION >= 0x040000
    263 #if QT_VERSION >= 0x040200
     263 #if QT_VERSION >= 0x040200
    264264  fTabWidget->setVisible(false);
    265265  fEmptyViewerTabLabel->setVisible(false);
    266 #else
     266 #else
    267267  fTabWidget->hide();
    268268  fEmptyViewerTabLabel->hide();
    269 #endif
     269 #endif
    270270#else
    271271  fTabWidget->hide();
     
    343343  // Set visible
    344344#if QT_VERSION >= 0x040000
    345 #if QT_VERSION >= 0x040200
     345 #if QT_VERSION >= 0x040200
    346346  fMainWindow->setVisible(true);
    347 #else
     347 #else
    348348  fMainWindow->show();
    349 #endif
     349 #endif
    350350#else
    351351  fMainWindow->show();
     
    695695
    696696#if QT_VERSION >= 0x040000
    697 #if QT_VERSION >= 0x040200
     697 #if QT_VERSION >= 0x040200
    698698  fTabWidget->setVisible(true);
    699 #else
     699  fEmptyViewerTabLabel->setVisible(true);
     700 #else
    700701  fTabWidget->show();
    701 #endif
     702  fEmptyViewerTabLabel->show();
     703 #endif
    702704#else
    703705  fTabWidget->show();
    704 #endif
    705 
    706   fEmptyViewerTabLabel->setVisible(true);
    707 
    708 #if QT_VERSION >= 0x040000
    709 #if QT_VERSION >= 0x040200
     706  fEmptyViewerTabLabel->show();
     707#endif
     708
     709
     710#if QT_VERSION >= 0x040000
     711 #if QT_VERSION >= 0x040200
    710712  fMainWindow->setVisible(true);
    711 #else
     713 #else
    712714  fMainWindow->show();
    713 #endif
     715 #endif
    714716#else
    715717  fMainWindow->show();
     
    842844  QStringList result = newStr.filter(fCoutFilter->text());
    843845#else
    844   QStringList result = fCoutFilter->text();
     846  //L. Garnier : in qt3 filter will does nothing
     847  QStringList result = "";
    845848#endif
    846849
     
    882885  fG4cout += newStr;
    883886 
    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
    885893
    886894#if QT_VERSION < 0x040000
     
    9971005  }
    9981006
     1007#if QT_VERSION < 0x040000
     1008  fToolBox->setCurrentItem(fHelpTBWidget);
     1009#else
    9991010  fToolBox->setCurrentWidget(fHelpTBWidget);
     1011#endif
    10001012}
    10011013
     
    10131025  if (! fHelpTreeWidget ) {
    10141026#if QT_VERSION < 0x040000
    1015     fHelpTreeWidget = new QListView(splitter);
     1027    fHelpTreeWidget = new QListView(fHelpVSplitter);
    10161028#else
    10171029    fHelpTreeWidget = new QTreeWidget();
     
    12131225  QString myCommand = aCommand;
    12141226 
     1227#if QT_VERSION < 0x040000
     1228  if (myCommand.findRev("/") == (myCommand.length()-1)) {
     1229    myCommand = myCommand.left(myCommand.length()-1);
     1230#else
    12151231  if (myCommand.lastIndexOf("/") == (myCommand.size()-1)) {
    12161232    myCommand = myCommand.left(myCommand.size()-1);
     1233#endif
    12171234  }
    12181235
     
    15961613  G4UIcommandTree * treeTop = UI->GetTree();
    15971614
     1615#if QT_VERSION < 0x040000
     1616  std::string itemText = GetLongCommandPath(item).ascii();
     1617#else
    15981618  std::string itemText = GetLongCommandPath(item).toStdString();
     1619#endif
    15991620 
    16001621  G4UIcommand* command = treeTop->FindPath(itemText.c_str());
     
    17031724const QString & text) {
    17041725
    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
    17091729  QStringList result = fG4cout.filter(text);
     1730#endif
    17101731
    17111732  fCoutTBTextArea->setText(result.join("\n"));
     
    21022123        G4UImanager* UI = G4UImanager::GetUIpointer();
    21032124        if(UI != NULL)  {
     2125#if QT_VERSION < 0x040000
     2126          UI->ApplyCommand(paramSelect.ascii().c_str());
     2127#else
    21042128          UI->ApplyCommand(paramSelect.toStdString().c_str());
     2129#endif
    21052130        }
    21062131      } else {
Note: See TracChangeset for help on using the changeset viewer.