MCPcopy Create free account
hub / github.com/cinder/Cinder / keyDown

Method keyDown

samples/QuickTimeAdvanced/src/QTimeAdvApp.cpp:52–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void 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
87void QTimeAdvApp::addActiveMovie( qtime::MovieGlRef movie )
88{

Callers

nothing calls this directly

Calls 11

setFullScreenFunction · 0.85
isFullScreenFunction · 0.85
getOpenFilePathFunction · 0.85
backMethod · 0.80
emptyMethod · 0.45
clearMethod · 0.45
setRateMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected