Commit 8dbc6a21 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - simplify the VideoWidget. VideoWidget is a just an simple QFrame with...

Qt4 - simplify the VideoWidget. VideoWidget is a just an simple QFrame with the necessary interactions...

parent d17b946c
......@@ -84,11 +84,6 @@ VideoWidget::~VideoWidget()
vlc_mutex_destroy( &lock );
}
QSize VideoWidget::sizeHint() const
{
return widgetSize;
}
/**
* Request the video to avoid the conflicts
**/
......@@ -108,7 +103,6 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
/* Set the Widget to the correct Size */
void VideoWidget::SetSizing( unsigned int w, unsigned int h )
{
widgetSize = QSize( w, h );
resize( w, h );
//updateGeometry(); // Needed for deinterlace
msg_Dbg( p_intf, "%i %i", sizeHint().height(), sizeHint().width() );
......
......@@ -58,10 +58,7 @@ public:
int i_video_height, i_video_width;
vout_thread_t *p_vout;
QSize widgetSize;
QSize sizeHint() const;
private:
QWidget *frame;
intf_thread_t *p_intf;
vlc_mutex_t lock;
signals:
......
......@@ -529,8 +529,8 @@ void MainInterface::debug()
*/
QSize MainInterface::sizeHint() const
{
int nwidth = controls->sizeHint().width();
int nheight = controls->sizeHint().height()
int nwidth = controls->size().width();
int nheight = controls->size().height()
+ menuBar()->size().height()
+ statusBar()->size().height();
......@@ -670,8 +670,8 @@ int MainInterface::controlVideo( void *p_window, int i_query, va_list args )
{
unsigned int *pi_width = va_arg( args, unsigned int * );
unsigned int *pi_height = va_arg( args, unsigned int * );
*pi_width = videoWidget->widgetSize.width();
*pi_height = videoWidget->widgetSize.height();
*pi_width = videoWidget->width();
*pi_height = videoWidget->height();
i_ret = VLC_SUCCESS;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment