BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i ) :QWidget( NULL ), p_intf( _p_i ), b_expandPixmap( false ), b_withart( true ) { /* A dark background */ setAutoFillBackground( true ); QPalette plt = palette(); plt.setColor( QPalette::Active, QPalette::Window , Qt::black ); plt.setColor( QPalette::Inactive, QPalette::Window , Qt::black ); setPalette( plt ); /* Init the cone art */ defaultArt = QString( ":/logo/vlc128.png" ); updateArt( "" ); /* fade in animator */ setProperty( "opacity", 1.0 ); fadeAnimation = new QPropertyAnimation( this, "opacity", this ); fadeAnimation->setDuration( 1000 ); fadeAnimation->setStartValue( 0.0 ); fadeAnimation->setEndValue( 1.0 ); fadeAnimation->setEasingCurve( QEasingCurve::OutSine ); CONNECT( fadeAnimation, valueChanged( const QVariant & ), this, update() ); CONNECT( THEMIM->getIM(), artChanged( QString ), this, updateArt( const QString& ) ); }
EasterEggBackgroundWidget::EasterEggBackgroundWidget( intf_thread_t *p_intf ) : BackgroundWidget( p_intf ) { flakes = new QLinkedList<flake *>(); i_rate = 2; i_speed = 1; b_enabled = false; timer = new QTimer( this ); timer->setInterval( 100 ); CONNECT( timer, timeout(), this, spawnFlakes() ); if ( isVisible() && b_enabled ) timer->start(); defaultArt = QString( ":/logo/vlc128-xmas.png" ); updateArt( "" ); }
BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i ) :QWidget( NULL ), p_intf( _p_i ), b_expandPixmap( false ) { /* A dark background */ setAutoFillBackground( true ); QPalette plt = palette(); plt.setColor( QPalette::Active, QPalette::Window , Qt::black ); plt.setColor( QPalette::Inactive, QPalette::Window , Qt::black ); setPalette( plt ); /* Init the cone art */ updateArt( "" ); CONNECT( THEMIM->getIM(), artChanged( QString ), this, updateArt( const QString& ) ); }