]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface.hpp
Qt: no need to restart VLC to get the new toolbars.
[vlc] / modules / gui / qt4 / main_interface.hpp
index a532d91aad6bef9763e6fe89cf091b6b5389b033..04aa24155f6eb99ceacbe21fc62158f9daab9527 100644 (file)
@@ -22,8 +22,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _MAIN_INTERFACE_H_
-#define _MAIN_INTERFACE_H_
+#ifndef QVLC_MAIN_INTERFACE_H_
+#define QVLC_MAIN_INTERFACE_H_
 
 #include "qt4.hpp"
 
@@ -49,11 +49,12 @@ class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
+class DialogHandler;
 
 enum {
-    CONTROLS_HIDDEN = 0x0,
     CONTROLS_VISIBLE = 0x1,
-    CONTROLS_ADVANCED = 0x2
+    CONTROLS_HIDDEN = 0x2,
+    CONTROLS_ADVANCED = 0x4,
 };
 
 typedef enum pl_dock_e {
@@ -67,7 +68,6 @@ class MainInterface : public QVLCMW
 {
     Q_OBJECT;
 
-    friend class InteractionDialog;
     friend class PlaylistWidget;
 
 public:
@@ -75,11 +75,11 @@ public:
     virtual ~MainInterface();
 
     /* Video requests from core */
-    void *requestVideo( vout_thread_t *p_nvout, int *pi_x,
-                        int *pi_y, unsigned int *pi_width,
-                        unsigned int *pi_height );
+    WId requestVideo( vout_thread_t *p_nvout, int *pi_x,
+                      int *pi_y, unsigned int *pi_width,
+                      unsigned int *pi_height );
     void releaseVideo( void  );
-    int controlVideo( void *p_window, int i_query, va_list args );
+    int controlVideo( int i_query, va_list args );
 
     /* Getters */
     QSystemTrayIcon *getSysTray() { return sysTray; };
@@ -107,6 +107,7 @@ private:
     ControlsWidget      *controls;
     InputControlsWidget *inputC;
     FullscreenControllerWidget *fullscreenControls;
+    DialogHandler       *dialogHandler;
 
     void handleMainUi( QSettings* );
     void askForPrivacy();
@@ -132,34 +133,40 @@ private:
     bool                 visualSelectorEnabled;
     bool                 notificationEnabled; /// Systray Notifications
     bool                 bgWasVisible;
+    bool                 b_keep_size;         ///< persistent resizeable window
+    QSize                mainBasedSize;       ///< based Wnd (normal mode only)
+    QSize                mainVideoSize;       ///< Wnd with video (all modes)
     int                  i_visualmode;        ///< Visual Mode
     pl_dock_e            i_pl_dock;
     bool                 isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
-
-    input_thread_t      *p_input;    ///< Main input associated to the playlist
+    int                  i_bg_height;         ///< Save height of bgWidget
 
     /* Status Bar */
     QLabel              *nameLabel;
+    QLabel              *cryptedLabel;
 
     virtual void customEvent( QEvent *);
     virtual void keyPressEvent( QKeyEvent *);
     virtual void wheelEvent( QWheelEvent * );
+    virtual void resizeEvent( QResizeEvent * event );
 
 public slots:
     void undockPlaylist();
     void dockPlaylist( pl_dock_e i_pos = PL_BOTTOM );
-    void toggleMinimalView();
+    void toggleMinimalView( bool );
     void togglePlaylist();
     void toggleUpdateSystrayMenu();
     void toggleAdvanced();
     void toggleFullScreen();
     void toggleFSC();
+    void popupMenu( const QPoint& );
 
     /* Manage the Video Functions from the vout threads */
     void releaseVideoSlot( void );
 
 private slots:
     void debug();
+    void recreateToolbars();
     void doComponentsUpdate();
     void setName( QString );
     void setVLCWindowsTitle( QString title = "" );
@@ -169,12 +176,17 @@ private slots:
     void handleSystrayClick( QSystemTrayIcon::ActivationReason );
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
+
+    void showCryptedLabel( bool );
 signals:
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
+    void askVideoToShow( unsigned int, unsigned int );
     void askVideoToToggle();
     void askBgWidgetToToggle();
     void askUpdate();
+    void minimalViewToggled( bool );
+    void fullscreenInterfaceToggled( bool );
 };
 
 #endif