]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.hpp
Qt4: unused parameter
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
index 225fe6b80c1598b379df11ed8b3b0cdbd8113435..bc967b0b95f97266a967b8bca9c11ceb4a71a05b 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"
 
-#define ADD_FILTER_MEDIA( string )     \
-    string += qtr( "Media Files" );    \
-    string += " ( ";                   \
-    string += EXTENSIONS_MEDIA;        \
-    string += ");;";
-#define ADD_FILTER_VIDEO( string )     \
-    string += qtr( "Video Files" );    \
-    string += " ( ";                   \
-    string += EXTENSIONS_VIDEO;        \
-    string += ");;";
-#define ADD_FILTER_AUDIO( string )     \
-    string += qtr( "Audio Files" );    \
-    string += " ( ";                   \
-    string += EXTENSIONS_AUDIO;        \
-    string += ");;";
-#define ADD_FILTER_PLAYLIST( string )  \
-    string += qtr( "Playlist Files" ); \
-    string += " ( ";                   \
-    string += EXTENSIONS_PLAYLIST;     \
-    string += ");;";
-#define ADD_FILTER_SUBTITLE( string )  \
-    string += qtr( "Subtitles Files" );\
-    string += " ( ";                   \
-    string += EXTENSIONS_SUBTITLE;     \
-    string += ");;";
-#define ADD_FILTER_ALL( string )       \
-    string += qtr( "All Files" );      \
-    string += " (*)";
+#include "dialogs/open.hpp"
+#include <QObject>
+#include <QStringList>
+
+#define TITLE_EXTENSIONS_MEDIA qtr( "Media Files" )
+#define TITLE_EXTENSIONS_VIDEO qtr( "Video Files" )
+#define TITLE_EXTENSIONS_AUDIO qtr( "Audio Files" )
+#define TITLE_EXTENSIONS_PLAYLIST qtr( "Playlist Files" )
+#define TITLE_EXTENSIONS_SUBTITLE qtr( "Subtitle Files" )
+#define TITLE_EXTENSIONS_ALL qtr( "All Files" )
+#define EXTENSIONS_ALL "*"
+#define ADD_EXT_FILTER( string, type ) \
+    string = string + QString("%1 ( %2 );;") \
+            .arg( TITLE_##type ) \
+            .arg( QString( type ) );
 
 enum {
     EXT_FILTER_MEDIA     =  0x01,
@@ -76,12 +59,12 @@ enum {
 
 class QEvent;
 class QSignalMapper;
-class QVLCMenu;
+class VLCMenuBar;
 
 class DialogsProvider : public QObject
 {
-    Q_OBJECT;
-    friend class QVLCMenu;
+    Q_OBJECT
+    friend class VLCMenuBar;
 
 public:
     static DialogsProvider *getInstance()
@@ -97,20 +80,19 @@ 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(),
+    QStringList showSimpleOpen( const QString& help = QString(),
                                 int filters = EXT_FILTER_MEDIA |
                                 EXT_FILTER_VIDEO | EXT_FILTER_AUDIO |
                                 EXT_FILTER_PLAYLIST,
-                                QString path = QString() );
+                                const QString& path = QString() );
     bool isDying() { return b_isDying; }
 protected:
     QSignalMapper *menusMapper;
@@ -120,15 +102,17 @@ protected:
 
 private:
     DialogsProvider( intf_thread_t *);
-    intf_thread_t *p_intf;
+    virtual ~DialogsProvider();
     static DialogsProvider *instance;
+
+    intf_thread_t *p_intf;
+    QWidget* root;
     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 +121,7 @@ public slots:
     void mediaCodecDialog();
     void prefsDialog();
     void extendedDialog();
+    void synchroDialog();
     void messagesDialog();
 #ifdef ENABLE_VLM
     void vlmDialog();
@@ -148,6 +133,9 @@ public slots:
     void aboutDialog();
     void gotoTimeDialog();
     void podcastConfigureDialog();
+    void toolbarDialog();
+    void pluginDialog();
+    void epgDialog();
 
     void openFileGenericDialog( intf_dialog_args_t * );
 
@@ -158,18 +146,19 @@ public slots:
     void openDialog();
     void openDiscDialog();
     void openFileDialog();
+    void openUrlDialog();
     void openNetDialog();
     void openCaptureDialog();
 
-    void PLAppendDialog();
-    void MLAppendDialog();
+    void PLAppendDialog( int tab = OPEN_FILE_TAB );
+    void MLAppendDialog( int tab = OPEN_FILE_TAB );
 
     void PLOpenDir();
     void PLAppendDir();
     void MLAppendDir();
 
-    void streamingDialog( QWidget *parent, QString mrl = "",
-            bool b_stream = true );
+    void streamingDialog( QWidget *parent, const QString& mrl, bool b_stream = true,
+                          QStringList options = QStringList("") );
     void openAndStreamingDialogs();
     void openAndTranscodingDialogs();
 
@@ -182,7 +171,26 @@ public slots:
 private slots:
     void menuAction( QObject *);
     void menuUpdateAction( QObject * );
-    void SDMenuAction( QString );
+    void SDMenuAction( const QString& );
+signals:
+    void  toolBarConfUpdated();
 };
 
+class DialogEvent : public QEvent
+{
+public:
+    static const QEvent::Type DialogEvent_Type;
+    DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) :
+                 QEvent( DialogEvent_Type )
+    {
+        i_dialog = _i_dialog;
+        i_arg = _i_arg;
+        p_arg = _p_arg;
+    }
+
+    int i_arg, i_dialog;
+    intf_dialog_args_t *p_arg;
+};
+
+
 #endif