Commit f9ac9c2e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Change open dialog behaviour and layout in most categories.

Internal is now QStringList items and QString options (for the first Item, of course)

    There shouldn't be too many regressions, but testing is welcome
parent cdbdb9ca
/***************************************************************************** /*****************************************************************************
* open.cpp : Panels for the open dialogs * open.cpp : Panels for the open dialogs
**************************************************************************** ****************************************************************************
* Copyright (C) 2006-2008 the VideoLAN team * Copyright (C) 2006-2009 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques * Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux * Copyright (C) 2007 Savoir-faire Linux
* *
...@@ -61,6 +61,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -61,6 +61,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* Classic UI Setup */ /* Classic UI Setup */
ui.setupUi( this ); ui.setupUi( this );
#if 0
/** BEGIN QFileDialog tweaking **/ /** BEGIN QFileDialog tweaking **/
/* Use a QFileDialog and customize it because we don't want to /* Use a QFileDialog and customize it because we don't want to
rewrite it all. Be careful to your eyes cause there are a few hacks. rewrite it all. Be careful to your eyes cause there are a few hacks.
...@@ -114,14 +115,16 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -114,14 +115,16 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
// Add the DialogBox to the layout // Add the DialogBox to the layout
ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 ); ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
#endif
/* lineFileEdit = ui.fileEdit;
//TODO later: fill the fileCompleteList with previous items played. //TODO later: fill the fileCompleteList with previous items played.
QCompleter *fileCompleter = new QCompleter( fileCompleteList, this ); QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
fileCompleter->setModel( new QDirModel( fileCompleter ) ); fileCompleter->setModel( new QDirModel( fileCompleter ) );
lineFileEdit->setCompleter( fileCompleter ); lineFileEdit->setCompleter( fileCompleter );*/
// Hide the subtitles control by default. // Hide the subtitles control by default.
ui.subFrame->hide(); ui.subFrame->setEnabled( false );
/* Build the subs size combo box */ /* Build the subs size combo box */
setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf, setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf,
...@@ -131,10 +134,11 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -131,10 +134,11 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox ); setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox );
/* Connects */ /* Connects */
BUTTONACT( ui.fileBrowseButton, browseFile() );
BUTTONACT( ui.subBrowseButton, browseFileSub() ); BUTTONACT( ui.subBrowseButton, browseFileSub() );
BUTTONACT( ui.subCheckBox, toggleSubtitleFrame()); CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) );
CONNECT( lineFileEdit, textChanged( QString ), this, updateMRL() ); CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() );
CONNECT( ui.subInput, textChanged( QString ), this, updateMRL() ); CONNECT( ui.subInput, textChanged( QString ), this, updateMRL() );
CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() ); CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() );
CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() ); CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() );
...@@ -142,7 +146,19 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -142,7 +146,19 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
FileOpenPanel::~FileOpenPanel() FileOpenPanel::~FileOpenPanel()
{ {
getSettings()->setValue( "file-dialog-state", dialogBox->saveState() ); // getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
}
void FileOpenPanel::browseFile()
{
QStringList files = QFileDialog::getOpenFileNames( this );
foreach( const QString &file, files)
{
QListWidgetItem *item = new QListWidgetItem( file, ui.fileListWidg );
item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
ui.fileListWidg->addItem( item );
}
updateMRL();
} }
/* Show a fileBrowser to select a subtitle */ /* Show a fileBrowser to select a subtitle */
...@@ -150,22 +166,32 @@ void FileOpenPanel::browseFileSub() ...@@ -150,22 +166,32 @@ void FileOpenPanel::browseFileSub()
{ {
// TODO Handle selection of more than one subtitles file // TODO Handle selection of more than one subtitles file
QStringList files = THEDP->showSimpleOpen( qtr("Open subtitles file"), QStringList files = THEDP->showSimpleOpen( qtr("Open subtitles file"),
EXT_FILTER_SUBTITLE, EXT_FILTER_SUBTITLE, p_intf->p_sys->psz_filepath );
dialogBox->directory().absolutePath() );
if( files.isEmpty() ) return; if( files.isEmpty() ) return;
ui.subInput->setText( files.join(" ") ); ui.subInput->setText( files.join(" ") );
updateMRL(); updateMRL();
} }
void FileOpenPanel::toggleSubtitleFrame( bool b )
{
ui.subFrame->setEnabled( b );
/* Update the MRL */
updateMRL();
}
/* Update the current MRL */ /* Update the current MRL */
void FileOpenPanel::updateMRL() void FileOpenPanel::updateMRL()
{ {
QString mrl = ""; QStringList fileList;
foreach( const QString &file, dialogBox->selectedFiles() ) { QString mrl;
mrl += "\"" + file + "\" ";
}
if( ui.subCheckBox->isChecked() ) { for( int i = 0; i < ui.fileListWidg->count(); i++ )
fileList << ui.fileListWidg->item( i )->text();
if( ui.subCheckBox->isChecked() && !ui.subInput->text().isEmpty() ) {
mrl.append( " :sub-file=\"" + ui.subInput->text() + "\"" ); mrl.append( " :sub-file=\"" + ui.subInput->text() + "\"" );
int align = ui.alignSubComboBox->itemData( int align = ui.alignSubComboBox->itemData(
ui.alignSubComboBox->currentIndex() ).toInt(); ui.alignSubComboBox->currentIndex() ).toInt();
...@@ -175,42 +201,24 @@ void FileOpenPanel::updateMRL() ...@@ -175,42 +201,24 @@ void FileOpenPanel::updateMRL()
mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) ); mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) );
} }
emit mrlUpdated( mrl ); emit mrlUpdated( fileList, mrl );
emit methodChanged( "file-caching" ); emit methodChanged( "file-caching" );
} }
/* Function called by Open Dialog when clicke on Play/Enqueue */ /* Function called by Open Dialog when clicke on Play/Enqueue */
void FileOpenPanel::accept() void FileOpenPanel::accept()
{ {
//TODO set the completer //FIXME
p_intf->p_sys->psz_filepath = qtu( dialogBox->directory().absolutePath() ); // p_intf->p_sys->psz_filepath = qtu( dialogBox->directory().absolutePath() );
}
void FileOpenBox::accept()
{
OpenDialog::getInstance( NULL, NULL, true )->selectSlots();
}
void FileOpenBox::reject()
{
OpenDialog::getInstance( NULL, NULL, true )->cancel();
} }
/* Function called by Open Dialog when clicked on cancel */ /* Function called by Open Dialog when clicked on cancel */
void FileOpenPanel::clear() void FileOpenPanel::clear()
{ {
lineFileEdit->clear(); ui.fileListWidg->clear();
ui.subInput->clear(); ui.subInput->clear();
} }
void FileOpenPanel::toggleSubtitleFrame()
{
TOGGLEV( ui.subFrame );
/* Update the MRL */
updateMRL();
}
/************************************************************************** /**************************************************************************
* Open Discs ( DVD, CD, VCD and similar devices ) * * Open Discs ( DVD, CD, VCD and similar devices ) *
**************************************************************************/ **************************************************************************/
...@@ -285,6 +293,8 @@ void DiscOpenPanel::clear() ...@@ -285,6 +293,8 @@ void DiscOpenPanel::clear()
{ {
ui.titleSpin->setValue( 0 ); ui.titleSpin->setValue( 0 );
ui.chapterSpin->setValue( 0 ); ui.chapterSpin->setValue( 0 );
ui.subtitlesSpin->setValue( -1 );
ui.audioSpin->setValue( -1 );
b_firstcdda = true; b_firstcdda = true;
b_firstdvd = true; b_firstdvd = true;
b_firstvcd = true; b_firstvcd = true;
...@@ -349,14 +359,15 @@ void DiscOpenPanel::updateButtons() ...@@ -349,14 +359,15 @@ void DiscOpenPanel::updateButtons()
void DiscOpenPanel::updateMRL() void DiscOpenPanel::updateMRL()
{ {
QString mrl = ""; QString mrl = "";
QStringList fileList;
/* CDDAX and VCDX not implemented. TODO ? */ /* CDDAX and VCDX not implemented. TODO ? No. */
/* DVD */ /* DVD */
if( ui.dvdRadioButton->isChecked() ) { if( ui.dvdRadioButton->isChecked() ) {
if( !ui.dvdsimple->isChecked() ) if( !ui.dvdsimple->isChecked() )
mrl = "\"dvd://"; mrl = "dvd://";
else else
mrl = "\"dvdsimple://"; mrl = "dvdsimple://";
mrl += ui.deviceCombo->currentText(); mrl += ui.deviceCombo->currentText();
emit methodChanged( "dvdnav-caching" ); emit methodChanged( "dvdnav-caching" );
...@@ -369,7 +380,7 @@ void DiscOpenPanel::updateMRL() ...@@ -369,7 +380,7 @@ void DiscOpenPanel::updateMRL()
/* VCD */ /* VCD */
} else if ( ui.vcdRadioButton->isChecked() ) { } else if ( ui.vcdRadioButton->isChecked() ) {
mrl = "\"vcd://" + ui.deviceCombo->currentText(); mrl = "vcd://" + ui.deviceCombo->currentText();
emit methodChanged( "vcd-caching" ); emit methodChanged( "vcd-caching" );
if( ui.titleSpin->value() > 0 ) { if( ui.titleSpin->value() > 0 ) {
...@@ -378,13 +389,13 @@ void DiscOpenPanel::updateMRL() ...@@ -378,13 +389,13 @@ void DiscOpenPanel::updateMRL()
/* CDDA */ /* CDDA */
} else { } else {
mrl = "\"cdda://" + ui.deviceCombo->currentText(); mrl = "cdda://" + ui.deviceCombo->currentText();
if( ui.titleSpin->value() > 0 ) { if( ui.titleSpin->value() > 0 ) {
QString("@%1").arg( ui.titleSpin->value() ); mrl += QString("@%1").arg( ui.titleSpin->value() );
} }
} }
mrl += "\""; fileList << mrl; mrl = "";
if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() ) if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
{ {
...@@ -397,7 +408,7 @@ void DiscOpenPanel::updateMRL() ...@@ -397,7 +408,7 @@ void DiscOpenPanel::updateMRL()
QString("%1").arg( ui.subtitlesSpin->value() ); QString("%1").arg( ui.subtitlesSpin->value() );
} }
} }
emit mrlUpdated( mrl ); emit mrlUpdated( fileList, mrl );
} }
void DiscOpenPanel::browseDevice() void DiscOpenPanel::browseDevice()
...@@ -431,7 +442,6 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -431,7 +442,6 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
this, updateProtocol( int ) ); this, updateProtocol( int ) );
CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() ); CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( QString ), this, updateMRL()); CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
CONNECT( ui.timeShift, clicked(), this, updateMRL());
ui.protocolCombo->addItem( "" ); ui.protocolCombo->addItem( "" );
ui.protocolCombo->addItem("HTTP", QVariant("http")); ui.protocolCombo->addItem("HTTP", QVariant("http"));
...@@ -476,7 +486,6 @@ void NetOpenPanel::updateProtocol( int idx_proto ) { ...@@ -476,7 +486,6 @@ void NetOpenPanel::updateProtocol( int idx_proto ) {
QString addr = ui.addressText->text(); QString addr = ui.addressText->text();
QString proto = ui.protocolCombo->itemData( idx_proto ).toString(); QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
ui.timeShift->setEnabled( idx_proto == UDP_PROTO );
ui.portSpin->setEnabled( idx_proto == UDP_PROTO || ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
idx_proto == RTP_PROTO ); idx_proto == RTP_PROTO );
...@@ -573,10 +582,8 @@ void NetOpenPanel::updateMRL() { ...@@ -573,10 +582,8 @@ void NetOpenPanel::updateMRL() {
} }
} }
if( ui.timeShift->isEnabled() && ui.timeShift->isChecked() ) { QStringList qsl; qsl<< mrl;
mrl += " :access-filter=timeshift"; emit mrlUpdated( qsl, "" );
}
emit mrlUpdated( mrl );
} }
void NetOpenPanel::updateCompleter() void NetOpenPanel::updateCompleter()
...@@ -830,15 +837,15 @@ void CaptureOpenPanel::initialize() ...@@ -830,15 +837,15 @@ void CaptureOpenPanel::initialize()
jackChannels->setAlignment( Qt::AlignRight ); jackChannels->setAlignment( Qt::AlignRight );
jackDevLayout->addWidget( jackChannels, 1, 1 ); jackDevLayout->addWidget( jackChannels, 1, 1 );
/* Jack Props panel */
/* Selected ports */ /* Selected ports */
QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports:" ) ); QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports:" ) );
jackPropLayout->addWidget( jackPortsLabel, 0 , 0 ); jackDevLayout->addWidget( jackPortsLabel, 0 , 0 );
jackPortsSelected = new QLineEdit( qtr( ".*") ); jackPortsSelected = new QLineEdit( qtr( ".*") );
jackPortsSelected->setAlignment( Qt::AlignRight ); jackPortsSelected->setAlignment( Qt::AlignRight );
jackPropLayout->addWidget( jackPortsSelected, 0, 1 ); jackDevLayout->addWidget( jackPortsSelected, 0, 1 );
/* Jack Props panel */
/* Caching */ /* Caching */
QLabel *jackCachingLabel = new QLabel( qtr( "Input caching:" ) ); QLabel *jackCachingLabel = new QLabel( qtr( "Input caching:" ) );
...@@ -848,7 +855,7 @@ void CaptureOpenPanel::initialize() ...@@ -848,7 +855,7 @@ void CaptureOpenPanel::initialize()
jackCaching->setSuffix( " ms" ); jackCaching->setSuffix( " ms" );
jackCaching->setValue(1000); jackCaching->setValue(1000);
jackCaching->setAlignment( Qt::AlignRight ); jackCaching->setAlignment( Qt::AlignRight );
jackPropLayout->addWidget( jackCaching, 1 , 1 ); jackPropLayout->addWidget( jackCaching, 1 , 2 );
/* Pace */ /* Pace */
jackPace = new QCheckBox(qtr( "Use VLC pace" )); jackPace = new QCheckBox(qtr( "Use VLC pace" ));
...@@ -856,7 +863,7 @@ void CaptureOpenPanel::initialize() ...@@ -856,7 +863,7 @@ void CaptureOpenPanel::initialize()
/* Auto Connect */ /* Auto Connect */
jackConnect = new QCheckBox( qtr( "Auto connnection" )); jackConnect = new QCheckBox( qtr( "Auto connnection" ));
jackPropLayout->addWidget( jackConnect, 3, 1 ); jackPropLayout->addWidget( jackConnect, 2, 2 );
/* Jack CONNECTs */ /* Jack CONNECTs */
CuMRL( jackChannels, valueChanged( int ) ); CuMRL( jackChannels, valueChanged( int ) );
...@@ -1025,6 +1032,7 @@ void CaptureOpenPanel::clear() ...@@ -1025,6 +1032,7 @@ void CaptureOpenPanel::clear()
void CaptureOpenPanel::updateMRL() void CaptureOpenPanel::updateMRL()
{ {
QString mrl = ""; QString mrl = "";
QStringList fileList;
int i_devicetype = ui.deviceCombo->itemData( int i_devicetype = ui.deviceCombo->itemData(
ui.deviceCombo->currentIndex() ).toInt(); ui.deviceCombo->currentIndex() ).toInt();
switch( i_devicetype ) switch( i_devicetype )
...@@ -1036,6 +1044,8 @@ void CaptureOpenPanel::updateMRL() ...@@ -1036,6 +1044,8 @@ void CaptureOpenPanel::updateMRL()
else if( bdac->isChecked() ) mrl = "dvb-c://"; else if( bdac->isChecked() ) mrl = "dvb-c://";
else if( bdaa->isChecked() ) mrl = "atsc://"; else if( bdaa->isChecked() ) mrl = "atsc://";
else return; else return;
fileList << mrl; mrl = "";
mrl += " :dvb-frequency=" + QString("%1").arg( bdaFreq->value() ); mrl += " :dvb-frequency=" + QString("%1").arg( bdaFreq->value() );
if( bdas->isChecked() || bdac->isChecked() ) if( bdas->isChecked() || bdac->isChecked() )
mrl += " :dvb-srate=" + QString("%1").arg( bdaSrate->value() ); mrl += " :dvb-srate=" + QString("%1").arg( bdaSrate->value() );
...@@ -1045,7 +1055,7 @@ void CaptureOpenPanel::updateMRL() ...@@ -1045,7 +1055,7 @@ void CaptureOpenPanel::updateMRL()
bdaBandBox->currentIndex() ).toInt() ); bdaBandBox->currentIndex() ).toInt() );
break; break;
case DSHOW_DEVICE: case DSHOW_DEVICE:
mrl = "dshow://"; fileList << "dshow://";
mrl+= " :dshow-vdev=" + QString("\"%1\"").arg( vdevDshowW->getValue() ); mrl+= " :dshow-vdev=" + QString("\"%1\"").arg( vdevDshowW->getValue() );
mrl+= " :dshow-adev=" + QString("\"%1\"").arg( adevDshowW->getValue() ); mrl+= " :dshow-adev=" + QString("\"%1\"").arg( adevDshowW->getValue() );
if( dshowVSizeLine->isModified() ) if( dshowVSizeLine->isModified() )
...@@ -1053,14 +1063,14 @@ void CaptureOpenPanel::updateMRL() ...@@ -1053,14 +1063,14 @@ void CaptureOpenPanel::updateMRL()
break; break;
#else #else
case V4L_DEVICE: case V4L_DEVICE:
mrl = "v4l://"; fileList << "v4l://";
mrl += " :v4l-vdev=" + v4lVideoDevice->text(); mrl += " :v4l-vdev=" + v4lVideoDevice->text();
mrl += " :v4l-adev=" + v4lAudioDevice->text(); mrl += " :v4l-adev=" + v4lAudioDevice->text();
mrl += " :v4l-norm=" + QString("%1").arg( v4lNormBox->currentIndex() ); mrl += " :v4l-norm=" + QString("%1").arg( v4lNormBox->currentIndex() );
mrl += " :v4l-frequency=" + QString("%1").arg( v4lFreq->value() ); mrl += " :v4l-frequency=" + QString("%1").arg( v4lFreq->value() );
break; break;
case V4L2_DEVICE: case V4L2_DEVICE:
mrl = "v4l2://"; fileList << "v4l2://";
mrl += " :v4l2-dev=" + v4l2VideoDevice->text(); mrl += " :v4l2-dev=" + v4l2VideoDevice->text();
mrl += " :v4l2-adev=" + v4l2AudioDevice->text(); mrl += " :v4l2-adev=" + v4l2AudioDevice->text();
mrl += " :v4l2-standard=" + QString("%1").arg( v4l2StdBox->currentIndex() ); mrl += " :v4l2-standard=" + QString("%1").arg( v4l2StdBox->currentIndex() );
...@@ -1069,18 +1079,20 @@ void CaptureOpenPanel::updateMRL() ...@@ -1069,18 +1079,20 @@ void CaptureOpenPanel::updateMRL()
mrl = "jack://"; mrl = "jack://";
mrl += "channels=" + QString("%1").arg( jackChannels->value() ); mrl += "channels=" + QString("%1").arg( jackChannels->value() );
mrl += ":ports=" + jackPortsSelected->text(); mrl += ":ports=" + jackPortsSelected->text();
mrl += " --jack-input-caching=" + QString("%1").arg( jackCaching->value() ); fileList << mrl; mrl = "";
mrl += " :jack-input-caching=" + QString("%1").arg( jackCaching->value() );
if ( jackPace->isChecked() ) if ( jackPace->isChecked() )
{ {
mrl += " --jack-input-use-vlc-pace"; mrl += " :jack-input-use-vlc-pace";
} }
if ( jackConnect->isChecked() ) if ( jackConnect->isChecked() )
{ {
mrl += " --jack-input-auto-connect"; mrl += " :jack-input-auto-connect";
} }
break; break;
case PVR_DEVICE: case PVR_DEVICE:
mrl = "pvr://"; fileList << "pvr://";
mrl += " :pvr-device=" + pvrDevice->text(); mrl += " :pvr-device=" + pvrDevice->text();
mrl += " :pvr-radio-device=" + pvrRadioDevice->text(); mrl += " :pvr-radio-device=" + pvrRadioDevice->text();
mrl += " :pvr-norm=" + QString("%1").arg( pvrNormBox->currentIndex() ); mrl += " :pvr-norm=" + QString("%1").arg( pvrNormBox->currentIndex() );
...@@ -1090,22 +1102,22 @@ void CaptureOpenPanel::updateMRL() ...@@ -1090,22 +1102,22 @@ void CaptureOpenPanel::updateMRL()
mrl += " :pvr-bitrate=" + QString("%1").arg( pvrBitr->value() ); mrl += " :pvr-bitrate=" + QString("%1").arg( pvrBitr->value() );
break; break;
case DVB_DEVICE: case DVB_DEVICE:
mrl = "dvb://"; fileList << "dvb://";
mrl += " :dvb-adapter=" + QString("%1").arg( dvbCard->value() ); mrl += " :dvb-adapter=" + QString("%1").arg( dvbCard->value() );
mrl += " :dvb-frequency=" + QString("%1").arg( dvbFreq->value() ); mrl += " :dvb-frequency=" + QString("%1").arg( dvbFreq->value() );
mrl += " :dvb-srate=" + QString("%1").arg( dvbSrate->value() ); mrl += " :dvb-srate=" + QString("%1").arg( dvbSrate->value() );
break; break;
#endif #endif
case SCREEN_DEVICE: case SCREEN_DEVICE:
mrl = "screen://"; fileList << "screen://";
mrl += " :screen-fps=" + QString("%1").arg( screenFPS->value() ); mrl = " :screen-fps=" + QString("%1").arg( screenFPS->value() );
updateButtons(); updateButtons();
break; break;
} }
if( !advMRL.isEmpty() ) mrl += advMRL; if( !advMRL.isEmpty() ) mrl += advMRL;
emit mrlUpdated( mrl ); emit mrlUpdated( fileList, mrl );
} }
/** /**
......
/***************************************************************************** /*****************************************************************************
* open.hpp : Panels for the open dialogs * open.hpp : Panels for the open dialogs
**************************************************************************** ****************************************************************************
* Copyright (C) 2006-2008 the VideoLAN team * Copyright (C) 2006-2009 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques * Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux * Copyright (C) 2007 Savoir-faire Linux
* $Id$ * $Id$
...@@ -91,22 +91,10 @@ protected: ...@@ -91,22 +91,10 @@ protected:
public slots: public slots:
virtual void updateMRL() = 0; virtual void updateMRL() = 0;
signals: signals:
void mrlUpdated( QString ); void mrlUpdated( QStringList, QString );
void methodChanged( QString method ); void methodChanged( QString method );
}; };
class FileOpenBox: public QFileDialog
{
Q_OBJECT;
public:
FileOpenBox( QWidget *parent, const QString &caption,
const QString &directory, const QString &filter ):
QFileDialog( parent, caption, directory, filter ) {}
public slots:
void accept();
void reject();
};
class FileOpenPanel: public OpenPanel class FileOpenPanel: public OpenPanel
{ {
Q_OBJECT; Q_OBJECT;
...@@ -117,15 +105,12 @@ public: ...@@ -117,15 +105,12 @@ public:
virtual void accept() ; virtual void accept() ;
private: private:
Ui::OpenFile ui; Ui::OpenFile ui;
QStringList browse( QString );
FileOpenBox *dialogBox;
QLineEdit *lineFileEdit;
QStringList fileCompleteList ;
public slots: public slots:
virtual void updateMRL(); virtual void updateMRL();
private slots: private slots:
void browseFileSub(); void browseFileSub();
void toggleSubtitleFrame(); void browseFile();
void toggleSubtitleFrame( bool );
}; };
class NetOpenPanel: public OpenPanel class NetOpenPanel: public OpenPanel
......
/***************************************************************************** /*****************************************************************************
* open.cpp : Advanced open dialog * open.cpp : Advanced open dialog
***************************************************************************** *****************************************************************************
* Copyright © 2006-2008 the VideoLAN team * Copyright © 2006-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Jean-Baptiste Kempf <jb@videolan.org> * Authors: Jean-Baptiste Kempf <jb@videolan.org>
...@@ -85,9 +85,7 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -85,9 +85,7 @@ OpenDialog::OpenDialog( QWidget *parent,
/* Basic Creation of the Window */ /* Basic Creation of the Window */
ui.setupUi( this ); ui.setupUi( this );
setWindowTitle( qtr( "Open" ) ); setWindowTitle( qtr( "Open a Media" ) );
/* resize( 410, 600 ); */
setMinimumSize( 520, 490 );
/* Tab definition and creation */ /* Tab definition and creation */
fileOpenPanel = new FileOpenPanel( ui.Tab, p_intf ); fileOpenPanel = new FileOpenPanel( ui.Tab, p_intf );
...@@ -140,10 +138,14 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -140,10 +138,14 @@ OpenDialog::OpenDialog( QWidget *parent,
/* Force MRL update on tab change */ /* Force MRL update on tab change */
CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) ); CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) );
CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); CONNECT( fileOpenPanel, mrlUpdated( QStringList, QString ),
CONNECT( netOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); this, updateMRL( QStringList, QString ) );
CONNECT( discOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); CONNECT( netOpenPanel, mrlUpdated( QStringList, QString ),
CONNECT( captureOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); this, updateMRL( QStringList, QString ) );
CONNECT( discOpenPanel, mrlUpdated( QStringList, QString ),
this, updateMRL( QStringList, QString ) );
CONNECT( captureOpenPanel, mrlUpdated( QStringList, QString ),
this, updateMRL( QStringList, QString ) );
CONNECT( fileOpenPanel, methodChanged( QString ), CONNECT( fileOpenPanel, methodChanged( QString ),
this, newCachingMethod( QString ) ); this, newCachingMethod( QString ) );
...@@ -155,6 +157,7 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -155,6 +157,7 @@ OpenDialog::OpenDialog( QWidget *parent,
this, newCachingMethod( QString ) ); this, newCachingMethod( QString ) );
/* Advanced frame Connects */ /* Advanced frame Connects */
CONNECT( ui.slaveCheckbox, toggled( bool ), this, updateMRL() );
CONNECT( ui.slaveText, textChanged( QString ), this, updateMRL() ); CONNECT( ui.slaveText, textChanged( QString ), this, updateMRL() );
CONNECT( ui.cacheSpinBox, valueChanged( int ), this, updateMRL() ); CONNECT( ui.cacheSpinBox, valueChanged( int ), this, updateMRL() );
CONNECT( ui.startTimeSpinBox, valueChanged( int ), this, updateMRL() ); CONNECT( ui.startTimeSpinBox, valueChanged( int ), this, updateMRL() );
...@@ -176,7 +179,7 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -176,7 +179,7 @@ OpenDialog::OpenDialog( QWidget *parent,
storedMethod = ""; storedMethod = "";
newCachingMethod( "file-caching" ); newCachingMethod( "file-caching" );
resize( getSettings()->value( "opendialog-size", QSize( 520, 490 ) ).toSize() ); resize( getSettings()->value( "opendialog-size", QSize( 400, 490 ) ).toSize() );
} }
OpenDialog::~OpenDialog() OpenDialog::~OpenDialog()
...@@ -184,6 +187,13 @@ OpenDialog::~OpenDialog() ...@@ -184,6 +187,13 @@ OpenDialog::~OpenDialog()
getSettings()->setValue( "opendialog-size", size() ); getSettings()->setValue( "opendialog-size", size() );
} }
/* Used by VLM dialog and inputSlave selection */
QString OpenDialog::getMRL( bool b_all )
{
return b_all ? itemsMRL[0] + ui.advancedLineInput->text()
: itemsMRL[0];
}
/* Finish the dialog and decide if you open another one after */ /* Finish the dialog and decide if you open another one after */
void OpenDialog::setMenuAction() void OpenDialog::setMenuAction()
{ {
...@@ -237,7 +247,6 @@ void OpenDialog::toggleAdvancedPanel() ...@@ -237,7 +247,6 @@ void OpenDialog::toggleAdvancedPanel()
if( ui.advancedFrame->isVisible() ) if( ui.advancedFrame->isVisible() )
{ {
ui.advancedFrame->hide(); ui.advancedFrame->hide();
//setMinimumSize( 520, 460 );
if( size().isValid() ) if( size().isValid() )
resize( size().width(), size().height() resize( size().width(), size().height()
- ui.advancedFrame->height() ); - ui.advancedFrame->height() );
...@@ -245,7 +254,6 @@ void OpenDialog::toggleAdvancedPanel() ...@@ -245,7 +254,6 @@ void OpenDialog::toggleAdvancedPanel()
else else
{ {
ui.advancedFrame->show(); ui.advancedFrame->show();
//setMinimumSize( 520, 460 + ui.advancedFrame->height() );
if( size().isValid() ) if( size().isValid() )
resize( size().width(), size().height() resize( size().width(), size().height()
+ ui.advancedFrame->height() ); + ui.advancedFrame->height() );
...@@ -263,8 +271,8 @@ void OpenDialog::cancel() ...@@ -263,8 +271,8 @@ void OpenDialog::cancel()
dynamic_cast<OpenPanel*>( ui.Tab->widget( i ) )->clear(); dynamic_cast<OpenPanel*>( ui.Tab->widget( i ) )->clear();
/* Clear the variables */ /* Clear the variables */
mrl.clear(); itemsMRL.clear();
mainMRL.clear(); optionsMRL.clear();
/* If in Select Mode, reject instead of hiding */ /* If in Select Mode, reject instead of hiding */
if( i_action_flag == SELECT ) reject(); if( i_action_flag == SELECT ) reject();
...@@ -315,23 +323,38 @@ void OpenDialog::enqueue() ...@@ -315,23 +323,38 @@ void OpenDialog::enqueue()
void OpenDialog::finish( bool b_enqueue = false ) void OpenDialog::finish( bool b_enqueue = false )
{ {
toggleVisible(); toggleVisible();
mrl = ui.advancedLineInput->text();
if( i_action_flag != SELECT ) if( i_action_flag == SELECT )
{ {
QStringList tempMRL = SeparateEntries( mrl ); accept();
for( int i = 0; i < tempMRL.size(); i++ ) return;
}
/* Go through the item list */
for( int i = 0; i < itemsMRL.size(); i++ )
{ {
bool b_start = !i && !b_enqueue; bool b_start = !i && !b_enqueue;
input_item_t *p_input; input_item_t *p_input;
p_input = input_item_New( p_intf, qtu( itemsMRL[i] ), NULL );
p_input = input_item_New( p_intf, qtu( tempMRL[i] ), NULL ); /* Insert options only for the first element.
We don't know how to edit that anyway. */
if( i == 0 )
{
/* Take options from the UI, not from what we stored */
QStringList optionsList = ui.advancedLineInput->text().split( ":" );
/* Insert options */ /* Insert options */
while( i + 1 < tempMRL.size() && tempMRL[i + 1].startsWith( ":" ) ) for( int j = 0; j < optionsList.size(); j++ )
{ {
i++; QString qs = optionsList[j].trimmed();
input_item_AddOption( p_input, qtu( tempMRL[i] ), VLC_INPUT_OPTION_TRUSTED ); if( !qs.isEmpty() )
{
input_item_AddOption( p_input, qtu( qs ), VLC_INPUT_OPTION_TRUSTED );
// msg_Err( p_intf, "Here %s", qtu( qs ));
}
}
} }
/* Switch between enqueuing and starting the item */ /* Switch between enqueuing and starting the item */
...@@ -342,11 +365,8 @@ void OpenDialog::finish( bool b_enqueue = false ) ...@@ -342,11 +365,8 @@ void OpenDialog::finish( bool b_enqueue = false )
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
/* Do not add the current MRL if playlist_AddInput fail */ /* Do not add the current MRL if playlist_AddInput fail */
RecentsMRL::getInstance( p_intf )->addRecent( tempMRL[i] ); RecentsMRL::getInstance( p_intf )->addRecent( itemsMRL[i] );
} }
}
else
accept();
} }
void OpenDialog::transcode() void OpenDialog::transcode()
...@@ -356,43 +376,24 @@ void OpenDialog::transcode() ...@@ -356,43 +376,24 @@ void OpenDialog::transcode()
void OpenDialog::stream( bool b_transcode_only ) void OpenDialog::stream( bool b_transcode_only )
{ {
mrl = ui.advancedLineInput->text(); QString soutMRL = getMRL();
toggleVisible(); toggleVisible();
/* Separate the entries */
QStringList listMRL = SeparateEntries( mrl );
/* We can only take the first entry since we have no idea what
to do with many files ? Gather ? */
if( listMRL.size() > 0 )
{
/* First item */
QString soutMRL = listMRL[0];
/* Keep all the :xxx options because they are needed see v4l and dshow */
for( int i = 1; i < listMRL.size(); i++ )
{
if( listMRL[i].at( 0 ) == ':' )
soutMRL.append( " " + listMRL[i] );
else
break;
}
/* Dbg and send :D */ /* Dbg and send :D */
msg_Dbg( p_intf, "MRL passed to the Sout: %s", qtu( soutMRL ) ); msg_Dbg( p_intf, "MRL passed to the Sout: %s", qtu( soutMRL ) );
THEDP->streamingDialog( this, soutMRL, b_transcode_only ); THEDP->streamingDialog( this, soutMRL, b_transcode_only );
}
} }
/* Update the MRL */ /* Update the MRL */
void OpenDialog::updateMRL( QString tempMRL ) void OpenDialog::updateMRL( QStringList item, QString tempMRL )
{ {
mainMRL = tempMRL; optionsMRL = tempMRL;
itemsMRL = item;
updateMRL(); updateMRL();
} }
void OpenDialog::updateMRL() { void OpenDialog::updateMRL() {
mrl = mainMRL; QString mrl = optionsMRL;
if( ui.slaveCheckbox->isChecked() ) { if( ui.slaveCheckbox->isChecked() ) {
mrl += " :input-slave=" + ui.slaveText->text(); mrl += " :input-slave=" + ui.slaveText->text();
} }
...@@ -406,6 +407,7 @@ void OpenDialog::updateMRL() { ...@@ -406,6 +407,7 @@ void OpenDialog::updateMRL() {
arg( ui.startTimeSpinBox->value() ); arg( ui.startTimeSpinBox->value() );
} }
ui.advancedLineInput->setText( mrl ); ui.advancedLineInput->setText( mrl );
ui.mrlLine->setText( itemsMRL.join( " " ) );
} }
void OpenDialog::newCachingMethod( QString method ) void OpenDialog::newCachingMethod( QString method )
...@@ -469,6 +471,6 @@ void OpenDialog::browseInputSlave() ...@@ -469,6 +471,6 @@ void OpenDialog::browseInputSlave()
{ {
OpenDialog *od = new OpenDialog( this, p_intf, true, SELECT ); OpenDialog *od = new OpenDialog( this, p_intf, true, SELECT );
od->exec(); od->exec();
ui.slaveText->setText( od->getMRL() ); ui.slaveText->setText( od->getMRL( false ) );
delete od; delete od;
} }
...@@ -56,8 +56,6 @@ class QTabWidget; ...@@ -56,8 +56,6 @@ class QTabWidget;
class OpenDialog : public QVLCDialog class OpenDialog : public QVLCDialog
{ {
friend class FileOpenBox;
Q_OBJECT; Q_OBJECT;
public: public:
static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf, static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
...@@ -72,7 +70,7 @@ public: ...@@ -72,7 +70,7 @@ public:
virtual ~OpenDialog(); virtual ~OpenDialog();
void showTab( int = OPEN_FILE_TAB ); void showTab( int = OPEN_FILE_TAB );
QString getMRL(){ return mrl; } QString getMRL( bool b = true );
public slots: public slots:
void selectSlots(); void selectSlots();
...@@ -88,9 +86,9 @@ private: ...@@ -88,9 +86,9 @@ private:
static OpenDialog *instance; static OpenDialog *instance;
input_thread_t *p_input; input_thread_t *p_input;
QString mrl; QString optionsMRL;
QString mainMRL;
QString storedMethod; QString storedMethod;
QStringList itemsMRL;
Ui::Open ui; Ui::Open ui;
FileOpenPanel *fileOpenPanel; FileOpenPanel *fileOpenPanel;
...@@ -112,7 +110,7 @@ private slots: ...@@ -112,7 +110,7 @@ private slots:
void cancel(); void cancel();
void close(); void close();
void toggleAdvancedPanel(); void toggleAdvancedPanel();
void updateMRL( QString ); void updateMRL( QStringList, QString );
void updateMRL(); void updateMRL();
void newCachingMethod( QString ); void newCachingMethod( QString );
void signalCurrent( int ); void signalCurrent( int );
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>586</width> <width>556</width>
<height>532</height> <height>387</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item row="0" column="2" >
<widget class="QSpinBox" name="cacheSpinBox" > <widget class="QSpinBox" name="cacheSpinBox" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Change the caching for the media")</string> <string>_("Change the caching for the media")</string>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2" > <item row="0" column="3" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="3" > <item row="0" column="4" >
<widget class="QLabel" name="label_3" > <widget class="QLabel" name="label_3" >
<property name="text" > <property name="text" >
<string>_("Start Time")</string> <string>_("Start Time")</string>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4" colspan="2" > <item row="0" column="5" colspan="2" >
<widget class="QSpinBox" name="startTimeSpinBox" > <widget class="QSpinBox" name="startTimeSpinBox" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Change the start time for the media")</string> <string>_("Change the start time for the media")</string>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="6" > <item row="0" column="7" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -123,10 +123,10 @@ ...@@ -123,10 +123,10 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="1" colspan="6" > <item row="1" column="2" colspan="6" >
<widget class="Line" name="line" /> <widget class="Line" name="line" />
</item> </item>
<item row="2" column="0" colspan="7" > <item row="2" column="0" colspan="8" >
<widget class="QCheckBox" name="slaveCheckbox" > <widget class="QCheckBox" name="slaveCheckbox" >
<property name="text" > <property name="text" >
<string>_("Play another media synchronously (extra audio file, ...)")</string> <string>_("Play another media synchronously (extra audio file, ...)")</string>
...@@ -143,10 +143,10 @@ ...@@ -143,10 +143,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1" colspan="4" > <item row="3" column="2" colspan="4" >
<widget class="QLineEdit" name="slaveText" /> <widget class="QLineEdit" name="slaveText" />
</item> </item>
<item row="3" column="5" colspan="2" > <item row="3" column="6" colspan="2" >
<widget class="QPushButton" name="slaveBrowseButton" > <widget class="QPushButton" name="slaveBrowseButton" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Select the file")</string> <string>_("Select the file")</string>
...@@ -156,26 +156,40 @@ ...@@ -156,26 +156,40 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1" colspan="6" > <item row="4" column="2" colspan="6" >
<widget class="Line" name="line" /> <widget class="Line" name="line" />
</item> </item>
<item row="5" column="0" > <item row="5" column="0" >
<widget class="QLabel" name="advancedLabel" > <widget class="QLabel" name="advancedLabel" >
<property name="text" > <property name="text" >
<string>_("Customize")</string> <string>_("MRL")</string>
</property> </property>
<property name="buddy" > <property name="buddy" >
<cstring>advancedLineInput</cstring> <cstring>advancedLineInput</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1" colspan="6" > <item row="5" column="2" colspan="6" >
<widget class="QLineEdit" name="mrlLine" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="2" colspan="6" >
<widget class="QLineEdit" name="advancedLineInput" > <widget class="QLineEdit" name="advancedLineInput" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Complete MRL for VLC internal")</string> <string>_("Complete MRL for VLC internal")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>_("Edit Options")</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
...@@ -252,22 +266,6 @@ ...@@ -252,22 +266,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="4" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
...@@ -278,7 +276,6 @@ ...@@ -278,7 +276,6 @@
<tabstop>slaveCheckbox</tabstop> <tabstop>slaveCheckbox</tabstop>
<tabstop>slaveText</tabstop> <tabstop>slaveText</tabstop>
<tabstop>slaveBrowseButton</tabstop> <tabstop>slaveBrowseButton</tabstop>
<tabstop>advancedLineInput</tabstop>
<tabstop>playButton</tabstop> <tabstop>playButton</tabstop>
<tabstop>menuButton</tabstop> <tabstop>menuButton</tabstop>
<tabstop>buttonsBox</tabstop> <tabstop>buttonsBox</tabstop>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>358</width> <width>365</width>
<height>177</height> <height>129</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>20</width> <width>20</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
......
...@@ -6,20 +6,32 @@ ...@@ -6,20 +6,32 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>537</width> <width>521</width>
<height>423</height> <height>336</height>
</rect> </rect>
</property> </property>
<property name="minimumSize" >
<size>
<width>500</width>
<height>0</height>
</size>
</property>
<property name="windowTitle" > <property name="windowTitle" >
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
<item> <item>
<widget class="QGroupBox" name="diskGroupBox" > <widget class="QGroupBox" name="diskGroupBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" > <property name="title" >
<string>_("Disc Selection")</string> <string>_("Disc Type Selection")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
...@@ -46,7 +58,7 @@ ...@@ -46,7 +58,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2" colspan="2" > <item row="0" column="2" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -59,7 +71,14 @@ ...@@ -59,7 +71,14 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="6" > <item row="0" column="3" >
<widget class="QRadioButton" name="audioCDRadioButton" >
<property name="text" >
<string>_("Audio CD")</string>
</property>
</widget>
</item>
<item row="0" column="4" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -72,7 +91,14 @@ ...@@ -72,7 +91,14 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="9" > <item row="0" column="5" colspan="3" >
<widget class="QRadioButton" name="vcdRadioButton" >
<property name="text" >
<string>SVCD/VCD</string>
</property>
</widget>
</item>
<item row="0" column="8" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -95,14 +121,7 @@ ...@@ -95,14 +121,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2" colspan="8" > <item row="3" column="0" colspan="2" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<widget class="QLabel" name="deviceLabel" > <widget class="QLabel" name="deviceLabel" >
<property name="text" > <property name="text" >
<string>_("Disc device")</string> <string>_("Disc device")</string>
...@@ -112,14 +131,27 @@ ...@@ -112,14 +131,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3" colspan="4" > <item row="2" column="2" colspan="7" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="2" colspan="4" >
<widget class="QComboBox" name="deviceCombo" > <widget class="QComboBox" name="deviceCombo" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable" > <property name="editable" >
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="7" > <item row="3" column="6" >
<widget class="QToolButton" name="ejectButton" > <widget class="QToolButton" name="ejectButton" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Fixed" > <sizepolicy vsizetype="Minimum" hsizetype="Fixed" >
...@@ -129,7 +161,7 @@ ...@@ -129,7 +161,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="8" colspan="2" > <item row="3" column="7" colspan="2" >
<widget class="QPushButton" name="browseDiscButton" > <widget class="QPushButton" name="browseDiscButton" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" > <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
...@@ -142,21 +174,17 @@ ...@@ -142,21 +174,17 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4" >
<widget class="QRadioButton" name="audioCDRadioButton" >
<property name="text" >
<string>_("Audio CD")</string>
</property>
</widget>
</item>
<item row="0" column="8" >
<widget class="QRadioButton" name="vcdRadioButton" >
<property name="text" >
<string>SVCD/VCD</string>
</property>
</widget>
</item>
</layout> </layout>
<zorder>dvdRadioButton</zorder>
<zorder>dvdsimple</zorder>
<zorder>line</zorder>
<zorder>deviceLabel</zorder>
<zorder>deviceCombo</zorder>
<zorder>ejectButton</zorder>
<zorder>browseDiscButton</zorder>
<zorder>audioCDRadioButton</zorder>
<zorder>vcdRadioButton</zorder>
<zorder></zorder>
</widget> </widget>
</item> </item>
<item> <item>
...@@ -164,63 +192,73 @@ ...@@ -164,63 +192,73 @@
<property name="title" > <property name="title" >
<string>_("Starting Position")</string> <string>_("Starting Position")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QHBoxLayout" name="horizontalLayout" >
<item row="1" column="0" > <item>
<widget class="QLabel" name="chapterLabel" > <widget class="QLabel" name="titleLabel" >
<property name="text" > <property name="text" >
<string>_("Chapter")</string> <string>_("Title")</string>
</property> </property>
<property name="buddy" > <property name="buddy" >
<cstring>chapterSpin</cstring> <cstring>titleSpin</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item>
<widget class="QSpinBox" name="chapterSpin" > <widget class="QSpinBox" name="titleSpin" >
<property name="alignment" > <property name="sizePolicy" >
<set>Qt::AlignRight</set> <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
</property> <horstretch>0</horstretch>
<property name="suffix" > <verstretch>0</verstretch>
<string/> </sizepolicy>
</property> </property>
<property name="prefix" > <property name="autoFillBackground" >
<string/> <bool>false</bool>
</property> </property>
<property name="minimum" > <property name="alignment" >
<number>0</number> <set>Qt::AlignRight</set>
</property> </property>
<property name="value" > <property name="value" >
<number>0</number> <number>0</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item>
<widget class="QLabel" name="titleLabel" > <spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="chapterLabel" >
<property name="text" > <property name="text" >
<string>_("Title")</string> <string>_("Chapter")</string>
</property> </property>
<property name="buddy" > <property name="buddy" >
<cstring>titleSpin</cstring> <cstring>chapterSpin</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item>
<widget class="QSpinBox" name="titleSpin" > <widget class="QSpinBox" name="chapterSpin" >
<property name="autoFillBackground" > <property name="sizePolicy" >
<bool>false</bool> <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="alignment" > <property name="alignment" >
<set>Qt::AlignRight</set> <set>Qt::AlignRight</set>
</property> </property>
<property name="suffix" >
<string/>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>0</number>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
...@@ -231,65 +269,87 @@ ...@@ -231,65 +269,87 @@
<property name="title" > <property name="title" >
<string>_("Audio and Subtitles")</string> <string>_("Audio and Subtitles")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QHBoxLayout" name="horizontalLayout_2" >
<item row="1" column="0" > <item>
<widget class="QLabel" name="audioLabel" > <widget class="QLabel" name="subtitlesLabel" >
<property name="text" > <property name="text" >
<string>_("Audio track")</string> <string>_("Subtitles track")</string>
</property> </property>
<property name="buddy" > <property name="buddy" >
<cstring>audioSpin</cstring> <cstring>subtitlesSpin</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item>
<widget class="QSpinBox" name="audioSpin" > <widget class="QSpinBox" name="subtitlesSpin" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="autoFillBackground" >
<bool>false</bool>
</property>
<property name="alignment" > <property name="alignment" >
<set>Qt::AlignRight</set> <set>Qt::AlignRight</set>
</property> </property>
<property name="suffix" > <property name="suffix" >
<string/> <string/>
</property> </property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" > <property name="minimum" >
<number>-1</number> <number>-1</number>
</property> </property>
<property name="maximum" > <property name="maximum" >
<number>7</number> <number>31</number>
</property> </property>
<property name="value" > <property name="value" >
<number>-1</number> <number>-1</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item>
<widget class="QLabel" name="subtitlesLabel" > <spacer name="horizontalSpacer_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="audioLabel" >
<property name="text" > <property name="text" >
<string>_("Subtitles track")</string> <string>_("Audio track")</string>
</property> </property>
<property name="buddy" > <property name="buddy" >
<cstring>subtitlesSpin</cstring> <cstring>audioSpin</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item>
<widget class="QSpinBox" name="subtitlesSpin" > <widget class="QSpinBox" name="audioSpin" >
<property name="autoFillBackground" > <property name="sizePolicy" >
<bool>false</bool> <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="alignment" > <property name="alignment" >
<set>Qt::AlignRight</set> <set>Qt::AlignRight</set>
</property> </property>
<property name="suffix" >
<string/>
</property>
<property name="minimum" > <property name="minimum" >
<number>-1</number> <number>-1</number>
</property> </property>
<property name="maximum" > <property name="maximum" >
<number>31</number> <number>10</number>
</property> </property>
<property name="value" > <property name="value" >
<number>-1</number> <number>-1</number>
...@@ -310,7 +370,7 @@ ...@@ -310,7 +370,7 @@
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>181</width> <width>181</width>
<height>22</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -319,6 +379,8 @@ ...@@ -319,6 +379,8 @@
</widget> </widget>
<tabstops> <tabstops>
<tabstop>dvdRadioButton</tabstop> <tabstop>dvdRadioButton</tabstop>
<tabstop>audioCDRadioButton</tabstop>
<tabstop>vcdRadioButton</tabstop>
<tabstop>dvdsimple</tabstop> <tabstop>dvdsimple</tabstop>
<tabstop>deviceCombo</tabstop> <tabstop>deviceCombo</tabstop>
<tabstop>ejectButton</tabstop> <tabstop>ejectButton</tabstop>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>530</width> <width>519</width>
<height>216</height> <height>282</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -19,31 +19,67 @@ ...@@ -19,31 +19,67 @@
<property name="windowTitle" > <property name="windowTitle" >
<string>_("Open File")</string> <string>_("Open File")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QVBoxLayout" name="verticalLayout" >
<item row="0" column="0" > <item>
<widget class="QWidget" native="1" name="tempWidget" > <widget class="QGroupBox" name="tempWidget" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Choose one or more media file to open")</string> <string>_("Choose one or more media file to open")</string>
</property> </property>
</widget> <property name="title" >
</item> <string>_("Select one or more files")</string>
<item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <layout class="QGridLayout" name="gridLayout" >
<enum>QSizePolicy::Fixed</enum> <item rowspan="2" row="0" column="0" >
<widget class="QListWidget" name="fileListWidg" >
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>100</height>
</size>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="contextMenuPolicy" >
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="verticalScrollBarPolicy" >
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="horizontalScrollBarPolicy" >
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="editTriggers" >
<set>QAbstractItemView::AllEditTriggers</set>
</property>
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
<property name="selectionMode" >
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="selectionBehavior" >
<enum>QAbstractItemView::SelectItems</enum>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="fileBrowseButton" >
<property name="minimumSize" >
<size> <size>
<width>273</width> <width>100</width>
<height>16</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> <property name="toolTip" >
<string>_("Select the subtitles file")</string>
</property>
<property name="text" >
<string>_("Browse...")</string>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item row="2" column="0" > <item>
<widget class="QCheckBox" name="subCheckBox" > <widget class="QCheckBox" name="subCheckBox" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Add a subtitles file")</string> <string>_("Add a subtitles file")</string>
...@@ -53,7 +89,7 @@ ...@@ -53,7 +89,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" > <item>
<widget class="QFrame" name="subFrame" > <widget class="QFrame" name="subFrame" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" > <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
...@@ -64,7 +100,7 @@ ...@@ -64,7 +100,7 @@
<property name="frameShape" > <property name="frameShape" >
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" name="gridLayout_2" >
<item row="1" column="0" > <item row="1" column="0" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
...@@ -78,6 +114,32 @@ ...@@ -78,6 +114,32 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="3" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>30</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="7" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QLabel" name="sizeSubLabel" > <widget class="QLabel" name="sizeSubLabel" >
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -89,6 +151,9 @@ ...@@ -89,6 +151,9 @@
<property name="text" > <property name="text" >
<string>_("Size:")</string> <string>_("Size:")</string>
</property> </property>
<property name="buddy" >
<cstring>sizeSubComboBox</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="2" > <item row="1" column="2" >
...@@ -101,19 +166,6 @@ ...@@ -101,19 +166,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>30</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4" > <item row="1" column="4" >
<widget class="QLabel" name="alignSubLabel" > <widget class="QLabel" name="alignSubLabel" >
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -125,9 +177,12 @@ ...@@ -125,9 +177,12 @@
<property name="text" > <property name="text" >
<string>_("Alignment:")</string> <string>_("Alignment:")</string>
</property> </property>
<property name="buddy" >
<cstring>alignSubComboBox</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="5" > <item row="1" column="5" colspan="2" >
<widget class="QComboBox" name="alignSubComboBox" > <widget class="QComboBox" name="alignSubComboBox" >
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
...@@ -137,37 +192,11 @@ ...@@ -137,37 +192,11 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="6" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="6" > <item row="0" column="0" colspan="6" >
<widget class="QLineEdit" name="subInput" > <widget class="QLineEdit" name="subInput" />
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
<item row="0" column="6" colspan="2" > <item row="0" column="6" colspan="2" >
<widget class="QPushButton" name="subBrowseButton" > <widget class="QPushButton" name="subBrowseButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>100</width> <width>100</width>
...@@ -185,9 +214,27 @@ ...@@ -185,9 +214,27 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>273</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>fileListWidg</tabstop>
<tabstop>fileBrowseButton</tabstop>
<tabstop>subCheckBox</tabstop> <tabstop>subCheckBox</tabstop>
<tabstop>subInput</tabstop> <tabstop>subInput</tabstop>
<tabstop>subBrowseButton</tabstop> <tabstop>subBrowseButton</tabstop>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>431</width> <width>409</width>
<height>233</height> <height>137</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
...@@ -89,31 +89,6 @@ ...@@ -89,31 +89,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>_("Options")</string>
</property>
<layout class="QHBoxLayout" >
<item>
<widget class="QCheckBox" name="timeShift" >
<property name="toolTip" >
<string/>
</property>
<property name="text" >
<string>_("Allow timeshifting")</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
...@@ -136,7 +111,6 @@ ...@@ -136,7 +111,6 @@
<tabstop>protocolCombo</tabstop> <tabstop>protocolCombo</tabstop>
<tabstop>addressText</tabstop> <tabstop>addressText</tabstop>
<tabstop>portSpin</tabstop> <tabstop>portSpin</tabstop>
<tabstop>timeShift</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>
......
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