]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface.hpp
Qt: add the popup menu in the main interface
[vlc] / modules / gui / qt4 / main_interface.hpp
index c0e3974b7e997d34a7fabdca1f6e92c08b857d62..6ca203c2f2e3499f23ce811b9d3d06e132f7f74b 100644 (file)
@@ -44,15 +44,16 @@ class PlaylistWidget;
 class VisualSelector;
 class AdvControlsWidget;
 class ControlsWidget;
+class InputControlsWidget;
 class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
 
 enum {
-    CONTROLS_HIDDEN = 0x0,
     CONTROLS_VISIBLE = 0x1,
-    CONTROLS_ADVANCED = 0x2
+    CONTROLS_HIDDEN = 0x2,
+    CONTROLS_ADVANCED = 0x4,
 };
 
 typedef enum pl_dock_e {
@@ -74,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; };
@@ -104,6 +105,7 @@ private:
     QString              input_name;
     QVBoxLayout         *mainLayout;
     ControlsWidget      *controls;
+    InputControlsWidget *inputC;
     FullscreenControllerWidget *fullscreenControls;
 
     void handleMainUi( QSettings* );
@@ -130,28 +132,34 @@ 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
-
     /* Status Bar */
     QLabel              *nameLabel;
+#if 0
+    QLabel              *cryptedLabel;
+#endif
 
     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();
 
     /* Manage the Video Functions from the vout threads */
     void releaseVideoSlot( void );
@@ -167,13 +175,19 @@ private slots:
     void handleSystrayClick( QSystemTrayIcon::ActivationReason );
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
-    void updateRecentsMenu();
+
+#if 0
+    void showCryptedLabel( bool );
+#endif
 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