void NotifyUI::hideAnimation() { animation->setDuration(250); animation->setStartValue(showsize.height()); animation->setEndValue(0); animation->start(); connect(animation, SIGNAL(finished()), this, SLOT(hideNotify())); }
void CEngine::handleEvents() { while ( SDL_PollEvent( &event ) ) { switch ( event.type ) { case SDL_KEYDOWN: keyPressed( event.key.keysym.sym ); break; case SDL_KEYUP: keyReleased( event.key.keysym.sym ); break; case SDL_QUIT: isRunning = true; break; case SDL_MOUSEMOTION: if(m_showCursor) mouseMoved( event.button.button, event.motion.x, event.motion.y, event.motion.xrel, event.motion.yrel); break; case SDL_MOUSEBUTTONUP: if(m_showCursor) mouseButtonUp( event.button.button, event.motion.x, event.motion.y, event.motion.xrel, event.motion.yrel); break; case SDL_MOUSEBUTTONDOWN: if(m_showCursor) mouseButtonDown( event.button.button, event.motion.x, event.motion.y, event.motion.xrel, event.motion.yrel); break; case SDL_ACTIVEEVENT: if ( event.active.state & SDL_APPACTIVE ) { if ( event.active.gain ) { /* Gain focus */ m_bMinimized = false; showNotify(); } else { /* Lost focus */ m_bMinimized = true; hideNotify(); } } break; } } }