]> git.sesse.net Git - vlc/commitdiff
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 cd5ffc6bd9c2444270b1b6f2960e52b0bd942336..d0d743a230abd638e2afa547e3e172d394b63025 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 e636989ac45387b1ae4807d9258f423ae2db4efa..f65c0ebdd0ff4cbd35f5a990fcbc2a1603aeb19b 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 0c30b707ae245ffc00c6035d3475299e4d2aa5a7..12cce9832dd90dcb75188d9f47f905cc65d28fa1 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;
         }