Qt4 - simplify the VideoWidget. VideoWidget is a just an simple QFrame with the neces...
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 23 Dec 2007 01:12:58 +0000 (01:12 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 23 Dec 2007 01:12:58 +0000 (01:12 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/main_interface.cpp

index cd5ffc6..d0d743a 100644 (file)
@@ -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() );
index e636989..f65c0eb 100644 (file)
@@ -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:
index 0c30b70..12cce98 100644 (file)
@@ -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;
         }