]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface.hpp
Merge commit 'origin/1.0-bugfix'
[vlc] / modules / gui / qt4 / main_interface.hpp
index 946685b4d80eda225a6f09be128cf389895c522c..515f79f367f2f576fbc9c3f9c3b4bbb952a7d999 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,7 +49,7 @@ class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
-struct dialog_fatal_t;
+class DialogHandler;
 
 enum {
     CONTROLS_VISIBLE = 0x1,
@@ -68,7 +68,6 @@ class MainInterface : public QVLCMW
 {
     Q_OBJECT;
 
-    friend class InteractionDialog;
     friend class PlaylistWidget;
 
 public:
@@ -91,13 +90,16 @@ public:
     virtual QSize sizeHint() const;
 
 protected:
-//    void resizeEvent( QResizeEvent * );
-    void dropEvent( QDropEvent *);
     void dropEventPlay( QDropEvent *, bool);
-    void dragEnterEvent( QDragEnterEvent * );
-    void dragMoveEvent( QDragMoveEvent * );
-    void dragLeaveEvent( QDragLeaveEvent * );
-    void closeEvent( QCloseEvent *);
+    virtual void dropEvent( QDropEvent *);
+    virtual void dragEnterEvent( QDragEnterEvent * );
+    virtual void dragMoveEvent( QDragMoveEvent * );
+    virtual void dragLeaveEvent( QDragLeaveEvent * );
+    virtual void closeEvent( QCloseEvent *);
+    virtual void customEvent( QEvent *);
+    virtual void keyPressEvent( QKeyEvent *);
+    virtual void wheelEvent( QWheelEvent * );
+    virtual void resizeEvent( QResizeEvent * event );
 
 private:
     QSettings           *settings;
@@ -108,8 +110,11 @@ private:
     ControlsWidget      *controls;
     InputControlsWidget *inputC;
     FullscreenControllerWidget *fullscreenControls;
+    DialogHandler       *dialogHandler;
+
+    void createMainWidget( QSettings* );
+    void createStatusBar();
 
-    void handleMainUi( QSettings* );
     void askForPrivacy();
     int  privacyDialog( QList<ConfigControl *> *controls );
 
@@ -118,7 +123,6 @@ private:
     void createSystray();
     void initSystray();
 
-    void createStatusBar();
 
     /* Video */
     VideoWidget         *videoWidget;
@@ -139,22 +143,11 @@ private:
     int                  i_visualmode;        ///< Visual Mode
     pl_dock_e            i_pl_dock;
     bool                 isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
+    int                  i_bg_height;         ///< Save height of bgWidget
 
     /* 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 );
-
-    static int DialogCallback( vlc_object_t *, const char *, vlc_value_t,
-                               vlc_value_t, void * );
-private slots:
-    void displayFatalDialog( const struct dialog_fatal_t * );
 
 public slots:
     void undockPlaylist();
@@ -165,13 +158,15 @@ public slots:
     void toggleAdvanced();
     void toggleFullScreen();
     void toggleFSC();
-    void popupMenu();
+    void popupMenu( const QPoint& );
 
     /* Manage the Video Functions from the vout threads */
     void releaseVideoSlot( void );
 
 private slots:
     void debug();
+    void destroyPopupMenu();
+    void recreateToolbars();
     void doComponentsUpdate();
     void setName( QString );
     void setVLCWindowsTitle( QString title = "" );
@@ -182,19 +177,15 @@ private slots:
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
 
-#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 );
-    void fatalDialog( const struct dialog_fatal_t * );
 };
 
 #endif