Changeset 752 for trunk/geant4/visualization/OpenGL
- Timestamp:
- Mar 10, 2008, 5:13:30 PM (17 years ago)
- Location:
- trunk/geant4/visualization/OpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
r751 r752 85 85 void encodeVideo(); 86 86 bool generateMpegEncoderParameters(); 87 void displayRecordingStatus(); 87 88 88 89 protected: -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc
r751 r752 286 286 setRecordingInfos("mpeg_encode is needed to encode in video format. It is available here: http://bmrc.berkeley.edu/frame/research/mpeg/"); 287 287 } 288 288 289 checkAllParameters(); 289 290 } 290 291 -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r751 r752 1466 1466 if (!fMovieParametersDialog) { 1467 1467 fMovieParametersDialog= new G4OpenGLQtMovieDialog(this,GLWindow); 1468 displayRecordingStatus(); 1468 1469 } 1469 1470 fMovieParametersDialog->show(); … … 2174 2175 2175 2176 void G4OpenGLQtViewer::setRecordingStatus(RECORDING_STEP step) { 2177 2178 fRecordingStep = step; 2179 displayRecordingStatus(); 2180 } 2181 2182 2183 void G4OpenGLQtViewer::displayRecordingStatus() { 2176 2184 2177 2185 QString txt = ""; 2178 if ( step == WAIT) {2186 if (fRecordingStep == WAIT) { 2179 2187 txt = "Waiting to start..."; 2180 2188 fRecordFrameNumber = 0; // reset the frame number 2181 } else if ( step == START) {2189 } else if (fRecordingStep == START) { 2182 2190 txt = "Start Recording..."; 2183 } else if ( step == PAUSE) {2191 } else if (fRecordingStep == PAUSE) { 2184 2192 txt = "Pause Recording..."; 2185 } else if ( step == CONTINUE) {2193 } else if (fRecordingStep == CONTINUE) { 2186 2194 txt = "Continue Recording..."; 2187 } else if ( step == STOP) {2195 } else if (fRecordingStep == STOP) { 2188 2196 txt = "Stop Recording..."; 2189 } else if ( step == READY_TO_ENCODE) {2197 } else if (fRecordingStep == READY_TO_ENCODE) { 2190 2198 txt = "Ready to Encode..."; 2191 } else if ( step == ENCODING) {2199 } else if (fRecordingStep == ENCODING) { 2192 2200 txt = "Encoding..."; 2193 } else if ( step == FAILED) {2201 } else if (fRecordingStep == FAILED) { 2194 2202 txt = "Failed to encode..."; 2195 } else if ( step == SUCCESS) {2203 } else if (fRecordingStep == SUCCESS) { 2196 2204 txt = "File encoded successfully"; 2197 2205 } else { 2198 2206 } 2199 2200 fRecordingStep = step;2201 2207 2202 2208 if (fMovieParametersDialog) { … … 2211 2217 setRecordingInfos(""); 2212 2218 } 2219 2213 2220 2214 2221 void G4OpenGLQtViewer::setRecordingInfos(QString txt) { … … 2263 2270 return "File does not exist"; 2264 2271 } 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 2265 2281 path = QDir::cleanPath(path); 2266 2282 QFile *f = new QFile(path); … … 2351 2367 return "Path does not exist"; 2352 2368 } 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 2353 2378 path = QDir::cleanPath(path); 2354 2379 QFileInfo *fileInfo = new QFileInfo(path);
Note: See TracChangeset
for help on using the changeset viewer.