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, ...@@ -36,6 +36,8 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
{ {
setWindowTitle( qtr( "Stream output" ) ); setWindowTitle( qtr( "Stream output" ) );
b_transcode_only = _transcode_only;
/* UI stuff */ /* UI stuff */
ui.setupUi( this ); ui.setupUi( this );
...@@ -114,7 +116,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -114,7 +116,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
CONNECT( ui.transcodeSubs, toggled( bool ), this, setSTranscodeOptions( bool ) ); CONNECT( ui.transcodeSubs, toggled( bool ), this, setSTranscodeOptions( bool ) );
CONNECT( ui.rawInput, toggled( bool ), this, setRawOptions( 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" ) ); QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
okButton->setDefault( true ); okButton->setDefault( true );
...@@ -124,7 +126,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -124,7 +126,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
BUTTONACT( okButton, ok() ); BUTTONACT( okButton, ok() );
BUTTONACT( cancelButton, cancel() ); BUTTONACT( cancelButton, cancel() );
if( _transcode_only ) toggleSout(); if( b_transcode_only ) toggleSout();
} }
void SoutDialog::fileBrowse() void SoutDialog::fileBrowse()
...@@ -221,6 +223,7 @@ void SoutDialog::setOptions() ...@@ -221,6 +223,7 @@ void SoutDialog::setOptions()
void SoutDialog::toggleSout() void SoutDialog::toggleSout()
{ {
//Toggle all the streaming options.
#define TGV( x ) { \ #define TGV( x ) { \
if( ( x->isHidden() ) ) \ if( ( x->isHidden() ) ) \
x->show(); \ x->show(); \
...@@ -231,6 +234,14 @@ void SoutDialog::toggleSout() ...@@ -231,6 +234,14 @@ void SoutDialog::toggleSout()
TGV( ui.HTTPLabel ) ; TGV( ui.UDPLabel ) ; TGV( ui.MMSHLabel ) ; TGV( ui.HTTPLabel ) ; TGV( ui.UDPLabel ) ; TGV( ui.MMSHLabel ) ;
TGV( ui.HTTPPortLabel ) ; TGV( ui.UDPPortLabel ) ; TGV( ui.MMSHPortLabel ) ; TGV( ui.HTTPPortLabel ) ; TGV( ui.UDPPortLabel ) ; TGV( ui.MMSHPortLabel ) ;
TGV( ui.HTTPPort ) ; TGV( ui.UDPPort ) ; TGV( ui.MMSHPort ) ; 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(); updateGeometry();
} }
......
...@@ -47,7 +47,8 @@ public: ...@@ -47,7 +47,8 @@ public:
//sout_gui_descr_t *sout; //sout_gui_descr_t *sout;
private: private:
Ui::Sout ui; Ui::Sout ui;
QPushButton *okButton;
bool b_transcode_only;
public slots: public slots:
void ok(); void ok();
void cancel(); void cancel();
......
...@@ -657,7 +657,7 @@ ...@@ -657,7 +657,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="3" > <item row="1" column="3" >
<widget class="QLabel" name="label_10" > <widget class="QLabel" name="ttlLabel" >
<property name="text" > <property name="text" >
<string>_("Time-To-Live (TTL)")</string> <string>_("Time-To-Live (TTL)")</string>
</property> </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