]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.hpp
Merge branch 'master' into lpcm_encoder
[vlc] / modules / gui / qt4 / components / interface_widgets.hpp
index 4bda22b858ab36ea8097e3678886d93428cd8865..16af5fe99effbdadfcfe28ea6e0f7d74c31be6b3 100644 (file)
@@ -45,24 +45,20 @@ class ResizeEvent;
 class QPixmap;
 class QHBoxLayout;
 class QMenu;
-class ReparentableWidget;
+class QSlider;
 
 /******************** Video Widget ****************/
 class VideoWidget : public QFrame
 {
     Q_OBJECT
-friend class ReparentableWidget;
-
 public:
     VideoWidget( intf_thread_t * );
     virtual ~VideoWidget();
 
-    WId request( int *, int *,
-                 unsigned int *, unsigned int *, bool );
+    WId request( int *, int *, unsigned int *, unsigned int *, bool );
     void  release( void );
     int   control( void *, int, va_list );
-
-    virtual QSize sizeHint() const;
+    void  sync( void );
 
 protected:
     virtual QPaintEngine *paintEngine() const
@@ -73,16 +69,13 @@ protected:
 private:
     intf_thread_t *p_intf;
 
-    QSize videoSize;
-    QWidget *reparentable;
+    QWidget *stable;
     QLayout *layout;
-
 signals:
-    void keyPressed( QKeyEvent * );
+    void sizeChanged( int, int );
 
 public slots:
     void SetSizing( unsigned int, unsigned int );
-    void SetFullScreen( bool );
 };
 
 /******************** Background Widget ****************/
@@ -91,13 +84,15 @@ class BackgroundWidget : public QWidget
     Q_OBJECT
 public:
     BackgroundWidget( intf_thread_t * );
-
+    void setExpandstoHeight( bool b_expand ) { b_expandPixmap = b_expand; }
 private:
-    QLabel *label;
+    QString pixmapUrl;
+    bool b_expandPixmap;
     virtual void contextMenuEvent( QContextMenuEvent *event );
     intf_thread_t *p_intf;
-    virtual void resizeEvent( QResizeEvent * event );
-
+protected:
+    void paintEvent( QPaintEvent *e );
+    static const int MARGIN = 5;
 public slots:
     void toggle(){ TOGGLEV( this ); }
     void updateArt( const QString& );
@@ -175,6 +170,7 @@ private slots:
 private:
     intf_thread_t *p_intf;
     QMenu *speedControlMenu;
+    QString tooltipStringPattern;
     SpeedControlWidget *speedControl;
 };
 
@@ -188,6 +184,7 @@ public:
 private:
     intf_thread_t *p_intf;
     QSlider *speedSlider;
+    int lastValue;
 
 public slots:
     void activateOnState();