| 50 | } |
| 51 | |
| 52 | void QTimeAdvApp::keyDown( KeyEvent event ) |
| 53 | { |
| 54 | if( event.getChar() == 'f' ) { |
| 55 | setFullScreen( ! isFullScreen() ); |
| 56 | } |
| 57 | else if( event.getChar() == 'o' ) { |
| 58 | fs::path moviePath = getOpenFilePath(); |
| 59 | if( ! moviePath.empty() ) |
| 60 | loadMovieFile( moviePath ); |
| 61 | } |
| 62 | else if( event.getChar() == 'O' ) { |
| 63 | if( ! mLastPath.empty() ) |
| 64 | loadMovieFile( mLastPath ); |
| 65 | } |
| 66 | else if( event.getChar() == 'x' ) { |
| 67 | mMovies.clear(); |
| 68 | mLoadingMovies.clear(); |
| 69 | } |
| 70 | else if( event.getChar() == '2' ) { |
| 71 | if( ! mMovies.empty() ) |
| 72 | mMovies.back()->setRate( 2.0f ); |
| 73 | } |
| 74 | else if( event.getChar() == 'd' ) { |
| 75 | if( ! mMovies.empty() ) |
| 76 | mMovies.erase( mMovies.begin() + ( rand() % mMovies.size() ) ); |
| 77 | } |
| 78 | else if( event.getChar() == 'u' ) { |
| 79 | vector<string> randomMovie; |
| 80 | randomMovie.push_back( "http://movies.apple.com/movies/us/hd_gallery/gl1800/480p/bbc_earth_m480p.mov" ); |
| 81 | randomMovie.push_back( "http://movies.apple.com/media/us/quicktime/guide/hd/480p/noisettes_m480p.mov" ); |
| 82 | randomMovie.push_back( "http://pdl.warnerbros.com/wbol/us/dd/med/northbynorthwest/quicktime_page/nbnf_airplane_explosion_qt_500.mov" ); |
| 83 | loadMovieUrl( randomMovie[rand() % randomMovie.size()] ); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void QTimeAdvApp::addActiveMovie( qtime::MovieGlRef movie ) |
| 88 | { |
nothing calls this directly
no test coverage detected