X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fsout.hpp;h=202b6f36ff4ef4cd49c1d442bcae3d02e6f304a2;hb=f86dd94166aee32784086e899acf489194f6aadc;hp=9904266b395d5df024b2f1f569aaad7898f31a9e;hpb=3e61191f59d19fc56fb72da69a1e5f82aee6facf;p=vlc diff --git a/modules/gui/qt4/dialogs/sout.hpp b/modules/gui/qt4/dialogs/sout.hpp index 9904266b39..202b6f36ff 100644 --- a/modules/gui/qt4/dialogs/sout.hpp +++ b/modules/gui/qt4/dialogs/sout.hpp @@ -1,7 +1,7 @@ /***************************************************************************** - * sout.hpp : Stream output dialog (old-style, ala WX) + * sout.hpp : Stream output dialog ( old-style, ala WX ) **************************************************************************** - * Copyright (C) 2006 the VideoLAN team + * Copyright ( C ) 2006 the VideoLAN team * $Id$ * * Authors: Clément Stenac @@ -9,7 +9,7 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * ( at your option ) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,8 +24,11 @@ #ifndef _SOUT_DIALOG_H_ #define _SOUT_DIALOG_H_ -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include /* Gettext functions */ #include "ui/sout.h" #include "util/qvlcframe.hpp" @@ -39,26 +42,49 @@ class SoutDialog : public QVLCDialog { Q_OBJECT; public: - SoutDialog( QWidget* parent, intf_thread_t *, - bool _transcode_only = false ); - virtual ~SoutDialog() {} + static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf, + bool transcode_only ) + { + if( !instance ) + instance = new SoutDialog( parent, p_intf, transcode_only ); + else + { + /* Recenter the dialog on the parent */ + instance->setParent( parent, Qt::Dialog ); + instance->b_transcode_only = transcode_only; + instance->toggleSout(); + } + return instance; + } + + virtual ~SoutDialog(){} + + QString getMrl(){ return mrl; } - QString mrl; - //sout_gui_descr_t *sout; private: Ui::Sout ui; - + static SoutDialog *instance; + SoutDialog( QWidget* parent, intf_thread_t *, + bool _transcode_only = false ); + QPushButton *okButton; + QString mrl; + bool b_transcode_only; + public slots: + void updateMRL(); + +private slots: void ok(); void cancel(); - void updateMRL(); - void fileBrowse(); void toggleSout(); void setOptions(); - void setVTranscodeOptions(bool); - void setATranscodeOptions(bool); - void setSTranscodeOptions(bool); - void setRawOptions(bool); + void fileBrowse(); + void setVTranscodeOptions( bool ); + void setATranscodeOptions( bool ); + void setSTranscodeOptions( bool ); + void setRawOptions( bool ); + void changeUDPandRTPmess( bool ); + void RTPtoggled( bool ); }; #endif