open.hpp
Go to the documentation of this file.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 QVLC_OPEN_DIALOG_H_
00025 #define QVLC_OPEN_DIALOG_H_ 1
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <vlc_common.h>
00032 #include <vlc_url.h>
00033
00034 #include "util/qvlcframe.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,
00064 bool b_selectMode = false, bool b_pl = true );
00065
00066 static void killInstance()
00067 {
00068 delete instance;
00069 instance = NULL;
00070 }
00071
00072 void showTab( int = OPEN_FILE_TAB );
00073 QString getMRL( bool b = true );
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, bool b_pl = true );
00085 virtual ~OpenDialog();
00086
00087 static OpenDialog *instance;
00088 input_thread_t *p_input;
00089
00090 QString optionsMRL;
00091 QString storedMethod;
00092 QStringList itemsMRL;
00093
00094 Ui::Open ui;
00095 FileOpenPanel *fileOpenPanel;
00096 NetOpenPanel *netOpenPanel;
00097 DiscOpenPanel *discOpenPanel;
00098 CaptureOpenPanel *captureOpenPanel;
00099
00100 int i_action_flag;
00101 bool b_pl;
00102 QStringList SeparateEntries( const QString& );
00103
00104 QPushButton *cancelButton, *selectButton;
00105 QToolButton *playButton;
00106
00107 void finish( bool );
00108
00109 private slots:
00110 void setMenuAction();
00111 void cancel();
00112 void close();
00113 void toggleAdvancedPanel();
00114 void updateMRL( const QStringList&, const QString& );
00115 void updateMRL();
00116 void newCachingMethod( const QString& );
00117 void signalCurrent( int );
00118 void browseInputSlave();
00119 };
00120
00121 #endif