Ignore:
Timestamp:
Nov 15, 2007, 11:55:45 AM (17 years ago)
Author:
garnier
Message:

r643@mac-90108: laurentgarnier | 2007-11-12 19:00:52 +0100
modif pour qt3

File:
1 edited

Legend:

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

    r595 r602  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.3 2007/11/08 17:00:09 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.4 2007/11/09 15:03:21 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5050#include <qlineedit.h>
    5151#include <qwidget.h>
     52#if QT_VERSION >= 0x040000
    5253#include <qmenu.h>
     54#else
     55#include <qpopupmenu.h>
     56#endif
    5357#include <qmenubar.h>
    54 #include <qboxlayout.h>
     58#include <qlayout.h>
    5559#include <qpushbutton.h>
    5660#include <qlabel.h>
     
    717721        }
    718722      } else if (e->key() == (Qt::Key_Tab)) {
     723#if QT_VERSION < 0x040000
     724        G4String ss = Complete(fCommandArea->text().ascii());
     725#else
    719726        G4String ss = Complete(fCommandArea->text().toStdString().c_str());
     727#endif
    720728        fCommandArea->setText((char*)(ss.data()));
    721729
     
    762770)
    763771{
     772#if QT_VERSION < 0x040000
     773  G4String command (fCommandArea->text().ascii());
     774#else
    764775  G4String command (fCommandArea->text().toStdString().c_str());
     776#endif
    765777  if (fCommandArea->text().trimmed() != "") {
    766778    fCommandHistoryArea->addItem(fCommandArea->text());
     
    793805)
    794806{
     807#if QT_VERSION < 0x040000
     808  G4String ss = G4String(aCommand.ascii());
     809#else
    795810  G4String ss = G4String(aCommand.toStdString().c_str());
     811#endif
    796812  ApplyShellCommand(ss,exitSession,exitPause);
    797813  if(exitSession==true)
     
    824840  if(UI==NULL) return;
    825841  G4UIcommandTree * treeTop = UI->GetTree();
     842#if QT_VERSION < 0x040000
     843  G4UIcommand* command = treeTop->FindPath(item->text (1).ascii());
     844#else
    826845  G4UIcommand* command = treeTop->FindPath(item->text (1).toStdString().c_str());
     846#endif
    827847  if (command) {
    828848    fHelpArea->setText(GetCommandList(command));
     
    830850    // this is not a command, this is a sub directory
    831851    // We display the Title
     852#if QT_VERSION < 0x040000
     853    fHelpArea->setText(item->text (1).ascii());
     854#else
    832855    fHelpArea->setText(item->text (1).toStdString().c_str());
     856#endif
    833857  }
    834858}
Note: See TracChangeset for help on using the changeset viewer.