X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fopen.hpp;h=ea287b8b34e4c312973b182fb5856ee6a3353843;hb=464d09b0d51fc13e598eb2100dbcf384298be371;hp=8b90be4abeea35a20f1cae504ad866d4d8441f81;hpb=352de5a3a2efc74dce4d00b40bcc3d8979a38778;p=vlc diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp index 8b90be4abe..ea287b8b34 100644 --- a/modules/gui/qt4/dialogs/open.hpp +++ b/modules/gui/qt4/dialogs/open.hpp @@ -24,15 +24,35 @@ #ifndef _OPEN_DIALOG_H_ #define _OPEN_DIALOG_H_ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include #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 QToolButton; class QTabWidget; class OpenDialog : public QVLCDialog @@ -40,25 +60,17 @@ class OpenDialog : public QVLCDialog Q_OBJECT; public: static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf, - int _action_flag = 0 ) + bool b_rawInstance = false, int _action_flag = 0, bool b_selectMode = false ); + + static void killInstance() { - if( !instance ) - instance = new OpenDialog( parent, p_intf, false, _action_flag ); - else - { - instance->i_action_flag = _action_flag; - instance->setMenuAction(); - } - return instance; + if( instance ) delete instance; + instance = NULL; } - OpenDialog( QWidget *parent, intf_thread_t *, bool modal, - int _action_flag = 0 ); virtual ~OpenDialog(); - void showTab( int ); - - QString mrl; - QString mainMRL; + void showTab( int = OPEN_FILE_TAB ); + QString getMRL(){ return mrl; } public slots: void selectSlots(); @@ -66,24 +78,30 @@ public slots: void stream( bool b_transode_only = false ); void enqueue(); void transcode(); + private: + 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; NetOpenPanel *netOpenPanel; DiscOpenPanel *discOpenPanel; CaptureOpenPanel *captureOpenPanel; - QString storedMethod; - QString mrlSub; - int advHeight, mainHeight; int i_action_flag; QStringList SeparateEntries( QString ); - QPushButton *cancelButton; - QToolButton *playButton; + QPushButton *cancelButton, *selectButton; + QPushButton *playButton; + void finish( bool ); private slots: @@ -95,6 +113,7 @@ private slots: void updateMRL(); void newCachingMethod( QString ); void signalCurrent(); + void browseInputSlave(); }; #endif