]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.hpp
Prevented QT4 gui from changing size while maximized. This should fix https://trac...
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
index 225fe6b80c1598b379df11ed8b3b0cdbd8113435..105697cb5b247a6932ee84dc77746c0d0119e283 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * dialogs_provider.hpp : Dialogs provider
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _DIALOGS_PROVIDER_H_
-#define _DIALOGS_PROVIDER_H_
+#ifndef QVLC_DIALOGS_PROVIDER_H_
+#define QVLC_DIALOGS_PROVIDER_H_
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
 #include <assert.h>
-#include <vlc_common.h>
-#include <vlc_interface.h>
 
 #include "qt4.hpp"
-#include "dialogs/interaction.hpp"
-#include "dialogs/open.hpp"
+
+#include <QObject>
 
 #define ADD_FILTER_MEDIA( string )     \
     string += qtr( "Media Files" );    \
@@ -74,9 +72,17 @@ enum {
     EXT_FILTER_SUBTITLE  =  0x10,
 };
 
+enum {
+    DialogEvent_Type = QEvent::User + DialogEventType + 1,
+    //PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
+    //PLDockEvent_Type = QEvent::User + DialogEventType + 3;
+    SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4,
+};
+
 class QEvent;
 class QSignalMapper;
 class QVLCMenu;
+#include <QStringList>
 
 class DialogsProvider : public QObject
 {
@@ -97,14 +103,13 @@ public:
     }
     static void killInstance()
     {
-        if( instance ) delete instance;
+        delete instance;
         instance = NULL;
     }
     static bool isAlive()
     {
         return ( instance != NULL );
     }
-    virtual ~DialogsProvider();
 
     QStringList showSimpleOpen( QString help = QString(),
                                 int filters = EXT_FILTER_MEDIA |
@@ -120,15 +125,16 @@ protected:
 
 private:
     DialogsProvider( intf_thread_t *);
-    intf_thread_t *p_intf;
+    virtual ~DialogsProvider();
     static DialogsProvider *instance;
+
+    intf_thread_t *p_intf;
     bool b_isDying;
 
     void openDialog( int );
     void addFromSimple( bool, bool );
 
 public slots:
-    void doInteraction( intf_dialog_args_t * );
     void playMRL( const QString & );
 
     void playlistDialog();
@@ -137,6 +143,7 @@ public slots:
     void mediaCodecDialog();
     void prefsDialog();
     void extendedDialog();
+    void synchroDialog();
     void messagesDialog();
 #ifdef ENABLE_VLM
     void vlmDialog();
@@ -148,6 +155,8 @@ public slots:
     void aboutDialog();
     void gotoTimeDialog();
     void podcastConfigureDialog();
+    void toolbarDialog();
+    void pluginDialog();
 
     void openFileGenericDialog( intf_dialog_args_t * );
 
@@ -158,6 +167,7 @@ public slots:
     void openDialog();
     void openDiscDialog();
     void openFileDialog();
+    void openUrlDialog();
     void openNetDialog();
     void openCaptureDialog();
 
@@ -168,8 +178,8 @@ public slots:
     void PLAppendDir();
     void MLAppendDir();
 
-    void streamingDialog( QWidget *parent, QString mrl = "",
-            bool b_stream = true );
+    void streamingDialog( QWidget *parent, QString mrl, bool b_stream = true,
+                          QStringList options = QStringList("") );
     void openAndStreamingDialogs();
     void openAndTranscodingDialogs();
 
@@ -183,6 +193,25 @@ private slots:
     void menuAction( QObject *);
     void menuUpdateAction( QObject * );
     void SDMenuAction( QString );
+signals:
+    void  toolBarConfUpdated();
 };
 
+class DialogEvent : public QEvent
+{
+public:
+    DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) :
+                 QEvent( (QEvent::Type)(DialogEvent_Type) )
+    {
+        i_dialog = _i_dialog;
+        i_arg = _i_arg;
+        p_arg = _p_arg;
+    };
+    virtual ~DialogEvent() { };
+
+    int i_arg, i_dialog;
+    intf_dialog_args_t *p_arg;
+};
+
+
 #endif