1 /*****************************************************************************
2 * profile_selector.cpp : A small profile selector and editor
3 ****************************************************************************
4 * Copyright (C) 2009 the VideoLAN team
7 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
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.
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.
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 *****************************************************************************/
24 #include "components/sout/sout_widgets.hpp"
27 #include <QGridLayout>
31 SoutInputBox::SoutInputBox( QWidget *_parent, QString mrl ) : QGroupBox( _parent )
36 setTitle( qtr( "Source" ) );
37 QGridLayout *sourceLayout = new QGridLayout( this );
39 QLabel *sourceLabel = new QLabel( qtr( "Source:" ) );
40 sourceLayout->addWidget( sourceLabel, 0, 0 );
42 sourceLine = new QLineEdit;
43 sourceLine->setReadOnly( true );
44 sourceLine->setText( mrl );
45 sourceLabel->setBuddy( sourceLine );
46 sourceLayout->addWidget( sourceLine, 0, 1 );
48 QLabel *sourceTypeLabel = new QLabel( qtr( "Type:" ) );
49 sourceLayout->addWidget( sourceTypeLabel, 1, 0 );
50 sourceValueLabel = new QLabel;
51 sourceLayout->addWidget( sourceValueLabel, 1, 1 );
54 QFrame *line = new QFrame;
55 line->setFrameStyle( QFrame::HLine |QFrame::Sunken );
56 sourceLayout->addWidget( line, 2, 0, 1, -1 );
59 void SoutInputBox::setMRL( QString mrl )
61 sourceLine->setText( mrl );
63 int i = mrl.indexOf( "://" );
70 type = qtr( "File/Directory" );
71 sourceValueLabel->setText( type );