]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/open.hpp
Merge branch 'master' of git://git.videolan.org/vlc
[vlc] / modules / gui / qt4 / dialogs / open.hpp
index 3af33971fea61b3ea7a87a4a47301e57941f8e60..47deea615c93e624bf347e1335ecebba22f48392 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  ******************************************************************************/
 
-#ifndef _OPEN_DIALOG_H_
-#define _OPEN_DIALOG_H_
+#ifndef QVLC_OPEN_DIALOG_H_
+#define QVLC_OPEN_DIALOG_H_ 1
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_url.h>
 
 #include "util/qvlcframe.hpp"
-#include "dialogs_provider.hpp"
 #include "ui/open.h"
 #include "components/open_panels.hpp"
 
+enum {
+    OPEN_FILE_TAB,
+    OPEN_DISC_TAB,
+    OPEN_NETWORK_TAB,
+    OPEN_CAPTURE_TAB,
+    OPEN_TAB_MAX
+};
+
+enum {
+    OPEN_AND_PLAY,
+    OPEN_AND_ENQUEUE,
+    OPEN_AND_STREAM,
+    OPEN_AND_SAVE,
+    SELECT              /* Special mode to select a MRL (for VLM or similar */
+};
+
+
 class QString;
 class QTabWidget;
 
 class OpenDialog : public QVLCDialog
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
     static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
-                                     int _action_flag = 0, bool modal = false  );
+                                bool b_rawInstance = false, int _action_flag = 0,
+                                bool b_selectMode = false, bool b_pl = true );
 
     static void killInstance()
     {
-        if( instance ) delete instance;
+        delete instance;
         instance = NULL;
     }
-    virtual ~OpenDialog();
 
-    void showTab( int );
-    QString getMRL(){ return mrl; }
+    void showTab( int = OPEN_FILE_TAB );
+    QString getMRL( bool b = true );
+    QString getOptions();
 
 public slots:
     void selectSlots();
@@ -63,15 +81,16 @@ public slots:
     void transcode();
 
 private:
-    OpenDialog( QWidget *parent, intf_thread_t *, bool modal,
-                int _action_flag = 0 );
+    OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode,
+                int _action_flag = 0, bool b_pl = true );
+    virtual ~OpenDialog();
 
     static OpenDialog *instance;
     input_thread_t *p_input;
 
-    QString mrl;
-    QString mainMRL;
+    QString optionsMRL;
     QString storedMethod;
+    QStringList itemsMRL;
 
     Ui::Open ui;
     FileOpenPanel *fileOpenPanel;
@@ -80,10 +99,11 @@ private:
     CaptureOpenPanel *captureOpenPanel;
 
     int i_action_flag;
-    QStringList SeparateEntries( QString );
+    bool b_pl;
+    QStringList SeparateEntries( const QString& );
 
     QPushButton *cancelButton, *selectButton;
-    QPushButton *playButton;
+    QToolButton *playButton;
 
     void finish( bool );
 
@@ -92,10 +112,11 @@ private slots:
     void cancel();
     void close();
     void toggleAdvancedPanel();
-    void updateMRL( QString );
+    void updateMRL( const QStringList&, const QString& );
     void updateMRL();
-    void newCachingMethod( QString );
-    void signalCurrent();
+    void newCachingMethod( const QString& );
+    void signalCurrent( int );
+    void browseInputSlave();
 };
 
 #endif