void KNMusicAlbumDetail::flyAwayAlbumDetail() { //Cut all the connections. m_detailHandler.disconnectAll(); //Check is fly out animation is running. if(m_flyAwayAnime->state()==QAbstractAnimation::Stopped) { //Stop all animations. stopAllAnimations(); //Emit clear selection signal. emit requireClearSelection(); //Generate the position. QRect albumArtEndRect(-m_iconSize, (height()-m_iconSize)>>1, m_iconSize, m_iconSize); //Set the animation start and end value. m_albumArtFlyAway->setStartValue(m_albumArt->geometry()); m_albumArtFlyAway->setEndValue(albumArtEndRect); m_albumContentFlyAway->setStartValue(m_albumContent->geometry()); m_albumContentFlyAway->setEndValue(albumArtEndRect); //Hide all the shadows. m_rightShadow->hide(); m_leftShadow->hide(); //Enable background change. m_backgroundAnime=true; //Hide contents. hideContentWidgets(); //Start animation. m_flyAwayAnime->start(); }
void KNNGNLButton::enterEvent(QEvent *event) { //Check if we need to launch the time line. if(m_mouseIn->state()==QTimeLine::NotRunning) { stopAllAnimations(); //Set initial data for mouse in. m_halfWidth=width()>>1; m_leftQuotePosition=m_halfWidth-m_quoteWidth; //Set the parameters. m_mouseIn->setStartFrame(m_leftQuotePosition); //Start mouse in animation. m_mouseIn->start(); }
void KNMusicAlbumDetail::displayAlbumDetail(const QModelIndex &index) { //Cut all the connections. m_detailHandler.disconnectAll(); //Stop all the animations. stopAllAnimations(); //Hide the contents. hideContentWidgets(); //Update the panel size. updatePanelSize(); //Save the index. m_currentIndex=index; //Update the artwork. updateAlbumArtwork(); //Set category content. m_albumListView->setCategoryText(m_currentIndex.row()==0? QVariant(QString("")): m_currentIndex.data(Qt::DisplayRole)); m_albumListView->scrollToTop(); //Initial the opacity effect. QPalette contentPalette=m_albumContent->palette(); contentPalette.setColor(QPalette::Window, QColor(255,255,255,240)); m_albumContent->setPalette(contentPalette); //Set the position. QRect albumArtStartRect(m_animeStartRect.x(), m_animeStartRect.y(), m_iconSize, m_iconSize); //Set the album art and album content to the initial geometry. m_albumArt->setGeometry(albumArtStartRect); m_albumContent->setGeometry(albumArtStartRect); //Update the parameter. updateExpandAlbumParameter(); //Make album art up. m_albumArt->raise(); //Tweak the shadows. m_rightShadow->hide(); m_leftShadow->raise(); m_leftShadow->show(); //Initial the shadow position. updateShadowGeometries(albumArtStartRect); //Show the widget. show(); //Set the focus. setFocus(); //Start animation. m_expandAnime->start(); }
void KNMusicAlbumDetail::foldAlbumDetail() { //Cut all the connections. m_detailHandler.disconnectAll(); //If m_animeStartRect is empty, or the state is running means now is running //fold animation, we don't need to fold it more. if(!m_animeStartRect.isNull() && m_foldAnime->state()==QAbstractAnimation::Stopped) { //Stop all the animations. stopAllAnimations(); //Update the fold animation. updateFoldAlbumParameter(); //Hide all the shadows. m_rightShadow->hide(); m_leftShadow->hide(); //Enable background change. m_backgroundAnime=true; //Hide contents. hideContentWidgets(); //Start animation. m_foldAnime->start(); } }
MeshObject::~MeshObject() { stopAllAnimations(); CoreSubsystem::getSingletonPtr()->getWorld() ->getSceneManager()->destroyEntity( getEntity() ); }