]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.hpp
New recently played menu.
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
index f7d6989fbb36009170e54ff91736d9e18ea543e2..ff96d5ca3bf960950692071997c18232a783698c 100644 (file)
 #ifndef _DIALOGS_PROVIDER_H_
 #define _DIALOGS_PROVIDER_H_
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <assert.h>
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_interface.h>
 
+#include "qt4.hpp"
 #include "dialogs/interaction.hpp"
+#include "dialogs/open.hpp"
 
 #include <QObject>
-#include <QTimer>
 #include <QApplication>
 
 #define ADD_FILTER_MEDIA( string )     \
@@ -62,7 +67,7 @@
     string += ");;";
 #define ADD_FILTER_ALL( string )       \
     string += qtr( "All Files" );      \
-    string += " (*.*)";
+    string += " (*)";
 
 enum {
     EXT_FILTER_MEDIA     =  0x01,
@@ -72,21 +77,6 @@ enum {
     EXT_FILTER_SUBTITLE  =  0x10,
 };
 
-enum {
-    OPEN_FILE_TAB,
-    OPEN_DISC_TAB,
-    OPEN_NETWORK_TAB,
-    OPEN_CAPTURE_TAB,
-    OPEN_TAB_MAX
-};
-
-enum {
-    OPEN_AND_PLAY,
-    OPEN_AND_STREAM,
-    OPEN_AND_SAVE,
-    OPEN_AND_ENQUEUE
-};
-
 class QEvent;
 class QSignalMapper;
 class QVLCMenu;
@@ -94,6 +84,8 @@ class QVLCMenu;
 class DialogsProvider : public QObject
 {
     Q_OBJECT;
+    friend class QVLCMenu;
+
 public:
     static DialogsProvider *getInstance()
     {
@@ -109,33 +101,39 @@ public:
     static void killInstance()
     {
         if( instance ) delete instance;
-        instance=NULL;
+        instance = NULL;
+    }
+    static bool isAlive()
+    {
+        return ( instance != NULL );
     }
     virtual ~DialogsProvider();
-    QTimer *fixed_timer;
 
     QStringList showSimpleOpen( QString help = QString(),
                                 int filters = EXT_FILTER_MEDIA |
                                 EXT_FILTER_VIDEO | EXT_FILTER_AUDIO |
                                 EXT_FILTER_PLAYLIST,
                                 QString path = QString() );
+    bool isDying() { return b_isDying; }
 protected:
-    friend class QVLCMenu;
     QSignalMapper *menusMapper;
     QSignalMapper *menusUpdateMapper;
     QSignalMapper *SDMapper;
     void customEvent( QEvent *);
+
 private:
     DialogsProvider( intf_thread_t *);
     intf_thread_t *p_intf;
     static DialogsProvider *instance;
     void addFromSimple( bool, bool );
+    bool b_isDying;
 
 public slots:
     void doInteraction( intf_dialog_args_t * );
     void menuAction( QObject *);
     void menuUpdateAction( QObject * );
     void SDMenuAction( QString );
+    void playMRL( const QString & );
 
     void playlistDialog();
     void bookmarksDialog();
@@ -144,9 +142,13 @@ public slots:
     void prefsDialog();
     void extendedDialog();
     void messagesDialog();
+#ifdef ENABLE_VLM
     void vlmDialog();
+#endif
     void helpDialog();
+#ifdef UPDATE_CHECK
     void updateDialog();
+#endif
     void aboutDialog();
     void gotoTimeDialog();
     void podcastConfigureDialog();
@@ -157,6 +159,7 @@ public slots:
 
     void openDialog();
     void openDialog( int );
+    void openFileGenericDialog( intf_dialog_args_t * );
     void openDiscDialog();
     void openFileDialog();
     void openNetDialog();
@@ -164,17 +167,20 @@ public slots:
 
     void PLAppendDialog();
     void MLAppendDialog();
+    void PLOpenDir();
     void PLAppendDir();
     void MLAppendDir();
 
-    void streamingDialog( QString mrl = "", bool b_stream = true );
+    void streamingDialog( QWidget *parent, QString mrl = "",
+            bool b_stream = true );
     void openThenStreamingDialogs();
     void openThenTranscodingDialogs();
 
     void openAPlaylist();
     void saveAPlaylist();
 
-    void switchToSkins();
+    void loadSubtitlesFile();
+
     void quit();
 };