Ignore:
Timestamp:
Mar 7, 2008, 12:52:36 PM (16 years ago)
Author:
garnier
Message:

modif dans le movie widget

File:
1 edited

Legend:

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

    r747 r748  
    843843{
    844844  if (!GLWindow) {
    845     G4cerr << "Visualization window not defined, please choose one before\n" << G4endl;
     845    G4cerr << "Visualization window not defined, please choose one before" << G4endl;
    846846  } else {
    847847 
     
    10141014void G4OpenGLQtViewer::showShortcuts() {
    10151015  if (fMouseAction == STYLE1) {  // rotate
    1016     G4cout << "Click and move mouse to rotate volume \n" << G4endl;
    1017     G4cout << "Press left/right arrows to move volume left/right\n" << G4endl;
    1018     G4cout << "Press up/down arrows to move volume up/down\n" << G4endl;
    1019     G4cout << "Press ALT+up/down arrows to move volume toward/forward\n" << G4endl;
    1020     G4cout << "Press SHIFT+left/right arrows to rotate volume left/right\n" << G4endl;
    1021     G4cout << "Press SHIFT+up/down arrows to rotate volume up/down\n" << G4endl;
    1022     G4cout << "Press ALT+/- to slow/speed auto rotation/move\n" << G4endl;
    1023     G4cout << "In video mode : \n" << G4endl;
    1024     G4cout << "  Press SPACE to Start/Pause video recording \n" << G4endl;
    1025     G4cout << "  Press RETURN to Stop video recording \n" << G4endl;
     1016    G4cout << "Click and move mouse to rotate volume " << G4endl;
     1017    G4cout << "Press left/right arrows to move volume left/right" << G4endl;
     1018    G4cout << "Press up/down arrows to move volume up/down" << G4endl;
     1019    G4cout << "Press ALT+up/down arrows to move volume toward/forward" << G4endl;
     1020    G4cout << "Press SHIFT+left/right arrows to rotate volume left/right" << G4endl;
     1021    G4cout << "Press SHIFT+up/down arrows to rotate volume up/down" << G4endl;
     1022    G4cout << "Press ALT+/- to slow/speed auto rotation/move" << G4endl;
     1023    G4cout << "In video mode : " << G4endl;
     1024    G4cout << " Press SPACE to Start/Pause video recording " << G4endl;
     1025    G4cout << " Press RETURN to Stop video recording " << G4endl;
    10261026  } else  if (fMouseAction == STYLE2) { //move
    1027     G4cout << "Move camera point of view with mouse\n" << G4endl;
    1028     G4cout << "Press left/right arrows to move volume left/right\n" << G4endl;
    1029     G4cout << "Press up/down arrows to move volume up/down\n" << G4endl;
    1030     G4cout << "Press ALT+up/down arrows to move volume toward/forward\n" << G4endl;
    1031     G4cout << "Press SHIFT+left/right arrows to rotate volume left/right\n" << G4endl;
    1032     G4cout << "Press SHIFT+up/down arrows to rotate volume up/down\n" << G4endl;
    1033     G4cout << "Press +/- to zoom into volume\n" << G4endl;
    1034     G4cout << "Press ALT+/- to slow/speed auto rotation/move\n" << G4endl;
    1035     G4cout << "In video mode : \n" << G4endl;
    1036     G4cout << "  Press SPACE to Start/Pause video recording \n" << G4endl;
    1037     G4cout << "  Press RETURN to Stop video recording \n" << G4endl;
     1027    G4cout << "Move camera point of view with mouse" << G4endl;
     1028    G4cout << "Press left/right arrows to move volume left/right" << G4endl;
     1029    G4cout << "Press up/down arrows to move volume up/down" << G4endl;
     1030    G4cout << "Press ALT+up/down arrows to move volume toward/forward" << G4endl;
     1031    G4cout << "Press SHIFT+left/right arrows to rotate volume left/right" << G4endl;
     1032    G4cout << "Press SHIFT+up/down arrows to rotate volume up/down" << G4endl;
     1033    G4cout << "Press +/- to zoom into volume" << G4endl;
     1034    G4cout << "Press ALT+/- to slow/speed auto rotation/move" << G4endl;
     1035    G4cout << "In video mode : " << G4endl;
     1036    G4cout << " Press SPACE to Start/Pause video recording " << G4endl;
     1037    G4cout << " Press RETURN to Stop video recording " << G4endl;
    10381038  } else  if (fMouseAction == STYLE3) { //pick
    1039     G4cout << "Click and pick \n" << G4endl;
     1039    G4cout << "Click and pick " << G4endl;
    10401040  }
    10411041
     
    11891189                            * G4UnitDefinition::GetValueOf(unitParam->GetDefaultValue());
    11901190    if (defaultValue > 89.5 || defaultValue <= 0.0) {
    1191       G4cerr << "Field half angle should be 0 < angle <= 89.5 degrees. Check your default Field half angle parameter\n";
     1191      G4cerr << "Field half angle should be 0 < angle <= 89.5 degrees. Check your default Field half angle parameter";
    11921192    } else {
    1193       G4cout << "Perspective view has been set to default value. Field half angle="<<angleParam->GetDefaultValue() <<" \n" << G4endl;
     1193      G4cout << "Perspective view has been set to default value. Field half angle="<<angleParam->GetDefaultValue() <<" " << G4endl;
    11941194      fVP.SetFieldHalfAngle (defaultValue);
    11951195      SetView ();
     
    12961296    GLWindow->setWindowState(GLWindow->windowState() ^ Qt::WindowFullScreen);
    12971297#else
    1298     G4cerr << "This version of Qt could not do fullScreen. Resizing the widget is the only solution available.\n" << G4endl;
     1298    G4cerr << "This version of Qt could not do fullScreen. Resizing the widget is the only solution available." << G4endl;
    12991299#endif
    13001300  }
     
    13821382        (exportDialog->getHeight() !=fWindow->height())) {
    13831383      if (format != QString("eps")) {
    1384       G4cerr << "Export->Change Size : This function is not implemented, to export in another size, please resize your frame to what you need\n" << G4endl;
     1384      G4cerr << "Export->Change Size : This function is not implemented, to export in another size, please resize your frame to what you need" << G4endl;
    13851385     
    13861386      //    rescaleImage(exportDialog->getWidth(),exportDialog->getHeight());// re-scale image
     
    14281428#endif
    14291429    } else {
    1430       G4cerr << "This version of G4UI Could not generate the selected format\n" << G4endl;
     1430      G4cerr << "This version of G4UI Could not generate the selected format" << G4endl;
    14311431    }
    14321432    if (res == false) {
    14331433#if QT_VERSION < 0x040000
    1434       G4cerr << "Error while saving file... "<<nomFich.ascii()<<"\n" << G4endl;
    1435 #else
    1436       G4cerr << "Error while saving file... "<<nomFich.toStdString().c_str()<<"\n" << G4endl;
     1434      G4cerr << "Error while saving file... "<<nomFich.ascii()<<"" << G4endl;
     1435#else
     1436      G4cerr << "Error while saving file... "<<nomFich.toStdString().c_str()<< G4endl;
    14371437#endif
    14381438    } else {
    14391439#if QT_VERSION < 0x040000
    1440       G4cout << "File "<<nomFich.ascii()<<" has been saved \n" << G4endl;
    1441 #else
    1442       G4cout << "File "<<nomFich.toStdString().c_str()<<" has been saved \n" << G4endl;
     1440      G4cout << "File "<<nomFich.ascii()<<" has been saved " << G4endl;
     1441#else
     1442      G4cout << "File "<<nomFich.toStdString().c_str()<<" has been saved " << G4endl;
    14431443#endif
    14441444    }
     
    17691769  } else {
    17701770#if QT_VERSION < 0x040000
    1771     G4cerr << "Could not open "<< aFilename.ascii()<<"\n" << G4endl;
    1772 #else
    1773     G4cerr << "Could not open "<< aFilename.toStdString().c_str()<<"\n" << G4endl;
     1771    G4cerr << "Could not open "<< aFilename.ascii() << G4endl;
     1772#else
     1773    G4cerr << "Could not open "<< aFilename.toStdString().c_str() << G4endl;
    17741774#endif
    17751775  }
     
    19531953  paint.end();
    19541954#else
    1955   G4cerr << "This fonction is only supported on Mac OsX or X11 with Qt3. Full platform supported with Qt4\n" << G4endl;
     1955  G4cerr << "This fonction is only supported on Mac OsX or X11 with Qt3. Full platform supported with Qt4" << G4endl;
    19561956#endif
    19571957#else
     
    21552155        tmp = createTempFolder();
    21562156        if (tmp != "") {
    2157           setRecordingInfos("Can't create temp folder. \n"+tmp);
     2157          setRecordingInfos("Can't create temp folder."+tmp);
    21582158          return;
    21592159        }
     
    21902190  } else if (step == STOP) {
    21912191    txt  = "Stop Recording...";
     2192  } else if (step == READY_TO_ENCODE) {
     2193    txt  = "Ready to Encode...";
    21922194  } else if (step == ENCODE) {
    21932195    txt  = "Encoding...";
     
    22802282}
    22812283
     2284bool G4OpenGLQtViewer::isStopped(){
     2285  if (fRecordingStep == STOP) {
     2286    return true;
     2287  }
     2288  return false;
     2289}
     2290
    22822291
    22832292bool G4OpenGLQtViewer::isReadyToEncode(){
    2284   if (fRecordingStep == STOP) {
     2293  if (fRecordingStep == READY_TO_ENCODE) {
    22852294    return true;
    22862295  }
     
    23422351  QDir dir = fileInfo->absoluteDir();
    23432352  if (!dir.exists()) {
    2344     return "Folder does not exist\n";
     2353    return "Folder does not exist";
    23452354  }
    23462355
     
    23862395  // check if it is already present
    23872396  if (d->exists(path)) {
    2388     return "Folder "+path+" already exists.\nPlease remove it first";
     2397    return "Folder "+path+" already exists.Please remove it first";
    23892398  }
    23902399  if (d->mkdir(fTempFolderPath+path)) {
     
    23922401    return "";
    23932402  } else {
    2394     return "Can't create "+fTempFolderPath+path+"\n";
     2403    return "Can't create "+fTempFolderPath+path;
    23952404  }
    23962405  return "-";
     
    24182427      res = false;
    24192428      QString file = fMovieTempFolderPath+currentFile;
    2420       error +="Removing file failed : "+file+"\n";
     2429      error +="Removing file failed : "+file;
    24212430    }
    24222431  }
     
    24252434      return "";
    24262435    } else {
    2427       return "Dir "+fMovieTempFolderPath+" should be empty,\n but could not remove it";
    2428     }
    2429 
    2430   }
    2431   return "Could not remove "+fMovieTempFolderPath+" because \nof the following errors :"+error;
     2436      return "Dir "+fMovieTempFolderPath+" should be empty, but could not remove it";
     2437    }
     2438
     2439  }
     2440  return "Could not remove "+fMovieTempFolderPath+" because of the following errors :"+error;
    24322441}
    24332442
     
    26312640
    26322641  setRecordingInfos("Parameter file "+fParameterFileName+" generated in "+fMovieTempFolderPath);
    2633   setRecordingStatus(ENCODE);
     2642  setRecordingStatus(READY_TO_ENCODE);
    26342643  return true;
    26352644}
Note: See TracChangeset for help on using the changeset viewer.