// But hide the two OK/Cancel buttons. Enable them for debug.
QDialogButtonBox *fileDialogAcceptBox =
// But hide the two OK/Cancel buttons. Enable them for debug.
QDialogButtonBox *fileDialogAcceptBox =
int align = ui.alignSubComboBox->itemData(
ui.alignSubComboBox->currentIndex() ).toInt();
mrl.append( " :subsdec-align=" + QString().setNum( align ) );
int align = ui.alignSubComboBox->itemData(
ui.alignSubComboBox->currentIndex() ).toInt();
mrl.append( " :subsdec-align=" + QString().setNum( align ) );
BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() );
BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() );
CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
{
if ( ui.audioSpin->value() >= 0 ) {
if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
{
if ( ui.audioSpin->value() >= 0 ) {
this, updateProtocol( int ) );
CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
CONNECT( ui.timeShift, clicked(), this, updateMRL());
CONNECT( ui.ipv6, clicked(), this, updateMRL());
this, updateProtocol( int ) );
CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
CONNECT( ui.timeShift, clicked(), this, updateMRL());
CONNECT( ui.ipv6, clicked(), this, updateMRL());
ui.protocolCombo->addItem("HTTP", QVariant("http"));
ui.protocolCombo->addItem("HTTPS", QVariant("https"));
ui.protocolCombo->addItem("FTP", QVariant("ftp"));
ui.protocolCombo->addItem("HTTP", QVariant("http"));
ui.protocolCombo->addItem("HTTPS", QVariant("https"));
ui.protocolCombo->addItem("FTP", QVariant("ftp"));
ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp"));
ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp"));
ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp"));
ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp"));
- QString proto = ui.protocolCombo->itemData( idx ).toString();
+ QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
+
+ ui.timeShift->setEnabled( idx_proto == UDP_PROTO ||
+ idx_proto == UDPM_PROTO );
+ ui.ipv6->setEnabled( idx_proto == UDP_PROTO );
+ ui.addressText->setEnabled( idx_proto != UDP_PROTO );
+ ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
+ idx_proto == UDPM_PROTO );
- ui.timeShift->setEnabled( idx >= 5 );
- ui.ipv6->setEnabled( idx == 5 );
- ui.addressText->setEnabled( idx != 5 );
- ui.portSpin->setEnabled( idx >= 5 );
+ if( idx_proto == NO_PROTO ) return;
- if( addr.contains( "://")) {
- msg_Err( p_intf, "replace");
- addr.replace( QRegExp("^.*://"), proto + "://");
+ if( addr.contains( "://"))
+ {
+ if( idx_proto != UDPM_PROTO )
+ addr.replace( QRegExp("^.*://@*"), proto + "://");
+ else
+ addr.replace( QRegExp("^.*://"), proto + "://@");
- if( addr.contains( "://") && proto != 5 ) {
- mrl = addr;
- } else {
- switch( proto ) {
- case 0:
+ if( addr.contains( "://"))
+ {
+ /* Match the correct item in the comboBox */
+ ui.protocolCombo->setCurrentIndex(
+ ui.protocolCombo->findData( addr.section( ':', 0, 0 ) ) );
+
+ if( idx_proto != UDP_PROTO || idx_proto != UDPM_PROTO )
+ mrl = addr;
+ }
+ else
+ {
+ switch( idx_proto ) {
+ case HTTP_PROTO:
jackDevLayout->addWidget( jackChannelsLabel, 1, 0 );
jackChannels = new QSpinBox;
jackDevLayout->addWidget( jackChannelsLabel, 1, 0 );
jackChannels = new QSpinBox;
jackPropLayout->addWidget( jackPortsLabel, 0 , 0 );
jackPortsSelected = new QLineEdit( qtr( ".*") );
jackPropLayout->addWidget( jackPortsLabel, 0 , 0 );
jackPortsSelected = new QLineEdit( qtr( ".*") );
jackPropLayout->addWidget( jackCachingLabel, 1 , 0 );
jackCaching = new QSpinBox;
setSpinBoxFreq( jackCaching );
jackPropLayout->addWidget( jackCachingLabel, 1 , 0 );
jackCaching = new QSpinBox;
setSpinBoxFreq( jackCaching );
- connect( ui.deviceCombo, SIGNAL( activated( int ) ),
- stackedDevLayout, SLOT( setCurrentIndex( int ) ) );
- connect( ui.deviceCombo, SIGNAL( activated( int ) ),
- stackedPropLayout, SLOT( setCurrentIndex( int ) ) );
+ CONNECT( ui.deviceCombo, activated( int ) ,
+ stackedDevLayout, setCurrentIndex( int ) );
+ CONNECT( ui.deviceCombo, activated( int ),
+ stackedPropLayout, setCurrentIndex( int ) );
CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
- mrl += " :dshow-vdev=" + QString("%1").arg( vdevDshowW->getValue() );
- mrl += " :dshow-adev=" + QString("%1").arg( adevDshowW->getValue() );
+ mrl+= " :dshow-vdev=" + QString("\"%1\"").arg( vdevDshowW->getValue() );
+ mrl+= " :dshow-adev=" + QString("\"%1\"").arg( adevDshowW->getValue() );
/* Get the current Device Number */
int i_devicetype = ui.deviceCombo->itemData(
ui.deviceCombo->currentIndex() ).toInt();
/* Get the current Device Number */
int i_devicetype = ui.deviceCombo->itemData(
ui.deviceCombo->currentIndex() ).toInt();
advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );