]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/open.hpp
Forgotten method for Input Slave Selection.
[vlc] / modules / gui / qt4 / dialogs / open.hpp
index 58c59e80b25df84bbc515a3a12c462db9ac0695b..ea287b8b34e4c312973b182fb5856ee6a3353843 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * open.hpp : advanced open dialog
  ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
- * $Id: streaminfo.hpp 16806 2006-09-23 13:37:50Z zorglub $
+ * Copyright (C) 2006-2007 the VideoLAN team
+ * $Id$
  *
  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
  *
 #ifndef _OPEN_DIALOG_H_
 #define _OPEN_DIALOG_H_
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 
-#include "ui/open.h"
 #include "util/qvlcframe.hpp"
-#include "components/open.hpp"
+#include "dialogs_provider.hpp"
+#include "ui/open.h"
+#include "components/open_panels.hpp"
 
-#include <QTabWidget>
-#include <QBoxLayout>
+enum {
+    OPEN_FILE_TAB,
+    OPEN_DISC_TAB,
+    OPEN_NETWORK_TAB,
+    OPEN_CAPTURE_TAB,
+    OPEN_TAB_MAX
+};
 
-class InfoTab;
+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 OpenDialog : public QVLCFrame
+
+class QString;
+class QTabWidget;
+
+class OpenDialog : public QVLCDialog
 {
     Q_OBJECT;
 public:
-    static OpenDialog * getInstance( intf_thread_t *p_intf )
+    static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
+                                     bool b_rawInstance = false, int _action_flag = 0, bool b_selectMode = false  );
+
+    static void killInstance()
     {
-        if( !instance)
-            instance = new OpenDialog( p_intf);
-        return instance;
+        if( instance ) delete instance;
+        instance = NULL;
     }
     virtual ~OpenDialog();
+
+    void showTab( int = OPEN_FILE_TAB );
+    QString getMRL(){ return mrl; }
+
+public slots:
+    void selectSlots();
+    void play();
+    void stream( bool b_transode_only = false );
+    void enqueue();
+    void transcode();
+
 private:
-    OpenDialog( intf_thread_t * );
+    OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode,
+                int _action_flag = 0 );
+
     static OpenDialog *instance;
     input_thread_t *p_input;
+
+    QString mrl;
+    QString mainMRL;
+    QString storedMethod;
+
     Ui::Open ui;
     FileOpenPanel *fileOpenPanel;
-public slots:
+    NetOpenPanel *netOpenPanel;
+    DiscOpenPanel *discOpenPanel;
+    CaptureOpenPanel *captureOpenPanel;
+
+    int i_action_flag;
+    QStringList SeparateEntries( QString );
+
+    QPushButton *cancelButton, *selectButton;
+    QPushButton *playButton;
+
+    void finish( bool );
+
+private slots:
+    void setMenuAction();
     void cancel();
-    void ok();
+    void close();
+    void toggleAdvancedPanel();
+    void updateMRL( QString );
+    void updateMRL();
+    void newCachingMethod( QString );
+    void signalCurrent();
+    void browseInputSlave();
 };
 
 #endif