]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/sout/sout_widgets.hpp
Qt4: add the RTSP protocol to the sout dialog
[vlc] / modules / gui / qt4 / components / sout / sout_widgets.hpp
1 /*****************************************************************************
2  * profile_selector.hpp : A small profile selector and editor
3  ****************************************************************************
4  * Copyright (C) 2009 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jean-Baptiste Kempf <jb@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_WIDGETS_H
25 #define SOUT_WIDGETS_H
26
27 #include "qt4.hpp"
28
29 #include <QGroupBox>
30
31 class QLineEdit;
32 class QLabel;
33 class QSpinBox;
34
35 class SoutInputBox : public QGroupBox
36 {
37     public:
38         SoutInputBox( QWidget *_parent = NULL, const QString& mrl = "" );
39
40         void setMRL( const QString& );
41     private:
42         QLineEdit *sourceLine;
43         QLabel *sourceValueLabel;
44
45 };
46
47 class VirtualDestBox : public QWidget
48 {
49     Q_OBJECT;
50     public:
51         VirtualDestBox( QWidget *_parent = NULL ) : QWidget( _parent ){}
52         virtual QString getMRL( const QString& ) = 0;
53     protected:
54         QString mrl;
55     signals:
56         void mrlUpdated();
57 };
58
59 class FileDestBox: public VirtualDestBox
60 {
61     Q_OBJECT;
62     public:
63         FileDestBox( QWidget *_parent = NULL );
64         virtual QString getMRL( const QString& );
65     private:
66         QLineEdit *fileEdit;
67     private slots:
68         void fileBrowse();
69 };
70
71 class HTTPDestBox: public VirtualDestBox
72 {
73     Q_OBJECT;
74     public:
75         HTTPDestBox( QWidget *_parent = NULL );
76         virtual QString getMRL( const QString& );
77     private:
78         QLineEdit *HTTPEdit;
79         QSpinBox *HTTPPort;
80 };
81
82 class MMSHDestBox: public VirtualDestBox
83 {
84     Q_OBJECT;
85     public:
86         MMSHDestBox( QWidget *_parent = NULL );
87         virtual QString getMRL( const QString& );
88     private:
89         QLineEdit *MMSHEdit;
90         QSpinBox *MMSHPort;
91 };
92
93 class RTSPDestBox: public VirtualDestBox
94 {
95     Q_OBJECT;
96     public:
97         RTSPDestBox( QWidget *_parent = NULL );
98         virtual QString getMRL( const QString& );
99     private:
100         QLineEdit *RTSPEdit;
101         QSpinBox *RTSPPort;
102 };
103
104 class UDPDestBox: public VirtualDestBox
105 {
106     Q_OBJECT;
107     public:
108         UDPDestBox( QWidget *_parent = NULL );
109         virtual QString getMRL( const QString& );
110     private:
111         QLineEdit *UDPEdit;
112         QSpinBox *UDPPort;
113 };
114
115 class RTPDestBox: public VirtualDestBox
116 {
117     Q_OBJECT;
118     public:
119         RTPDestBox( QWidget *_parent = NULL, const char *mux = NULL );
120         virtual QString getMRL( const QString& );
121     private:
122         QLineEdit *RTPEdit;
123         QSpinBox *RTPPort;
124         const char *mux;
125 };
126
127 class ICEDestBox: public VirtualDestBox
128 {
129     Q_OBJECT;
130     public:
131         ICEDestBox( QWidget *_parent = NULL );
132         virtual QString getMRL( const QString& );
133     private:
134         QLineEdit *ICEEdit;
135         QLineEdit *ICEMountEdit;
136         QLineEdit *ICEPassEdit;
137         QSpinBox *ICEPort;
138 };
139
140
141
142 #endif