]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs_provider.hpp
Qt4 - popupMenu and AlwaysOnTop. Needs testing.
[vlc] / modules / gui / qt4 / dialogs_provider.hpp
index 73b7e7752709fd1d539c52bf9668f4f42c661d66..2c18f931789fb02db794a7d3360ba0073c29300e 100644 (file)
 #include <QObject>
 #include <QTimer>
 #include <QApplication>
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
+
 #include "dialogs/interaction.hpp"
+
 #include <assert.h>
+#include <vlc/vlc.h>
+#include <vlc_interface.h>
+
+#define EXT_FILTER_MEDIA        0x01
+#define EXT_FILTER_VIDEO        0x02
+#define EXT_FILTER_AUDIO        0x04
+#define EXT_FILTER_PLAYLIST     0x08
+#define EXT_FILTER_SUBTITLE     0x10
+
+#define ADD_FILTER_MEDIA( string )   \
+    string += _("Media Files");      \
+    string += " ( ";                 \
+    string += EXTENSIONS_MEDIA;      \
+    string += ");;";
+#define ADD_FILTER_VIDEO( string )   \
+    string += _("Video Files");      \
+    string += " ( ";                 \
+    string += EXTENSIONS_VIDEO;      \
+    string += ");;";
+#define ADD_FILTER_AUDIO( string )   \
+    string += _("Audio Files");      \
+    string += " ( ";                 \
+    string += EXTENSIONS_AUDIO;      \
+    string += ");;";
+#define ADD_FILTER_PLAYLIST( string )\
+    string += _("Playlist Files");   \
+    string += " ( ";                 \
+    string += EXTENSIONS_PLAYLIST;   \
+    string += ");;";
+#define ADD_FILTER_SUBTITLE( string )\
+    string += _("Subtitles Files");   \
+    string += " ( ";                 \
+    string += EXTENSIONS_SUBTITLE;   \
+    string += ");;";
+#define ADD_FILTER_ALL( string )     \
+    string += _("All Files");        \
+    string += " (*.*)";
+
+#define OPEN_FILE_TAB           0x0
+#define OPEN_DISC_TAB           0x1
+#define OPEN_NETWORK_TAB        0x2
+#define OPEN_CAPTURE_TAB        0x3
 
 class QEvent;
 class QSignalMapper;
@@ -50,42 +92,65 @@ public:
             instance = new DialogsProvider( p_intf );
         return instance;
     }
-    virtual ~DialogsProvider() {};
+    static void killInstance()
+    {
+        if( instance ) delete instance;
+        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() );
 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;
-    QStringList showSimpleOpen();
+    void addFromSimple( bool, bool );
 
 public slots:
     void playlistDialog();
     void bookmarksDialog();
-    void streaminfoDialog();
+    void mediaInfoDialog();
+    void mediaCodecDialog();
     void prefsDialog();
+    void extendedDialog();
     void messagesDialog();
     void simplePLAppendDialog();
     void simpleMLAppendDialog();
     void simpleOpenDialog();
     void openDialog();
+    void openDialog(int );
+    void openFileDialog();
+    void openNetDialog();
+    void openCaptureDialog();
+    void openDiscDialog();
     void PLAppendDialog();
     void MLAppendDialog();
-    void openDialog( int );
-    void popupMenu( int );
     void doInteraction( intf_dialog_args_t * );
     void menuAction( QObject *);
     void menuUpdateAction( QObject *);
-    void streamingDialog();
+    void SDMenuAction( QString );
+    void streamingDialog( QString mrl = "");
+    void openThenStreamingDialogs();
     void openPlaylist();
-    void openDirectory();
-    void openMLDirectory();
+    void savePlaylist();
+    void PLAppendDir();
+    void MLAppendDir();
     void quit();
+    void switchToSkins();
+    void gotoTimeDialog();
+    void helpDialog();
+    void aboutDialog();
 };
 
-
 #endif