]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/sout/sout_widgets.hpp
d2042cda38b0b4e8af764438ec598d86d444e97c
[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 UDPDestBox: public VirtualDestBox
94 {
95     Q_OBJECT;
96     public:
97         UDPDestBox( QWidget *_parent = NULL );
98         virtual QString getMRL( const QString& );
99     private:
100         QLineEdit *UDPEdit;
101         QSpinBox *UDPPort;
102 };
103
104 class RTPDestBox: public VirtualDestBox
105 {
106     Q_OBJECT;
107     public:
108         RTPDestBox( QWidget *_parent = NULL, const char *mux = NULL );
109         virtual QString getMRL( const QString& );
110     private:
111         QLineEdit *RTPEdit;
112         QSpinBox *RTPPort;
113         const char *mux;
114 };
115
116 class ICEDestBox: public VirtualDestBox
117 {
118     Q_OBJECT;
119     public:
120         ICEDestBox( QWidget *_parent = NULL );
121         virtual QString getMRL( const QString& );
122     private:
123         QLineEdit *ICEEdit;
124         QLineEdit *ICEMountEdit;
125         QLineEdit *ICEPassEdit;
126         QSpinBox *ICEPort;
127 };
128
129
130
131 #endif