void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window) { if (!window) { // Stop will trigger syncBackCurrentValues so best to do it before // we delete m_job. stop(); deleteJob(); return; } else if (!m_controller && m_job) { m_controller = QQuickWindowPrivate::get(window)->animationController; if (window->openglContext()) readyToAnimate(); else connect(window, SIGNAL(sceneGraphInitialized()), this, SLOT(sceneGraphInitialized())); } }
void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window) { if (!window) { stop(); deleteJob(); // Upon leaving a window, we reset the controller. This means that // animators will only enter the Starting phase and won't be making // calls to QQuickAnimatorController::startjob(). m_controller = 0; } else if (!m_controller && m_job) { m_controller = QQuickWindowPrivate::get(window)->animationController; if (window->openglContext()) readyToAnimate(); else connect(window, SIGNAL(sceneGraphInitialized()), this, SLOT(sceneGraphInitialized())); } }
void QQuickAnimatorProxyJob::sceneGraphInitialized() { readyToAnimate(); disconnect(this, SLOT(sceneGraphInitialized())); }