Ignore:
Timestamp:
Nov 26, 2007, 6:10:35 PM (17 years ago)
Author:
garnier
Message:

r670@mac-90108: laurentgarnier | 2007-11-26 18:13:28 +0100
mise a jour pour Qt3 linux

File:
1 edited

Legend:

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

    r615 r617  
    109109  printf("G4UIQt::Initialise %d %s\n",argc,argv[0]);
    110110#endif
    111   printf("G4UIQt::Initialise ******\n");
    112111  G4Qt* interactorManager = G4Qt::getInstance (argc,argv,(char*)"Qt");
    113112  G4UImanager* UI = G4UImanager::GetUIpointer();
     
    129128#endif
    130129
    131   QSplitter *splitter = new QSplitter(Qt::Vertical);
     130  QSplitter *splitter = new QSplitter(Qt::Vertical,fMainWindow);
    132131
    133132  // Set layouts
     
    488487)
    489488{
     489#ifdef GEANT4_QT_DEBUG
     490  printf("G4UIQt::AddMenu 1\n");
     491#endif
    490492  if (aName == NULL) return;
    491493  if (aLabel == NULL) return;
    492494
     495#ifdef GEANT4_QT_DEBUG
     496  printf("G4UIQt::AddMenu 2 %s %s\n",aName,aLabel);
     497#endif
    493498#if QT_VERSION < 0x040000
    494499  QPopupMenu *fileMenu = new QPopupMenu( fMainWindow);
     
    529534  QSignalMapper *signalMapper = new QSignalMapper(this);
    530535#if QT_VERSION < 0x040000
     536#if QT_VERSION < 0x030200
     537  QAction *action = new QAction(QString(aLabel),QString(aLabel),QKeySequence::QKeySequence (),signalMapper, SLOT(map()));
     538#else
    531539  QAction *action = new QAction(QString(aLabel),QKeySequence::QKeySequence (),signalMapper, SLOT(map()));
     540#endif
    532541  action->addTo(parent);
    533542#else
     
    556565#if QT_VERSION < 0x040000
    557566    fHelpDialog = new QDialog(fMainWindow,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax );
    558 #else
     567    QVBoxLayout *vLayout = new QVBoxLayout(fHelpDialog);
     568    QWidget* global = new QWidget(fHelpDialog);
     569#else
     570    QVBoxLayout *vLayout = new QVBoxLayout();
    559571    fHelpDialog = new QDialog(fMainWindow,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);
    560572#endif
    561     QSplitter *splitter = new QSplitter(Qt::Horizontal);
     573    QSplitter *splitter = new QSplitter(Qt::Horizontal,fHelpDialog);
     574
    562575    QPushButton *exitButton = new QPushButton("Exit",fMainWindow);
    563576    connect(exitButton, SIGNAL(clicked()), fHelpDialog,SLOT(close()));
     
    574587    fHelpTreeWidget->addColumn("Command");
    575588    fHelpTreeWidget->addColumn("Description");
    576     fHelpTreeWidget->hideColumn(1);
     589    fHelpTreeWidget->setColumnWidth (1,0);
    577590    fHelpTreeWidget->header()->setResizeEnabled(FALSE,1);
    578591    //    QList<QListViewItem *> items;
     
    643656    // Set layouts
    644657
    645 #if QT_VERSION < 0x040000
    646     QVBoxLayout *vLayout = new QVBoxLayout(fHelpDialog);
    647 #else
    648     QVBoxLayout *vLayout = new QVBoxLayout;
     658#if QT_VERSION >= 0x040000
    649659    splitter->addWidget(fHelpTreeWidget);
    650660    splitter->addWidget(fHelpArea);
     
    652662
    653663
     664#if QT_VERSION < 0x040000
     665    vLayout->addWidget(global);
     666#else
    654667    vLayout->addWidget(splitter);
     668#endif
    655669    vLayout->addWidget(exitButton);
    656670#if QT_VERSION >= 0x040000
     
    11861200)
    11871201{
    1188 #ifdef GEANT4_QT_DEBUG
    1189     printf("G4UIQt::HelpTreeClicCallback");
    1190 #endif
     1202  //  printf("G4UIQt::HelpTreeClicCallback");
    11911203#if QT_VERSION < 0x040000
    11921204  QListViewItem* item =  NULL;
     
    12541266QTreeWidgetItem* item
    12551267#endif
    1256  ,int nb
     1268 ,int
    12571269)
    12581270{
Note: See TracChangeset for help on using the changeset viewer.