Ignore:
Timestamp:
Jun 8, 2007, 4:43:30 PM (17 years ago)
Author:
garnier
Message:

r583@mac-90108: laurentgarnier | 2007-06-07 12:23:33 +0200
ca compile avec les moc

File:
1 edited

Legend:

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

    r489 r490  
    6464static G4bool exitPause = true;
    6565static G4bool exitHelp = true;
    66 
    67 
    68 UIQtCentralWidget::UIQtCentralWidget (
    69 ) : QWidget()
    70 /***************************************************************************/
    71 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    72 {
    73   QVBoxLayout* vBox = new QVBoxLayout();
    74   textArea = new QTextEdit();
    75   QLabel *sessionLabel = new QLabel("Session : ");
    76   QPushButton *clearButton = new QPushButton("clear");
    77   connect(clearButton, SIGNAL(clicked()), SLOT(textArea->clear()));
    78 
    79 //  QMenu *menuFile = new QMenu("File");
    80 //  mainWindow->menuBar()->addMenu(menuFile);
    81 
    82   promptArea = new QLineEdit();
    83   textArea->setReadOnly(FALSE);
    84   vBox->addWidget(textArea);
    85   vBox->addWidget(clearButton);
    86   vBox->addWidget(sessionLabel);
    87   vBox->addWidget(promptArea);
    88   setLayout(vBox);
    89 }
    90 
    9166/***************************************************************************/
    9267/**
     
    11994  G4Qt* interactorManager = G4Qt::getInstance (argc,argv,(char*)"Qt");  // TO KEEP ?
    12095
    121   fMainWindow = new QMainWindow();
    122   fMainWindow->setWindowTitle( "G4UI Session" );
    123   fMainWindow->setBaseSize(300,200);
    124   centralWidget = new UIQtCentralWidget();
    125   fMainWindow->setCentralWidget(centralWidget);
     96  mainWindow = new QMainWindow();
     97  mainWindow->setWindowTitle( "G4UI Session" );
     98  mainWindow->setBaseSize(300,200);
     99  QWidget* centralWidget = new QWidget();
     100  QVBoxLayout* vBox = new QVBoxLayout();
     101  textArea = new QTextEdit();
     102  QLabel *sessionLabel = new QLabel("Session : ");
     103  QPushButton *clearButton = new QPushButton("clear");
     104  mainWindow->connect(clearButton, SIGNAL(clicked()), SLOT(textArea->clear()));
     105
     106//  QMenu *menuFile = new QMenu("File");
     107//  mainWindow->menuBar()->addMenu(menuFile);
     108
     109  promptArea = new QLineEdit();
     110  textArea->setReadOnly(FALSE);
     111  vBox->addWidget(textArea);
     112  vBox->addWidget(clearButton);
     113  vBox->addWidget(sessionLabel);
     114  vBox->addWidget(promptArea);
     115  centralWidget->setLayout(vBox);
     116  mainWindow->setCentralWidget(centralWidget);
    126117
    127118//  QMainWindow top = (QMainWindow)interactorManager->GetMainInteractor();
     
    211202
    212203 
    213   if (fMainWindow!=NULL)
    214     delete fMainWindow;
     204  if (mainWindow!=NULL)
     205    delete mainWindow;
    215206}
    216207/***************************************************************************/
     
    224215{
    225216
    226   fMainWindow->show();
     217  mainWindow->show();
    227218  qApp->exec();
    228219
     
    464455//}
    465456
    466 /** Callback activated when user click on the clear button
    467 */
    468457 /***************************************************************************/
    469  void clearButtonCallback (
    470  )
    471 /***************************************************************************/
    472 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    473 {
    474   textArea->clear()
    475 }
     458// void clearButtonCallback (
     459// )
     460/***************************************************************************/
     461/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
     462//{
     463//}
    476464/***************************************************************************/
    477465// TODO !
Note: See TracChangeset for help on using the changeset viewer.