* Request the video to avoid the conflicts
**/
void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
- unsigned int *pi_width, unsigned int *pi_height )
+ unsigned int *pi_width, unsigned int *pi_height,
+ bool b_keep_size )
{
msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y );
+
+ if( b_keep_size )
+ {
+ *pi_width = size().width();
+ *pi_height = size().height();
+ }
+
emit askVideoWidgetToShow( *pi_width, *pi_height );
if( p_vout )
{
}
p_vout = p_nvout;
#ifndef NDEBUG
- msg_Dbg( p_intf, "embedded video ready (handle %p)", winId() );
+ msg_Dbg( p_intf, "embedded video ready (handle %p)", (void *)winId() );
#endif
return ( void* )winId();
}
void BackgroundWidget::contextMenuEvent( QContextMenuEvent *event )
{
QVLCMenu::PopupMenu( p_intf, true );
+ event->accept();
}
#if 0
setMaximumHeight( 128 );
setMaximumWidth( 128 );
setScaledContents( true );
+ QList< QAction* > artActions = actions();
+ QAction *action = new QAction( qtr( "Download cover art" ), this );
+ addAction( action );
+ CONNECT( action, triggered(), this, doUpdate() );
doUpdate();
}
+CoverArtLabel::~CoverArtLabel()
+{
+ QList< QAction* > artActions = actions();
+ foreach( QAction *act, artActions )
+ removeAction( act );
+}
+
void CoverArtLabel::doUpdate( QString url )
{
QPixmap pix;
void TimeLabel::setDisplayPosition( float pos, int time, int length )
{
+ if( pos == -1.f )
+ {
+ setText( " --:--/--:-- " );
+ return;
+ }
+
char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE];
secstotimestr( psz_length, length );
secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
void TimeLabel::setCaching( float f_cache )
{
- setText( "Buffering" );
+ QString amount;
+ amount.setNum( (int)(100 * f_cache) );
+ msg_Dbg( p_intf, "New caching: %d", (int)(100*f_cache));
+ setText( "Buffering " + amount + "%" );
}