Ignore:
Timestamp:
Mar 4, 2008, 6:42:41 PM (16 years ago)
Author:
garnier
Message:

fenetre encoder ok

Location:
trunk/geant4/visualization/OpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh

    r733 r737  
    6262  /** Destroys G4OpenGLQtMovieDialog */
    6363  ~G4OpenGLQtMovieDialog();
     64  void setStatus(QString);
    6465
    6566private :
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc

    r736 r737  
    117117  connect( encoderButton, SIGNAL( clicked( ) ), this, SLOT(selectEncoderPathAction() ) );
    118118
    119   fEncoderPath->setText(fParentViewer->getEncoderPath());
    120 
    121119
    122120  // temp folder group box
     
    155153  connect( tempButton, SIGNAL( clicked( ) ), this, SLOT(selectTempPathAction() ) );
    156154
    157   fTempFolderPath->setText(fParentViewer->getTempFolderPath());
    158155
    159156
     
    204201  QVBoxLayout *statusVGroupBoxLayout = new QVBoxLayout(statusGroupBox);
    205202  fGlobalStatus = new QLabel(statusGroupBox);
    206   fGlobalStatus->setText("");
     203  setStatus("");
    207204
    208205#if QT_VERSION < 0x040000
     
    253250  connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    254251  connect( buttonEncode, SIGNAL( clicked() ), this, SLOT( encode() ) );
     252
     253  // fill
     254  fEncoderPath->setText(fParentViewer->getEncoderPath());
     255  fTempFolderPath->setText(fParentViewer->getTempFolderPath());
     256
     257  if (fParentViewer->getEncoderPath() == "") {
     258    setStatus("mpeg_encode is needed to encode in video format.\nIt is available here: \nhttp://bmrc.berkeley.edu/frame/research/mpeg/");
     259  }
     260
    255261}
    256262
     
    314320
    315321  QString temp = fParentViewer->setEncoderPath(param);
    316   fGlobalStatus->setText("");
     322  setStatus("");
    317323    fEncoderStatus->setText(temp);
    318324  if (temp != "") {
    319325    palette.setColor( QPalette::Base, Qt::red);
    320     fGlobalStatus->setText("If no valid encode defined, screen \ncapture files will be saved in the\ntemp folder in ppm format.");
     326    setStatus("If no valid encode defined, screen \ncapture files will be saved in the\ntemp folder in ppm format.");
    321327  } else {
    322328    palette.setColor( QPalette::Base, Qt::white);
    323329    fEncoderPath->setText(fParentViewer->getEncoderPath());
     330    if (fParentViewer->getEncoderPath() == "") {
     331      setStatus("mpeg_encode is needed to encode in video format.\nIt is available here: \nhttp://bmrc.berkeley.edu/frame/research/mpeg/");
     332    }
    324333  }
    325334  fEncoderPath->setPalette(palette);
     
    365374  fSaveFileName->setPalette(palette);
    366375}
    367 #endif
     376
     377
     378void G4OpenGLQtMovieDialog::setStatus(QString txt) {
     379  fGlobalStatus->setText(txt);
     380}
     381
     382#endif
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r736 r737  
    21472147 */
    21482148QString G4OpenGLQtViewer::getEncoderPath() {
    2149 
    2150    if (!fEncoderPath.isNull())
    2151     return fEncoderPath ;
    2152    return "";
     2149  return fEncoderPath;
    21532150}
    21542151 
     
    22092206 */
    22102207QString G4OpenGLQtViewer::getTempFolderPath() {
    2211   if (!fTempFolderPath.isNull())
    2212     return fTempFolderPath ;
    2213 return "";
     2208  return fTempFolderPath ;
    22142209}
    22152210 
     
    22562251*/
    22572252void G4OpenGLQtViewer::initMovieParameters() {
    2258 #ifdef GEANT4_QT_DEBUG
    2259   printf("G4OpenGLQtViewer::--------\n");
    2260 #endif
    22612253  //init encoder
    22622254 
     
    22782270// init temp folder
    22792271  setTempFolderPath(QDir::temp ().absolutePath ());
    2280 #ifdef GEANT4_QT_DEBUG
    2281   printf("G4OpenGLQtViewer::--------\n");
    2282 #endif
    22832272}
    22842273
Note: See TracChangeset for help on using the changeset viewer.