]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.hpp
Update qt4 interface to use new "teletex-es". It fixes the unwanted display
[vlc] / modules / gui / qt4 / components / interface_widgets.hpp
index 8bec903e1177bf850e32922f46831b714e4c41fb..e1bcbb5f8cdd78ac22f20963ee5a008461f1b463 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <QWidget>
 #include <QFrame>
+
 #define VOLUME_MAX 200
 
 /* on WIN32 hide() for fullscreen controller doesnt work, so it have to be
 #endif
 
 /* to trying transparency with fullscreen controller on windows enable that */
-/* #define TRANSPARENCY */
-
-/* it can be enabled on non windows systems,
+/* it can be enabled on-non windows systems,
    but it will be transparent only with composite manager */
 #ifndef WIN32
-    #define TRANSPARENCY
+    #define HAVE_TRANSPARENCY 1
+#else
+    #define HAVE_TRANSPARENCY 0
 #endif
 
+/* Default value of opacity for FS controller */
+#define DEFAULT_OPACITY 0.75
 
 class ResizeEvent;
 class QPalette;
@@ -82,17 +85,23 @@ public:
     virtual QSize sizeHint() const;
 private:
     intf_thread_t *p_intf;
-    vout_thread_t *p_vout;
+    int i_vout;
 
-    vlc_mutex_t lock;
     QSize videoSize;
 
 signals:
-    void askVideoWidgetToShow();
-    //void askResize();
+    void askVideoWidgetToShow( unsigned int, unsigned int );
 
 public slots:
     void SetSizing( unsigned int, unsigned int );
+
+protected:
+    virtual QPaintEngine *paintEngine() const
+    {
+        return NULL;
+    }
+
+    virtual void paintEvent(QPaintEvent *);
 };
 
 /******************** Background Widget ****************/
@@ -192,6 +201,8 @@ protected:
     InputSlider         *slider;
     QPushButton         *prevSectionButton, *nextSectionButton, *menuButton;
     QPushButton         *playButton, *fullscreenButton, *extSettingsButton;
+    QPushButton         *telexTransparent, *telexOn;
+    QSpinBox            *telexPage;
     QToolButton         *slowerButton, *fasterButton;
     QHBoxLayout         *controlButLayout;
     AdvControlsWidget   *advControls;
@@ -200,6 +211,8 @@ protected:
     VolumeClickHandler  *hVolLabel;
 
     bool                 b_advancedVisible;
+    bool                 b_telexTransparent;
+    bool                 b_telexEnabled;
 protected slots:
     void play();
     void stop();
@@ -213,6 +226,9 @@ protected slots:
     void faster();
     void slower();
     void toggleAdvanced();
+    void toggleTeletext();
+    void toggleTeletextTransparency();
+    void enableTeletext( bool );
 signals:
     void advancedControlsToggled( bool );
 };
@@ -234,7 +250,8 @@ public:
     FullscreenControllerWidget( intf_thread_t *, MainInterface*, bool, bool );
     virtual ~FullscreenControllerWidget();
 
-    void SetHideTimeout( int hideTimeout ) { i_hideTimeout = hideTimeout; }
+    void setHideTimeout( int hideTimeout ) { i_hideTimeout = hideTimeout; }
+    void setIsFullscreen( bool isFS ) { b_isFullscreen = isFS; }
     void regFullscreenCallback( vout_thread_t *p_vout );
 
     bool isFSCHidden();
@@ -254,26 +271,24 @@ protected:
 
 private slots:
     void hideFSControllerWidget();
-
-    #ifdef TRANSPARENCY
     void slowHideFSC();
-    #endif
 
 private:
     QTimer *p_hideTimer;
 
-    #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
     QTimer *p_slowHideTimer;
-    #endif
+#endif
 
     int i_lastPosX;
     int i_lastPosY;
     int i_hideTimeout;  /* FSC hiding timeout, same as mouse hiding timeout */
     bool b_mouseIsOver;
+    bool b_isFullscreen;
 
-    #ifdef WIN32TRICK
+#ifdef WIN32TRICK
     bool fscHidden;
-    #endif
+#endif
 
     virtual void customEvent( QEvent *event );
 };