Ignore:
Timestamp:
Mar 11, 2008, 5:35:07 PM (17 years ago)
Author:
garnier
Message:

corrections pour Qt3 mises sous cvs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc

    r752 r754  
    2525//
    2626//
    27 // $Id: G4OpenGLQtMovieDialog.cc,v 1.6 2008/02/15 10:54:13 lgarnier Exp $
     27// $Id: G4OpenGLQtMovieDialog.cc,v 1.3 2008/03/11 16:05:56 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
    3030//
    3131
    32 #define GEANT4_QT_DEBUG
     32//#define GEANT4_QT_DEBUG
    3333#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3434
     
    7070    fParentViewer(parentViewer)
    7171{
     72#if QT_VERSION > 0x030200
    7273  setModal(false);
     74#endif
    7375#if QT_VERSION < 0x040000
    7476  setCaption( tr( " Movie parameters" ));
     
    9698
    9799  fEncoderStatus = new QLabel(encoderGroupBox);
     100
     101#if QT_VERSION > 0x040000
    98102  fEncoderStatus->setWordWrap(true);
     103#else
     104  fEncoderStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak );
     105#endif
     106
    99107  fEncoderStatus->setText("");
    100108
     
    133141
    134142  fTempFolderStatus = new QLabel(tempFolderGroupBox);
     143#if QT_VERSION > 0x040000
    135144  fTempFolderStatus->setWordWrap(true);
     145#else
     146  fTempFolderStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak );
     147#endif
    136148  fTempFolderStatus->setText("");
    137149
     
    172184
    173185  fSaveFileStatus = new QLabel(saveFileGroupBox);
     186#if QT_VERSION > 0x040000
    174187  fSaveFileStatus->setWordWrap(true);
     188#else
     189  fSaveFileStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak );
     190#endif
    175191  fSaveFileStatus->setText("");
    176192
     
    198214  // label
    199215
    200   QLabel *infoLabel = new QLabel("  Press SPACE to Start/Pause video recording \n  Press RETURN to Stop video recording");
     216  QLabel *infoLabel = new QLabel("  Press SPACE to Start/Pause video recording \n  Press RETURN to Stop video recording",this);
    201217
    202218  // global status
     
    205221
    206222  fRecordingStatus = new QLabel(statusGroupBox);
     223#if QT_VERSION > 0x040000
    207224  fRecordingStatus->setWordWrap(true);
     225#else
     226  fRecordingStatus->setAlignment ( Qt::AlignAuto |Qt::WordBreak );
     227#endif
    208228  QPalette palette( fRecordingStatus->palette() );
     229#if QT_VERSION > 0x040000
    209230  palette.setColor( QPalette::Text, Qt::green);
     231#else
     232  palette.setColor( QColorGroup::Text, Qt::green);
     233#endif
    210234  fRecordingStatus->setPalette(palette);
    211235
    212236  fRecordingInfos = new QLabel(statusGroupBox);
     237#if QT_VERSION > 0x040000
    213238  fRecordingInfos->setWordWrap(true);
     239#else
     240  fRecordingInfos->setAlignment ( Qt::AlignAuto |Qt::WordBreak );
     241#endif
    214242  setRecordingInfos("");
    215243
     
    298326void G4OpenGLQtMovieDialog::selectEncoderPathAction()
    299327{
     328#if QT_VERSION < 0x040000
     329  QString nomFich =  QFileDialog::getOpenFileName ( ".",
     330                                                    NULL,
     331                                                    this,
     332                                                    "Select your encoder",
     333                                                    tr("Select your encoder ..."));
     334#else
    300335  QString nomFich =  QFileDialog::getOpenFileName ( this,
    301336                                                    "Select your encoder",
    302337                                                    tr("Select your encoder ..."));
     338
     339#endif
     340
    303341  if (nomFich == "") {
    304342    return;
     
    311349void G4OpenGLQtMovieDialog::selectTempPathAction()
    312350{
     351#if QT_VERSION < 0x040000
     352  QString nomFich =  QFileDialog::getOpenFileName ( ".",
     353                                                    NULL,
     354                                                    this,
     355                                                    "Select temporary folder",
     356                                                    tr("Select temporary folder ..."));
     357#else
    313358  QString nomFich =  QFileDialog::getOpenFileName ( this,
    314359                                                    "Select temporary folder",
    315360                                                    tr("Select temporary folder ..."));
     361
     362#endif
    316363  if (nomFich == "") {
    317364    return;
     
    324371void G4OpenGLQtMovieDialog::selectSaveFileNameAction()
    325372{
     373#if QT_VERSION < 0x040000
     374  QString nomFich =  QFileDialog::getSaveFileName ( ".",
     375                                                    NULL,
     376                                                    this,
     377                                                    "Select saved file",
     378                                                    tr("Select saved file ..."));
     379#else
    326380  QString nomFich =  QFileDialog::getSaveFileName ( this,
    327381                                                    "Select saved file",
    328382                                                    tr("Select saved file ..."));
     383
     384#endif
    329385  if (nomFich == "") {
    330386    return;
     
    372428  fEncoderStatus->setText(temp);
    373429  if (temp != "") {
     430#if QT_VERSION > 0x040000
    374431    palette.setColor( QPalette::Base, Qt::red);
     432#else
     433    palette.setColor( QColorGroup::Base, Qt::red);
     434#endif
    375435    if (fParentViewer->isReadyToEncode()) {
    376436      setRecordingInfos("No valid encode defined, screen capture had been saved in the temp folder in ppm format.\nPlease define a encoder and clic on Apply button");
     
    378438    status = false;
    379439  } else {
     440#if QT_VERSION > 0x040000
    380441    palette.setColor( QPalette::Base, Qt::white);
     442#else
     443    palette.setColor( QColorGroup::Base, Qt::white);
     444#endif
    381445    fEncoderPath->setText(fParentViewer->getEncoderPath());
    382446  }
     
    398462  fTempFolderStatus->setText(temp);
    399463  if (temp != "") {
     464#if QT_VERSION > 0x040000
    400465    palette.setColor( QPalette::Base, Qt::red);
     466#else
     467    palette.setColor( QColorGroup::Base, Qt::red);
     468#endif
    401469    status = false;
    402470  } else {
     471#if QT_VERSION > 0x040000
    403472    palette.setColor( QPalette::Base, Qt::white);
     473#else
     474    palette.setColor( QColorGroup::Base, Qt::white);
     475#endif
    404476    fTempFolderPath->setText(fParentViewer->getTempFolderPath());
    405477  }
     
    421493  fSaveFileStatus->setText(temp);
    422494  if (temp != "") {
     495#if QT_VERSION > 0x040000
    423496    palette.setColor( QPalette::Base, Qt::red);
     497#else
     498    palette.setColor( QColorGroup::Base, Qt::red);
     499#endif
    424500    status = false;
    425501  } else {
     502#if QT_VERSION > 0x040000
    426503    palette.setColor( QPalette::Base, Qt::white);
     504#else
     505    palette.setColor( QColorGroup::Base, Qt::white);
     506#endif
    427507    fSaveFileName->setText(fParentViewer->getSaveFileName());
    428508  }
Note: See TracChangeset for help on using the changeset viewer.