Exemplo n.º 1
0
Arquivo: spider.cpp Projeto: KDE/kpat
void Spider::moveFullRunToLeg( KCardPile * pile )
{
    QList<KCard*> run = pile->topCards( 13 );

    PatPile * leg = legs[m_leg];
    ++m_leg;
    leg->setVisible( true );

    recalculatePileLayouts();
    for ( int i = 0; i < 10; ++i )
        if ( stack[i] != pile )
            updatePileLayout( stack[i], DURATION_RELAYOUT );

    for ( int i = 0; i < run.size(); ++i )
    {
        KCard * c = run.at( i );
        leg->add( c );
        int duration = DURATION_AUTODROP * (0.7 + i / 10.0);
        c->animate( leg->pos(), leg->zValue() + i, 0, true, true, duration );
    }

    updatePileLayout( pile, DURATION_RELAYOUT );
}