]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/sout.hpp
Qt: Save/Convert dialog should not show any streaming features.
[vlc] / modules / gui / qt4 / dialogs / sout.hpp
1 /*****************************************************************************
2  * sout.hpp : Stream output dialog ( old-style, ala WX )
3  ****************************************************************************
4  * Copyright ( C ) 2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * ( at your option ) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _SOUT_DIALOG_H_
25 #define _SOUT_DIALOG_H_
26
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include <vlc_common.h>
32
33 #include "ui/sout.h"
34 #include "util/qvlcframe.hpp"
35
36 class QPushButton;
37 class QCheckBox;
38 class QGridLayout;
39 class QTextEdit;
40
41 class SoutDialog : public QVLCDialog
42 {
43     Q_OBJECT;
44 public:
45     static SoutDialog* getInstance( QWidget *parent, intf_thread_t *p_intf,
46                                     bool transcode_only )
47     {
48         if( !instance )
49             instance = new SoutDialog( parent, p_intf, transcode_only );
50         else
51         {
52             /* Recenter the dialog on the parent */
53             instance->setParent( parent, Qt::Dialog );
54             instance->b_transcode_only = transcode_only;
55             instance->toggleSout();
56         }
57         return instance;
58     }
59
60     virtual ~SoutDialog(){}
61
62     QString getMrl(){ return mrl; }
63
64 private:
65     Ui::Sout ui;
66     static SoutDialog *instance;
67     SoutDialog( QWidget* parent, intf_thread_t *,
68                 bool _transcode_only = false );
69     QPushButton *okButton;
70     QString mrl;
71     bool b_transcode_only;
72
73 public slots:
74     void updateMRL();
75
76 private slots:
77     void ok();
78     void cancel();
79     void toggleSout();
80     void setOptions();
81     void fileBrowse();
82     void setVTranscodeOptions( bool );
83     void setATranscodeOptions( bool );
84     void setSTranscodeOptions( bool );
85     void setRawOptions( bool );
86     void changeUDPandRTPmess( bool );
87     void RTPtoggled( bool );
88 };
89
90 #endif