Ignore:
Timestamp:
Mar 10, 2008, 5:13:30 PM (16 years ago)
Author:
garnier
Message:

on bloque si l encoder est un dir+le status est mis a jour des le debut

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

Legend:

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

    r751 r752  
    8585  void encodeVideo();
    8686  bool generateMpegEncoderParameters();
     87  void displayRecordingStatus();
    8788
    8889protected:
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc

    r751 r752  
    286286    setRecordingInfos("mpeg_encode is needed to encode in video format. It is available here: http://bmrc.berkeley.edu/frame/research/mpeg/");
    287287  }
    288 
     288 
     289  checkAllParameters();
    289290}
    290291
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r751 r752  
    14661466  if (!fMovieParametersDialog) {
    14671467    fMovieParametersDialog= new G4OpenGLQtMovieDialog(this,GLWindow);
     1468    displayRecordingStatus();
    14681469  }
    14691470  fMovieParametersDialog->show();
     
    21742175
    21752176void G4OpenGLQtViewer::setRecordingStatus(RECORDING_STEP step) {
     2177
     2178  fRecordingStep = step;
     2179  displayRecordingStatus();
     2180}
     2181
     2182
     2183void G4OpenGLQtViewer::displayRecordingStatus() {
    21762184 
    21772185  QString txt = "";
    2178   if (step == WAIT) {
     2186  if (fRecordingStep == WAIT) {
    21792187    txt  = "Waiting to start...";
    21802188    fRecordFrameNumber = 0; // reset the frame number
    2181   } else if (step == START) {
     2189  } else if (fRecordingStep == START) {
    21822190    txt  = "Start Recording...";
    2183   } else if (step == PAUSE) {
     2191  } else if (fRecordingStep == PAUSE) {
    21842192    txt  = "Pause Recording...";
    2185   } else if (step == CONTINUE) {
     2193  } else if (fRecordingStep == CONTINUE) {
    21862194    txt  = "Continue Recording...";
    2187   } else if (step == STOP) {
     2195  } else if (fRecordingStep == STOP) {
    21882196    txt  = "Stop Recording...";
    2189   } else if (step == READY_TO_ENCODE) {
     2197  } else if (fRecordingStep == READY_TO_ENCODE) {
    21902198    txt  = "Ready to Encode...";
    2191   } else if (step == ENCODING) {
     2199  } else if (fRecordingStep == ENCODING) {
    21922200    txt  = "Encoding...";
    2193   } else if (step == FAILED) {
     2201  } else if (fRecordingStep == FAILED) {
    21942202    txt  = "Failed to encode...";
    2195   } else if (step == SUCCESS) {
     2203  } else if (fRecordingStep == SUCCESS) {
    21962204    txt  = "File encoded successfully";
    21972205  } else {
    21982206  }
    2199 
    2200   fRecordingStep = step;
    22012207
    22022208  if (fMovieParametersDialog) {
     
    22112217  setRecordingInfos("");
    22122218}
     2219
    22132220
    22142221void G4OpenGLQtViewer::setRecordingInfos(QString txt) {
     
    22632270    return "File does not exist";
    22642271  }
     2272  // check if it is not a dir
     2273  QDir dir(path);
     2274  dir.setFilter( QDir::Dirs);
     2275  QStringList subDirList = dir.entryList();
     2276
     2277  if (!subDirList.isEmpty()) {
     2278    return "This is a directory";
     2279  }
     2280
    22652281  path =  QDir::cleanPath(path);
    22662282  QFile *f = new QFile(path);
     
    23512367    return "Path does not exist";
    23522368  }
     2369  // check if it is not a dir
     2370  QDir dir(path);
     2371  dir.setFilter( QDir::Dirs);
     2372  QStringList subDirList = dir.entryList();
     2373
     2374  if (!subDirList.isEmpty()) {
     2375    return "This is a directory";
     2376  }
     2377
    23532378  path =  QDir::cleanPath(path);
    23542379  QFileInfo *fileInfo = new QFileInfo(path);
Note: See TracChangeset for help on using the changeset viewer.