X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fopen.hpp;h=47deea615c93e624bf347e1335ecebba22f48392;hb=084f3f4cf043f351efefa319f455bd2597cc40d7;hp=c4647f0a36d3a77357e42c029b6ffb9024799f7d;hpb=1580eede985d8a04df8a5ecc5a543df055b6d0b5;p=vlc diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp index c4647f0a36..47deea615c 100644 --- a/modules/gui/qt4/dialogs/open.hpp +++ b/modules/gui/qt4/dialogs/open.hpp @@ -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 * @@ -21,64 +21,102 @@ * 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 -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include -#include "ui/open.h" #include "util/qvlcframe.hpp" -#include "components/open.hpp" +#include "ui/open.h" +#include "components/open_panels.hpp" -#include -#include -#include +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 ) + static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf, + bool b_rawInstance = false, int _action_flag = 0, + bool b_selectMode = false, bool b_pl = true ); + + static void killInstance() { - if( !instance) - instance = new OpenDialog( parent, p_intf, false ); - return instance; + delete instance; + instance = NULL; } - OpenDialog( QWidget *parent, intf_thread_t *, bool modal ); - virtual ~OpenDialog(); - void showTab( int ); + void showTab( int = OPEN_FILE_TAB ); + QString getMRL( bool b = true ); + QString getOptions(); - QString mrl; - QString mainMRL; public slots: + void selectSlots(); void play(); - void stream(); + 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, bool b_pl = true ); + virtual ~OpenDialog(); + static OpenDialog *instance; input_thread_t *p_input; - QString mrlSub; + + QString optionsMRL; + QString storedMethod; + QStringList itemsMRL; Ui::Open ui; FileOpenPanel *fileOpenPanel; NetOpenPanel *netOpenPanel; - DiskOpenPanel *diskOpenPanel; + DiscOpenPanel *discOpenPanel; CaptureOpenPanel *captureOpenPanel; - QString storedMethod; - int advHeight, mainHeight; + int i_action_flag; + bool b_pl; + QStringList SeparateEntries( const QString& ); + + QPushButton *cancelButton, *selectButton; + QToolButton *playButton; + + void finish( bool ); - void playOrEnqueue( bool ); - QStringList SeparateEntries( QString ); private slots: + void setMenuAction(); void cancel(); void close(); - void enqueue(); void toggleAdvancedPanel(); - void updateMRL( QString ); + void updateMRL( const QStringList&, const QString& ); void updateMRL(); - void newMethod(QString); - void signalCurrent(); + void newCachingMethod( const QString& ); + void signalCurrent( int ); + void browseInputSlave(); }; #endif