Commit 21dd718a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Sout: hide SAP options and ttl options when you don't stream. Adapt the...

Qt4 - Sout: hide SAP options and ttl options when you don't stream. Adapt the label on the okButton according...

parent 321b6987
......@@ -36,6 +36,8 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
{
setWindowTitle( qtr( "Stream output" ) );
b_transcode_only = _transcode_only;
/* UI stuff */
ui.setupUi( this );
......@@ -114,7 +116,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
CONNECT( ui.transcodeSubs, toggled( bool ), this, setSTranscodeOptions( bool ) );
CONNECT( ui.rawInput, toggled( bool ), this, setRawOptions( bool ) );
QPushButton *okButton = new QPushButton( qtr( "&Stream" ) );
okButton = new QPushButton( qtr( "&Stream" ) );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
okButton->setDefault( true );
......@@ -124,7 +126,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
BUTTONACT( okButton, ok() );
BUTTONACT( cancelButton, cancel() );
if( _transcode_only ) toggleSout();
if( b_transcode_only ) toggleSout();
}
void SoutDialog::fileBrowse()
......@@ -221,6 +223,7 @@ void SoutDialog::setOptions()
void SoutDialog::toggleSout()
{
//Toggle all the streaming options.
#define TGV( x ) { \
if( ( x->isHidden() ) ) \
x->show(); \
......@@ -231,6 +234,14 @@ void SoutDialog::toggleSout()
TGV( ui.HTTPLabel ) ; TGV( ui.UDPLabel ) ; TGV( ui.MMSHLabel ) ;
TGV( ui.HTTPPortLabel ) ; TGV( ui.UDPPortLabel ) ; TGV( ui.MMSHPortLabel ) ;
TGV( ui.HTTPPort ) ; TGV( ui.UDPPort ) ; TGV( ui.MMSHPort ) ;
TGV( ui.sap ); TGV( ui.sapName );
TGV( ui.sapGroup ); TGV( ui.sapGroupLabel );
TGV( ui.ttlLabel ); TGV( ui.ttl );
if( b_transcode_only ) okButton->setText( "&Save" );
else okButton->setText( "&Stream" );
updateGeometry();
}
......
......@@ -47,7 +47,8 @@ public:
//sout_gui_descr_t *sout;
private:
Ui::Sout ui;
QPushButton *okButton;
bool b_transcode_only;
public slots:
void ok();
void cancel();
......
......@@ -657,7 +657,7 @@
</widget>
</item>
<item row="1" column="3" >
<widget class="QLabel" name="label_10" >
<widget class="QLabel" name="ttlLabel" >
<property name="text" >
<string>_("Time-To-Live (TTL)")</string>
</property>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment