00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _OPEN_DIALOG_H_
00025 #define _OPEN_DIALOG_H_
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <vlc_common.h>
00032
00033 #include "util/qvlcframe.hpp"
00034 #include "dialogs_provider.hpp"
00035 #include "ui/open.h"
00036 #include "components/open_panels.hpp"
00037
00038 enum {
00039 OPEN_FILE_TAB,
00040 OPEN_DISC_TAB,
00041 OPEN_NETWORK_TAB,
00042 OPEN_CAPTURE_TAB,
00043 OPEN_TAB_MAX
00044 };
00045
00046 enum {
00047 OPEN_AND_PLAY,
00048 OPEN_AND_ENQUEUE,
00049 OPEN_AND_STREAM,
00050 OPEN_AND_SAVE,
00051 SELECT
00052 };
00053
00054
00055 class QString;
00056 class QTabWidget;
00057
00058 class OpenDialog : public QVLCDialog
00059 {
00060 Q_OBJECT;
00061 public:
00062 static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
00063 bool b_rawInstance = false, int _action_flag = 0, bool b_selectMode = false );
00064
00065 static void killInstance()
00066 {
00067 if( instance ) delete instance;
00068 instance = NULL;
00069 }
00070 virtual ~OpenDialog();
00071
00072 void showTab( int = OPEN_FILE_TAB );
00073 QString getMRL(){ return mrl; }
00074
00075 public slots:
00076 void selectSlots();
00077 void play();
00078 void stream( bool b_transode_only = false );
00079 void enqueue();
00080 void transcode();
00081
00082 private:
00083 OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode,
00084 int _action_flag = 0 );
00085
00086 static OpenDialog *instance;
00087 input_thread_t *p_input;
00088
00089 QString mrl;
00090 QString mainMRL;
00091 QString storedMethod;
00092
00093 Ui::Open ui;
00094 FileOpenPanel *fileOpenPanel;
00095 NetOpenPanel *netOpenPanel;
00096 DiscOpenPanel *discOpenPanel;
00097 CaptureOpenPanel *captureOpenPanel;
00098
00099 int i_action_flag;
00100 QStringList SeparateEntries( QString );
00101
00102 QPushButton *cancelButton, *selectButton;
00103 QPushButton *playButton;
00104
00105 void finish( bool );
00106
00107 private slots:
00108 void setMenuAction();
00109 void cancel();
00110 void close();
00111 void toggleAdvancedPanel();
00112 void updateMRL( QString );
00113 void updateMRL();
00114 void newCachingMethod( QString );
00115 void signalCurrent();
00116 void browseInputSlave();
00117 };
00118
00119 #endif