1 /*****************************************************************************
2 * open.cpp : Panels for the open dialogs
3 ****************************************************************************
4 * Copyright (C) 2006-2009 the VideoLAN team
5 * Copyright (C) 2007 Société des arts technologiques
6 * Copyright (C) 2007 Savoir-faire Linux
10 * Authors: Clément Stenac <zorglub@videolan.org>
11 * Jean-Baptiste Kempf <jb@videolan.org>
12 * Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
27 *****************************************************************************/
34 #include "components/open_panels.hpp"
35 #include "dialogs/open.hpp"
36 #include "dialogs_provider.hpp" /* Open Subtitle file */
37 #include "util/qt_dirs.hpp"
38 #include <vlc_intf_strings.h>
39 #include <vlc_modules.h>
41 #include <vlc_charset.h> /* FromWide for Win32 */
44 #include <QFileDialog>
45 #include <QDialogButtonBox>
47 #include <QStackedLayout>
51 #include <QScrollArea>
53 #include <QStringListModel>
56 #define I_DEVICE_TOOLTIP \
57 I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
58 N_("Select a device or a VIDEO_TS folder") )
60 /* Populate a combobox with the devices matching a pattern.
61 Combobox will automatically do autocompletion on the edit zone */
62 #define POPULATE_WITH_DEVS(ppsz_devlist, targetCombo) \
63 QStringList targetCombo ## StringList = QStringList(); \
64 for ( int i = 0; i< sizeof(ppsz_devlist) / sizeof(*ppsz_devlist); i++ ) \
65 targetCombo ## StringList << QString( ppsz_devlist[ i ] ); \
66 targetCombo->addItems( QDir( "/dev/" )\
67 .entryList( targetCombo ## StringList, QDir::System )\
68 .replaceInStrings( QRegExp("^"), "/dev/" ) \
71 static const char psz_devModule[][8] = { "v4l2", "pvr", "dtv", "bda",
72 "dshow", "screen", "jack" };
74 /**************************************************************************
75 * Open Files and subtitles *
76 **************************************************************************/
77 FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
78 OpenPanel( _parent, _p_intf ), dialogBox( NULL )
80 /* Classic UI Setup */
83 setAcceptDrops( true );
85 /* Set Filters for file selection */
86 /* QString fileTypes = "";
87 ADD_FILTER_MEDIA( fileTypes );
88 ADD_FILTER_VIDEO( fileTypes );
89 ADD_FILTER_AUDIO( fileTypes );
90 ADD_FILTER_PLAYLIST( fileTypes );
91 ADD_FILTER_ALL( fileTypes );
92 fileTypes.replace( QString(";*"), QString(" *")); */
95 /* lineFileEdit = ui.fileEdit;
96 //TODO later: fill the fileCompleteList with previous items played.
97 QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
98 fileCompleter->setModel( new QDirModel( fileCompleter ) );
99 lineFileEdit->setCompleter( fileCompleter );*/
100 if( var_InheritBool( p_intf, "qt-embedded-open" ) )
102 ui.tempWidget->hide();
107 /* Deactivate the subtitles control by default. */
108 ui.subFrame->setEnabled( false );
109 /* Build the subs size combo box */
110 setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf,
111 ui.sizeSubComboBox );
112 /* Build the subs align combo box */
113 setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox );
116 BUTTONACT( ui.fileBrowseButton, browseFile() );
117 BUTTONACT( ui.removeFileButton, removeFile() );
119 BUTTONACT( ui.subBrowseButton, browseFileSub() );
120 CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) );
122 CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() );
123 CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() );
124 CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() );
125 CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() );
129 inline void FileOpenPanel::BuildOldPanel()
131 /** BEGIN QFileDialog tweaking **/
132 /* Use a QFileDialog and customize it because we don't want to
133 rewrite it all. Be careful to your eyes cause there are a few hacks.
134 Be very careful and test correctly when you modify this. */
136 /* Make this QFileDialog a child of tempWidget from the ui. */
137 dialogBox = new FileOpenBox( ui.tempWidget, NULL,
138 p_intf->p_sys->filepath, "" );
140 dialogBox->setFileMode( QFileDialog::ExistingFiles );
141 dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
142 dialogBox->restoreState(
143 getSettings()->value( "file-dialog-state" ).toByteArray() );
145 /* We don't want to see a grip in the middle of the window, do we? */
146 dialogBox->setSizeGripEnabled( false );
149 dialogBox->setToolTip( qtr( "Select one or multiple files" ) );
150 dialogBox->setMinimumHeight( 250 );
152 // But hide the two OK/Cancel buttons. Enable them for debug.
153 QDialogButtonBox *fileDialogAcceptBox =
154 dialogBox->findChildren<QDialogButtonBox*>()[0];
155 fileDialogAcceptBox->hide();
157 /* Ugly hacks to get the good Widget */
158 //This lineEdit is the normal line in the fileDialog.
159 QLineEdit *lineFileEdit = dialogBox->findChildren<QLineEdit*>()[0];
160 /* Make a list of QLabel inside the QFileDialog to access the good ones */
161 QList<QLabel *> listLabel = dialogBox->findChildren<QLabel*>();
163 /* Hide the FileNames one. Enable it for debug */
164 listLabel[1]->setText( qtr( "File names:" ) );
165 /* Change the text that was uncool in the usual box */
166 listLabel[2]->setText( qtr( "Filter:" ) );
168 dialogBox->layout()->setMargin( 0 );
169 dialogBox->layout()->setSizeConstraint( QLayout::SetNoConstraint );
171 /** END of QFileDialog tweaking **/
173 // Add the DialogBox to the layout
174 ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
176 CONNECT( lineFileEdit, textChanged( const QString& ), this, updateMRL() );
177 dialogBox->installEventFilter( this );
180 FileOpenPanel::~FileOpenPanel()
183 getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
186 void FileOpenPanel::dragEnterEvent( QDragEnterEvent *event )
188 event->acceptProposedAction();
191 void FileOpenPanel::dragMoveEvent( QDragMoveEvent *event )
193 event->acceptProposedAction();
196 void FileOpenPanel::dragLeaveEvent( QDragLeaveEvent *event )
201 void FileOpenPanel::dropEvent( QDropEvent *event )
203 if( event->possibleActions() & Qt::CopyAction )
204 event->setDropAction( Qt::CopyAction );
208 const QMimeData *mimeData = event->mimeData();
209 foreach( const QUrl &url, mimeData->urls() )
213 QListWidgetItem *item = new QListWidgetItem(
214 toNativeSeparators( url.toLocalFile() ),
216 item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
217 ui.fileListWidg->addItem( item );
225 void FileOpenPanel::browseFile()
227 QStringList files = QFileDialog::getOpenFileNames( this, qtr( "Select one or multiple files" ), p_intf->p_sys->filepath) ;
228 foreach( const QString &file, files )
230 QListWidgetItem *item =
231 new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
232 item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
233 ui.fileListWidg->addItem( item );
234 savedirpathFromFile( file );
240 void FileOpenPanel::removeFile()
242 int i = ui.fileListWidg->currentRow();
245 QListWidgetItem *temp = ui.fileListWidg->takeItem( i );
253 /* Show a fileBrowser to select a subtitle */
254 void FileOpenPanel::browseFileSub()
256 // TODO Handle selection of more than one subtitles file
257 QStringList files = THEDP->showSimpleOpen( qtr("Open subtitles file"),
258 EXT_FILTER_SUBTITLE, p_intf->p_sys->filepath );
260 if( files.isEmpty() ) return;
261 ui.subInput->setText( toNativeSeparators( files.join(" ") ) );
265 void FileOpenPanel::toggleSubtitleFrame( bool b )
267 ui.subFrame->setEnabled( b );
274 /* Update the current MRL */
275 void FileOpenPanel::updateMRL()
277 QStringList fileList;
281 if( dialogBox == NULL )
282 for( int i = 0; i < ui.fileListWidg->count(); i++ )
284 if( !ui.fileListWidg->item( i )->text().isEmpty() )
285 fileList << toURI(ui.fileListWidg->item( i )->text());
289 fileList = dialogBox->selectedFiles();
290 for( int i = 0; i < fileList.count(); i++ )
291 fileList[i] = toURI( fileList[i] );
295 if( ui.subCheckBox->isChecked() && !ui.subInput->text().isEmpty() ) {
296 mrl.append( " :sub-file=" + colon_escape( ui.subInput->text() ) );
297 int align = ui.alignSubComboBox->itemData(
298 ui.alignSubComboBox->currentIndex() ).toInt();
299 mrl.append( " :subsdec-align=" + QString().setNum( align ) );
300 int size = ui.sizeSubComboBox->itemData(
301 ui.sizeSubComboBox->currentIndex() ).toInt();
302 mrl.append( " :freetype-rel-fontsize=" + QString().setNum( size ) );
305 emit mrlUpdated( fileList, mrl );
306 emit methodChanged( "file-caching" );
309 /* Function called by Open Dialog when clicke on Play/Enqueue */
310 void FileOpenPanel::accept()
313 p_intf->p_sys->filepath = dialogBox->directory().absolutePath();
314 ui.fileListWidg->clear();
317 /* Function called by Open Dialog when clicked on cancel */
318 void FileOpenPanel::clear()
320 ui.fileListWidg->clear();
321 ui.subInput->clear();
324 /* Update buttons depending on current selection */
325 void FileOpenPanel::updateButtons()
327 bool b_has_files = ( ui.fileListWidg->count() > 0 );
328 ui.removeFileButton->setEnabled( b_has_files );
329 ui.subCheckBox->setEnabled( b_has_files );
332 /**************************************************************************
333 * Open Discs ( DVD, CD, VCD and similar devices ) *
334 **************************************************************************/
335 DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
336 OpenPanel( _parent, _p_intf )
340 /* Get the default configuration path for the devices */
341 psz_dvddiscpath = var_InheritString( p_intf, "dvd" );
342 psz_vcddiscpath = var_InheritString( p_intf, "vcd" );
343 psz_cddadiscpath = var_InheritString( p_intf, "cd-audio" );
345 /* State to avoid overwritting the users changes with the configuration */
348 ui.browseDiscButton->setToolTip( qtr( I_DEVICE_TOOLTIP ));
349 ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) );
351 #ifdef WIN32 /* Disc drives probing for Windows */
352 wchar_t szDrives[512];
354 if( GetLogicalDriveStringsW( sizeof( szDrives ) - 1, szDrives ) )
356 wchar_t *drive = szDrives;
357 UINT oldMode = SetErrorMode( SEM_FAILCRITICALERRORS );
360 if( GetDriveTypeW(drive) == DRIVE_CDROM )
362 wchar_t psz_name[512] = L"";
363 GetVolumeInformationW( drive, psz_name, 511, NULL, NULL, NULL, NULL, 0 );
365 QString displayName = FromWide( drive );
366 if( !EMPTY_STR(psz_name) ) {
367 displayName = displayName + " - " + FromWide( psz_name );
370 ui.deviceCombo->addItem( displayName, FromWide( drive ) );
373 /* go to next drive */
376 SetErrorMode(oldMode);
379 char const * const ppsz_discdevices[] = {
386 QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
387 POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
391 BUTTONACT( ui.dvdRadioButton, updateButtons() );
392 BUTTONACT( ui.vcdRadioButton, updateButtons() );
393 BUTTONACT( ui.audioCDRadioButton, updateButtons() );
394 BUTTONACT( ui.dvdsimple, updateButtons() );
395 BUTTONACT( ui.browseDiscButton, browseDevice() );
396 BUTTON_SET_ACT_I( ui.ejectButton, "", toolbar/eject, qtr( "Eject the disc" ),
399 CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
400 CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
401 CONNECT( ui.chapterSpin, valueChanged( int ), this, updateMRL());
402 CONNECT( ui.audioSpin, valueChanged( int ), this, updateMRL());
403 CONNECT( ui.subtitlesSpin, valueChanged( int ), this, updateMRL());
405 /* Run once the updateButtons function in order to fill correctly the comboBoxes */
409 DiscOpenPanel::~DiscOpenPanel()
411 free( psz_dvddiscpath );
412 free( psz_vcddiscpath );
413 free( psz_cddadiscpath );
416 void DiscOpenPanel::clear()
418 ui.titleSpin->setValue( 0 );
419 ui.chapterSpin->setValue( 0 );
420 ui.subtitlesSpin->setValue( -1 );
421 ui.audioSpin->setValue( -1 );
426 #define setDrive( psz_name ) {\
427 int index = ui.deviceCombo->findText( qfu( psz_name ) ); \
428 if( index != -1 ) ui.deviceCombo->setCurrentIndex( index );}
430 #define setDrive( psz_name ) {\
431 ui.deviceCombo->setEditText( qfu( psz_name ) ); }
434 /* update the buttons according the type of device */
435 void DiscOpenPanel::updateButtons()
437 if ( ui.dvdRadioButton->isChecked() )
439 if( m_discType != Dvd )
441 setDrive( psz_dvddiscpath );
444 ui.titleLabel->setText( qtr("Title") );
445 ui.chapterLabel->show();
446 ui.chapterSpin->show();
447 ui.diskOptionBox_2->show();
448 ui.dvdsimple->setEnabled( true );
450 else if ( ui.vcdRadioButton->isChecked() )
452 if( m_discType != Vcd )
454 setDrive( psz_vcddiscpath );
457 ui.titleLabel->setText( qtr("Entry") );
458 ui.chapterLabel->hide();
459 ui.chapterSpin->hide();
460 ui.diskOptionBox_2->show();
461 ui.dvdsimple->setEnabled( false );
465 if( m_discType != Cdda )
467 setDrive( psz_cddadiscpath );
470 ui.titleLabel->setText( qtr("Track") );
471 ui.chapterLabel->hide();
472 ui.chapterSpin->hide();
473 ui.diskOptionBox_2->hide();
474 ui.dvdsimple->setEnabled( false );
483 # define LOCALHOST ""
485 # define LOCALHOST "/"
488 /* Update the current MRL */
489 void DiscOpenPanel::updateMRL()
493 QStringList fileList;
495 if( ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ) != QVariant::Invalid )
496 discPath = ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ).toString();
498 discPath = ui.deviceCombo->currentText();
500 /* CDDAX and VCDX not implemented. TODO ? No. */
502 if( ui.dvdRadioButton->isChecked() ) {
503 if( !ui.dvdsimple->isChecked() )
504 mrl = "dvd://" LOCALHOST + discPath;
506 mrl = "dvdsimple://" LOCALHOST + discPath;
508 if( !ui.dvdsimple->isChecked() )
509 emit methodChanged( "dvdnav-caching" );
511 emit methodChanged( "dvdread-caching" );
513 if ( ui.titleSpin->value() > 0 ) {
514 mrl += QString("@%1").arg( ui.titleSpin->value() );
515 if ( ui.chapterSpin->value() > 0 ) {
516 mrl+= QString(":%1").arg( ui.chapterSpin->value() );
521 } else if ( ui.vcdRadioButton->isChecked() ) {
522 mrl = "vcd://" LOCALHOST + discPath;
523 emit methodChanged( "vcd-caching" );
525 if( ui.titleSpin->value() > 0 ) {
526 mrl += QString("@E%1").arg( ui.titleSpin->value() );
531 mrl = "cdda://" LOCALHOST + discPath;
532 emit methodChanged( "cdda-caching" );
535 fileList << mrl; mrl = "";
537 if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
539 if ( ui.audioSpin->value() >= 0 ) {
540 mrl += " :audio-track=" +
541 QString("%1").arg( ui.audioSpin->value() );
543 if ( ui.subtitlesSpin->value() >= 0 ) {
544 mrl += " :sub-track=" +
545 QString("%1").arg( ui.subtitlesSpin->value() );
550 if( ui.titleSpin->value() > 0 )
551 mrl += QString(" :cdda-track=%1").arg( ui.titleSpin->value() );
553 emit mrlUpdated( fileList, mrl );
556 void DiscOpenPanel::browseDevice()
558 QString dir = QFileDialog::getExistingDirectory( this,
559 qtr( I_DEVICE_TOOLTIP ) );
561 ui.deviceCombo->setEditText( toNativeSepNoSlash( dir ) );
566 void DiscOpenPanel::eject()
568 intf_Eject( p_intf, qtu( ui.deviceCombo->currentText() ) );
571 void DiscOpenPanel::accept()
574 /**************************************************************************
575 * Open Network streams and URL pages *
576 **************************************************************************/
577 NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
578 OpenPanel( _parent, _p_intf )
583 CONNECT( ui.urlComboBox->lineEdit(), textChanged( const QString& ), this, updateMRL());
584 CONNECT( ui.urlComboBox, currentIndexChanged( const QString& ), this, updateMRL());
586 if( var_InheritBool( p_intf, "qt-recentplay" ) )
588 mrlList = new QStringListModel(
589 getSettings()->value( "Open/netMRL" ).toStringList() );
590 ui.urlComboBox->setModel( mrlList );
591 ui.urlComboBox->clearEditText();
592 CONNECT( ui.urlComboBox->lineEdit(), editingFinished(), this, updateModel() );
597 ui.urlComboBox->setValidator( new UrlValidator( this ) );
598 ui.urlComboBox->setFocus();
601 NetOpenPanel::~NetOpenPanel()
603 if( !mrlList ) return;
605 QStringList tempL = mrlList->stringList();
606 while( tempL.size() > 8 ) tempL.removeFirst();
608 getSettings()->setValue( "Open/netMRL", tempL );
613 void NetOpenPanel::clear()
616 void NetOpenPanel::onFocus()
618 ui.urlComboBox->setFocus();
619 ui.urlComboBox->lineEdit()->selectAll();
622 static int strcmp_void( const void *k, const void *e )
624 return strcmp( (const char *)k, (const char *)e );
627 void NetOpenPanel::updateMRL()
629 static const struct caching_map
634 { /* KEEP alphabetical order on first column!! */
652 QString url = ui.urlComboBox->lineEdit()->text();
653 if( !url.contains( "://") )
654 return; /* nothing to do this far */
656 /* Match the correct item in the comboBox */
657 QString proto = url.section( ':', 0, 0 );
658 const struct caching_map *r = (const struct caching_map *)
659 bsearch( qtu(proto), schemes, sizeof(schemes) / sizeof(schemes[0]),
660 sizeof(schemes[0]), strcmp_void );
662 emit methodChanged( qfu( r->caching ) + qfu( "-caching" ) );
666 emit mrlUpdated( qsl, "" );
669 void NetOpenPanel::updateModel()
672 QStringList tempL = mrlList->stringList();
673 if( !tempL.contains( ui.urlComboBox->lineEdit()->text() ) )
674 tempL.append( ui.urlComboBox->lineEdit()->text() );
675 mrlList->setStringList( tempL );
678 void UrlValidator::fixup( QString& str ) const
683 QValidator::State UrlValidator::validate( QString& str, int& pos ) const
685 if( str.contains( ' ' ) )
686 return QValidator::Invalid;
687 if( !str.contains( "://" ) )
688 return QValidator::Intermediate;
689 return QValidator::Acceptable;
692 /**************************************************************************
693 * Open Capture device ( DVB, PVR, V4L, and similar ) *
694 **************************************************************************/
695 CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
696 OpenPanel( _parent, _p_intf )
698 isInitialized = false;
701 void CaptureOpenPanel::initialize()
703 if( isInitialized ) return;
705 msg_Dbg( p_intf, "Initialization of Capture device panel" );
706 isInitialized = true;
710 BUTTONACT( ui.advancedButton, advancedDialog() );
712 /* Create two stacked layouts in the main comboBoxes */
713 QStackedLayout *stackedDevLayout = new QStackedLayout;
714 ui.cardBox->setLayout( stackedDevLayout );
716 QStackedLayout *stackedPropLayout = new QStackedLayout;
717 ui.optionsBox->setLayout( stackedPropLayout );
719 /* Creation and connections of the WIdgets in the stacked layout */
720 #define addModuleAndLayouts( number, name, label, layout ) \
721 QWidget * name ## DevPage = new QWidget( this ); \
722 QWidget * name ## PropPage = new QWidget( this ); \
723 stackedDevLayout->addWidget( name ## DevPage ); \
724 stackedPropLayout->addWidget( name ## PropPage ); \
725 layout * name ## DevLayout = new layout; \
726 layout * name ## PropLayout = new layout; \
727 name ## DevPage->setLayout( name ## DevLayout ); \
728 name ## PropPage->setLayout( name ## PropLayout ); \
729 ui.deviceCombo->addItem( qtr( label ), QVariant( number ) );
731 #define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
734 /*********************
735 * DirectShow Stuffs *
736 *********************/
737 if( module_exists( "dshow" ) ){
738 addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow", QGridLayout );
742 module_config_t *p_config =
743 config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
744 vdevDshowW = new StringListConfigControl(
745 VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
748 p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
749 adevDshowW = new StringListConfigControl(
750 VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
753 /* dshow Properties */
754 QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) );
755 dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 );
757 dshowVSizeLine = new QLineEdit;
758 dshowPropLayout->addWidget( dshowVSizeLine, 0, 1);
759 dshowPropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
763 CuMRL( vdevDshowW->combo, currentIndexChanged ( int ) );
764 CuMRL( adevDshowW->combo, currentIndexChanged ( int ) );
765 CuMRL( dshowVSizeLine, textChanged( const QString& ) );
771 if( module_exists( "bda" ) ){
772 addModuleAndLayouts( BDA_DEVICE, bda, "DVB DirectShow", QGridLayout );
775 QLabel *bdaTypeLabel = new QLabel( qtr( "Delivery system:" ) );
777 bdas = new QRadioButton( "DVB-S" );
778 bdas->setChecked( true );
779 bdac = new QRadioButton( "DVB-C" );
780 bdat = new QRadioButton( "DVB-T" );
781 bdaa = new QRadioButton( "ATSC" );
782 bdaq = new QRadioButton( "Clear QAM" );
784 bdaDevLayout->addWidget( bdaTypeLabel, 0, 0 );
785 bdaDevLayout->addWidget( bdas, 0, 1 );
786 bdaDevLayout->addWidget( bdac, 0, 2 );
787 bdaDevLayout->addWidget( bdat, 0, 3 );
788 bdaDevLayout->addWidget( bdaa, 0, 4 );
789 bdaDevLayout->addWidget( bdaq, 0, 5 );
792 QLabel *bdaFreqLabel =
793 new QLabel( qtr( "Transponder/multiplex frequency" ) );
794 bdaPropLayout->addWidget( bdaFreqLabel, 0, 0 );
796 bdaFreq = new QSpinBox;
797 bdaFreq->setAlignment( Qt::AlignRight );
798 bdaFreq->setSuffix(" kHz");
799 bdaFreq->setSingleStep( 1000 );
800 setSpinBoxFreq( bdaFreq )
801 bdaPropLayout->addWidget( bdaFreq, 0, 1 );
803 bdaSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) );
804 bdaPropLayout->addWidget( bdaSrateLabel, 1, 0 );
806 bdaSrate = new QSpinBox;
807 bdaSrate->setAlignment( Qt::AlignRight );
808 bdaSrate->setSuffix(" kHz");
809 setSpinBoxFreq( bdaSrate );
810 bdaPropLayout->addWidget( bdaSrate, 1, 1 );
812 bdaBandLabel = new QLabel( qtr( "Bandwidth" ) );
813 bdaPropLayout->addWidget( bdaBandLabel, 2, 0 );
815 bdaBandBox = new QComboBox;
816 setfillVLCConfigCombo( "dvb-bandwidth", p_intf, bdaBandBox );
817 bdaPropLayout->addWidget( bdaBandBox, 2, 1 );
819 bdaBandLabel->hide();
821 bdaPropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
825 CuMRL( bdaFreq, valueChanged ( int ) );
826 CuMRL( bdaSrate, valueChanged ( int ) );
827 CuMRL( bdaBandBox, currentIndexChanged ( int ) );
828 BUTTONACT( bdas, updateButtons() );
829 BUTTONACT( bdat, updateButtons() );
830 BUTTONACT( bdac, updateButtons() );
831 BUTTONACT( bdaa, updateButtons() );
832 BUTTONACT( bdaq, updateButtons() );
833 BUTTONACT( bdas, updateMRL() );
834 BUTTONACT( bdat, updateMRL() );
835 BUTTONACT( bdac, updateMRL() );
836 BUTTONACT( bdaa, updateMRL() );
837 BUTTONACT( bdaq, updateMRL() );
844 if( module_exists( "v4l2" ) ){
845 addModuleAndLayouts( V4L2_DEVICE, v4l2, "Video for Linux 2", QGridLayout );
847 char const * const ppsz_v4lvdevices[] = {
851 char const * const ppsz_v4ladevices[] = {
857 QLabel *v4l2VideoDeviceLabel = new QLabel( qtr( "Video device name" ) );
858 v4l2DevLayout->addWidget( v4l2VideoDeviceLabel, 0, 0 );
860 v4l2VideoDevice = new QComboBox( this );
861 v4l2VideoDevice->setEditable( true );
862 POPULATE_WITH_DEVS( ppsz_v4lvdevices, v4l2VideoDevice );
863 v4l2VideoDevice->clearEditText();
864 v4l2DevLayout->addWidget( v4l2VideoDevice, 0, 1 );
866 QLabel *v4l2AudioDeviceLabel = new QLabel( qtr( "Audio device name" ) );
867 v4l2DevLayout->addWidget( v4l2AudioDeviceLabel, 1, 0 );
869 v4l2AudioDevice = new QComboBox( this );
870 v4l2AudioDevice->setEditable( true );
871 POPULATE_WITH_DEVS( ppsz_v4ladevices, v4l2AudioDevice );
872 v4l2AudioDevice->clearEditText();
873 v4l2DevLayout->addWidget( v4l2AudioDevice, 1, 1 );
875 /* v4l2 Props panel */
876 QLabel *v4l2StdLabel = new QLabel( qtr( "Video standard" ) );
877 v4l2PropLayout->addWidget( v4l2StdLabel, 0 , 0 );
879 v4l2StdBox = new QComboBox;
880 setfillVLCConfigCombo( "v4l2-standard", p_intf, v4l2StdBox );
881 v4l2PropLayout->addWidget( v4l2StdBox, 0 , 1 );
882 v4l2PropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
886 CuMRL( v4l2VideoDevice->lineEdit(), textChanged( const QString& ) );
887 CuMRL( v4l2VideoDevice, currentIndexChanged ( int ) );
888 CuMRL( v4l2AudioDevice->lineEdit(), textChanged( const QString& ) );
889 CuMRL( v4l2AudioDevice, currentIndexChanged ( int ) );
890 CuMRL( v4l2StdBox, currentIndexChanged ( int ) );
896 if( module_exists( "jack" ) ){
897 addModuleAndLayouts( JACK_DEVICE, jack, "JACK Audio Connection Kit",
900 /* Jack Main panel */
902 QLabel *jackChannelsLabel = new QLabel( qtr( "Channels:" ) );
903 jackDevLayout->addWidget( jackChannelsLabel, 1, 0 );
905 jackChannels = new QSpinBox;
906 setSpinBoxFreq( jackChannels );
907 jackChannels->setMaximum(255);
908 jackChannels->setValue(2);
909 jackChannels->setAlignment( Qt::AlignRight );
910 jackDevLayout->addWidget( jackChannels, 1, 1 );
913 QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports:" ) );
914 jackDevLayout->addWidget( jackPortsLabel, 0 , 0 );
916 jackPortsSelected = new QLineEdit( qtr( ".*") );
917 jackPortsSelected->setAlignment( Qt::AlignRight );
918 jackDevLayout->addWidget( jackPortsSelected, 0, 1 );
920 /* Jack Props panel */
923 QLabel *jackCachingLabel = new QLabel( qtr( "Input caching:" ) );
924 jackPropLayout->addWidget( jackCachingLabel, 1 , 0 );
925 jackCaching = new QSpinBox;
926 setSpinBoxFreq( jackCaching );
927 jackCaching->setSuffix( " ms" );
928 jackCaching->setValue(1000);
929 jackCaching->setAlignment( Qt::AlignRight );
930 jackPropLayout->addWidget( jackCaching, 1 , 2 );
933 jackPace = new QCheckBox(qtr( "Use VLC pace" ));
934 jackPropLayout->addWidget( jackPace, 2, 1 );
937 jackConnect = new QCheckBox( qtr( "Auto connection" ));
938 jackPropLayout->addWidget( jackConnect, 2, 2 );
941 CuMRL( jackChannels, valueChanged( int ) );
942 CuMRL( jackCaching, valueChanged( int ) );
943 CuMRL( jackPace, stateChanged( int ) );
944 CuMRL( jackConnect, stateChanged( int ) );
945 CuMRL( jackPortsSelected, textChanged( const QString& ) );
951 if( module_exists( "pvr" ) ){
952 addModuleAndLayouts( PVR_DEVICE, pvr, "PVR", QGridLayout );
955 QLabel *pvrDeviceLabel = new QLabel( qtr( "Device name" ) );
956 pvrDevLayout->addWidget( pvrDeviceLabel, 0, 0 );
958 pvrDevice = new QLineEdit;
959 pvrDevLayout->addWidget( pvrDevice, 0, 1 );
961 QLabel *pvrRadioDeviceLabel = new QLabel( qtr( "Radio device name" ) );
962 pvrDevLayout->addWidget( pvrRadioDeviceLabel, 1, 0 );
964 pvrRadioDevice = new QLineEdit;
965 pvrDevLayout->addWidget( pvrRadioDevice, 1, 1 );
967 /* PVR props panel */
968 QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) );
969 pvrPropLayout->addWidget( pvrNormLabel, 0, 0 );
971 pvrNormBox = new QComboBox;
972 setfillVLCConfigCombo( "pvr-norm", p_intf, pvrNormBox );
973 pvrPropLayout->addWidget( pvrNormBox, 0, 1 );
975 QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) );
976 pvrPropLayout->addWidget( pvrFreqLabel, 1, 0 );
978 pvrFreq = new QSpinBox;
979 pvrFreq->setAlignment( Qt::AlignRight );
980 pvrFreq->setSuffix(" kHz");
981 setSpinBoxFreq( pvrFreq );
982 pvrPropLayout->addWidget( pvrFreq, 1, 1 );
984 QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) );
985 pvrPropLayout->addWidget( pvrBitrLabel, 2, 0 );
987 pvrBitr = new QSpinBox;
988 pvrBitr->setAlignment( Qt::AlignRight );
989 pvrBitr->setSuffix(" kHz");
990 setSpinBoxFreq( pvrBitr );
991 pvrPropLayout->addWidget( pvrBitr, 2, 1 );
992 pvrPropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
996 CuMRL( pvrDevice, textChanged( const QString& ) );
997 CuMRL( pvrRadioDevice, textChanged( const QString& ) );
999 CuMRL( pvrFreq, valueChanged ( int ) );
1000 CuMRL( pvrBitr, valueChanged ( int ) );
1001 CuMRL( pvrNormBox, currentIndexChanged ( int ) );
1007 if( module_exists( "dtv" ) ){
1008 addModuleAndLayouts( DVB_DEVICE, dvb, N_("TV (digital)"), QGridLayout );
1011 QLabel *dvbDeviceLabel = new QLabel( qtr( "Adapter card to tune" ) );
1012 QLabel *dvbTypeLabel = new QLabel( qtr( "Delivery system:" ) );
1014 dvbCard = new QSpinBox;
1015 dvbCard->setAlignment( Qt::AlignRight );
1016 dvbCard->setPrefix( "/dev/dvb/adapter" );
1018 dvbDevLayout->addWidget( dvbDeviceLabel, 0, 0 );
1019 dvbDevLayout->addWidget( dvbCard, 0, 2, 1, 2 );
1021 dvbc = new QRadioButton( "DVB-C" );
1022 dvbs = new QRadioButton( "DVB-S" );
1023 dvbt = new QRadioButton( "DVB-T" );
1024 dvbt->setChecked( true );
1026 dvbDevLayout->addWidget( dvbTypeLabel, 1, 0 );
1027 dvbDevLayout->addWidget( dvbc, 1, 1 );
1028 dvbDevLayout->addWidget( dvbs, 1, 2 );
1029 dvbDevLayout->addWidget( dvbt, 1, 3 );
1031 /* DVB Props panel */
1032 QLabel *dvbFreqLabel =
1033 new QLabel( qtr( "Transponder/multiplex frequency" ) );
1034 dvbPropLayout->addWidget( dvbFreqLabel, 0, 0 );
1036 dvbFreq = new QSpinBox;
1037 dvbFreq->setAlignment( Qt::AlignRight );
1038 dvbFreq->setSuffix(" kHz");
1039 dvbFreq->setSingleStep( 1000 );
1040 setSpinBoxFreq( dvbFreq );
1041 dvbPropLayout->addWidget( dvbFreq, 0, 1 );
1043 dvbSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) );
1044 dvbPropLayout->addWidget( dvbSrateLabel, 1, 0 );
1046 dvbSrate = new QSpinBox;
1047 dvbSrate->setAlignment( Qt::AlignRight );
1048 dvbSrate->setSuffix(" bauds");
1049 setSpinBoxFreq( dvbSrate );
1050 dvbPropLayout->addWidget( dvbSrate, 1, 1 );
1052 dvbModLabel = new QLabel( qtr( "Modulation / Constellation" ) );
1053 dvbPropLayout->addWidget( dvbModLabel, 2, 0 );
1055 dvbModBox = new QComboBox;
1056 dvbModBox->addItem( qtr( "Automatic" ), 0 );
1057 dvbModBox->addItem( "256-QAM", 256 );
1058 dvbModBox->addItem( "128-QAM", 128 );
1059 dvbModBox->addItem( "64-QAM", 64 );
1060 dvbModBox->addItem( "32-QAM", 32 );
1061 dvbModBox->addItem( "16-QAM", 16 );
1062 dvbPropLayout->addWidget( dvbModBox, 2, 1 );
1064 dvbModLabel->hide();
1067 dvbBandLabel = new QLabel( qtr( "Bandwidth" ) );
1068 dvbPropLayout->addWidget( dvbBandLabel, 2, 0 );
1070 dvbBandBox = new QComboBox;
1071 setfillVLCConfigCombo( "dvb-bandwidth", p_intf, dvbBandBox );
1072 dvbPropLayout->addWidget( dvbBandBox, 2, 1 );
1074 dvbBandLabel->hide();
1077 dvbPropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
1081 CuMRL( dvbCard, valueChanged ( int ) );
1082 CuMRL( dvbFreq, valueChanged ( int ) );
1083 CuMRL( dvbSrate, valueChanged ( int ) );
1084 CuMRL( dvbModBox, currentIndexChanged ( int ) );
1085 CuMRL( dvbBandBox, currentIndexChanged ( int ) );
1087 BUTTONACT( dvbs, updateButtons() );
1088 BUTTONACT( dvbt, updateButtons() );
1089 BUTTONACT( dvbc, updateButtons() );
1090 BUTTONACT( dvbs, updateMRL() );
1091 BUTTONACT( dvbt, updateMRL() );
1092 BUTTONACT( dvbc, updateMRL() );
1101 addModuleAndLayouts( SCREEN_DEVICE, screen, "Desktop", QGridLayout );
1102 QLabel *screenLabel = new QLabel( qtr( "Your display will be "
1103 "opened and played in order to stream or save it." ) );
1104 screenLabel->setWordWrap( true );
1105 screenDevLayout->addWidget( screenLabel, 0, 0 );
1107 QLabel *screenFPSLabel = new QLabel(
1108 qtr( "Desired frame rate for the capture." ) );
1109 screenPropLayout->addWidget( screenFPSLabel, 0, 0 );
1111 screenFPS = new QDoubleSpinBox;
1112 screenFPS->setValue( 1. );
1113 screenFPS->setRange( .01, 100. );
1114 screenFPS->setAlignment( Qt::AlignRight );
1115 /* xgettext: frames per second */
1116 screenFPS->setSuffix( qtr( " f/s" ) );
1117 screenPropLayout->addWidget( screenFPS, 0, 1 );
1119 /* Screen connect */
1120 CuMRL( screenFPS, valueChanged( double ) );
1122 /* General connects */
1123 CONNECT( ui.deviceCombo, activated( int ) ,
1124 stackedDevLayout, setCurrentIndex( int ) );
1125 CONNECT( ui.deviceCombo, activated( int ),
1126 stackedPropLayout, setCurrentIndex( int ) );
1127 CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
1128 CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
1131 #undef addModuleAndLayouts
1134 CaptureOpenPanel::~CaptureOpenPanel()
1138 void CaptureOpenPanel::clear()
1143 void CaptureOpenPanel::updateMRL()
1146 QStringList fileList;
1147 int i_devicetype = ui.deviceCombo->itemData(
1148 ui.deviceCombo->currentIndex() ).toInt();
1149 switch( i_devicetype )
1153 if( bdas->isChecked() ) mrl = "dvb-s://";
1154 else if( bdat->isChecked() ) mrl = "dvb-t://";
1155 else if( bdac->isChecked() ) mrl = "dvb-c://";
1156 else if( bdaa->isChecked() ) mrl = "atsc://";
1157 else if( bdaq->isChecked() ) mrl = "cqam://";
1159 mrl += "frequency=" + QString::number( bdaFreq->value() );
1160 if( bdac->isChecked() || bdat->isChecked() || bdaa->isChecked() )
1162 fileList << mrl; mrl = "";
1164 if( bdas->isChecked() || bdac->isChecked() )
1165 mrl += " :dvb-srate=" + QString::number( bdaSrate->value() );
1166 else if( bdat->isChecked() || bdaa->isChecked() )
1167 mrl += " :dvb-bandwidth=" +
1168 QString::number( bdaBandBox->itemData(
1169 bdaBandBox->currentIndex() ).toInt() );
1170 emit methodChanged( "dvb-caching" );
1173 fileList << "dshow://";
1174 mrl+= " :dshow-vdev=" +
1175 colon_escape( QString("%1").arg( vdevDshowW->getValue() ) );
1176 mrl+= " :dshow-adev=" +
1177 colon_escape( QString("%1").arg( adevDshowW->getValue() ) )+" ";
1178 if( dshowVSizeLine->isModified() )
1179 mrl += ":dshow-size=" + dshowVSizeLine->text();
1180 emit methodChanged( "dshow-caching" );
1184 fileList << "v4l2://" + v4l2VideoDevice->currentText();
1185 mrl += " :input-slave=alsa://" + v4l2AudioDevice->currentText();
1186 mrl += " :v4l2-standard=" + QString::number( v4l2StdBox->currentIndex() );
1190 mrl += "channels=" + QString::number( jackChannels->value() );
1191 mrl += ":ports=" + jackPortsSelected->text();
1192 fileList << mrl; mrl = "";
1194 mrl += " :jack-input-caching=" + QString::number( jackCaching->value() );
1195 if ( jackPace->isChecked() )
1197 mrl += " :jack-input-use-vlc-pace";
1199 if ( jackConnect->isChecked() )
1201 mrl += " :jack-input-auto-connect";
1205 fileList << "pvr://";
1206 mrl += " :pvr-device=" + pvrDevice->text();
1207 mrl += " :pvr-radio-device=" + pvrRadioDevice->text();
1208 mrl += " :pvr-norm=" + QString::number( pvrNormBox->currentIndex() );
1209 if( pvrFreq->value() )
1210 mrl += " :pvr-frequency=" + QString::number( pvrFreq->value() );
1211 if( pvrBitr->value() )
1212 mrl += " :pvr-bitrate=" + QString::number( pvrBitr->value() );
1215 if( dvbc->isChecked() ) mrl = "dvb-c://";
1217 if( dvbs->isChecked() ) mrl = "dvb-s://";
1219 if( dvbt->isChecked() ) mrl = "dvb-t://";
1221 mrl += "frequency=" + QString::number( dvbFreq->value() );
1223 if( dvbc->isChecked() )
1226 dvbModBox->itemData( dvbModBox->currentIndex() ).toInt();
1229 mrl += ":modulation=" + QString::number( qam );
1232 mrl += ":srate=" + QString::number( dvbSrate->value() );
1234 else if( dvbs->isChecked() )
1235 mrl += ":srate=" + QString::number( dvbSrate->value() );
1236 else if( dvbt->isChecked() )
1237 mrl += ":bandwidth=" +
1238 QString::number( dvbBandBox->itemData(
1239 dvbBandBox->currentIndex() ).toInt() );
1241 fileList << mrl; mrl= "";
1242 mrl += " :dvb-adapter=" + QString::number( dvbCard->value() );
1246 fileList << "screen://";
1247 mrl = " :screen-fps=" + QString::number( screenFPS->value(), 'f' );
1248 emit methodChanged( "screen-caching" );
1253 if( !advMRL.isEmpty() ) mrl += advMRL;
1255 emit mrlUpdated( fileList, mrl );
1259 * Update the Buttons (show/hide) for the GUI as all device type don't
1260 * use the same ui. elements.
1262 void CaptureOpenPanel::updateButtons()
1264 /* Be sure to display the ui Elements in case they were hidden by
1265 * some Device Type (like Screen://) */
1266 ui.optionsBox->show();
1267 ui.advancedButton->show();
1268 /* Get the current Device Number */
1269 int i_devicetype = ui.deviceCombo->itemData(
1270 ui.deviceCombo->currentIndex() ).toInt();
1271 switch( i_devicetype )
1275 if( bdas->isChecked() || bdac->isChecked() )
1278 bdaSrateLabel->show();
1280 bdaBandLabel->hide();
1282 else if( bdat->isChecked() || bdaa->isChecked() )
1285 bdaSrateLabel->hide();
1287 bdaBandLabel->show();
1289 else if( bdaq->isChecked() )
1292 bdaSrateLabel->hide();
1294 bdaBandLabel->hide();
1299 if( dvbc->isChecked() )
1302 dvbSrateLabel->show();
1304 dvbModLabel->show();
1306 dvbBandLabel->hide();
1308 else if( dvbs->isChecked() )
1311 dvbSrateLabel->show();
1313 dvbModLabel->hide();
1315 dvbBandLabel->hide();
1317 else if( dvbt->isChecked() )
1320 dvbSrateLabel->hide();
1322 dvbModLabel->hide();
1324 dvbBandLabel->show();
1329 //ui.optionsBox->hide();
1330 ui.advancedButton->hide();
1337 void CaptureOpenPanel::advancedDialog()
1339 /* Get selected device type */
1340 int i_devicetype = ui.deviceCombo->itemData(
1341 ui.deviceCombo->currentIndex() ).toInt();
1343 /* Get the corresponding module */
1344 module_t *p_module =
1345 module_find( psz_devModule[i_devicetype] );
1346 if( NULL == p_module ) return;
1349 QList<ConfigControl *> controls;
1351 /* Get the confsize */
1352 unsigned int i_confsize;
1353 module_config_t *p_config;
1354 p_config = module_config_get( p_module, &i_confsize );
1356 /* New Adv Prop dialog */
1357 adv = new QDialog( this );
1358 adv->setWindowTitle( qtr( "Advanced Options" ) );
1359 adv->setWindowRole( "vlc-advanced-options" );
1361 /* A main Layout with a Frame */
1362 QVBoxLayout *mainLayout = new QVBoxLayout( adv );
1363 QScrollArea *scroll = new QScrollArea;
1364 mainLayout->addWidget( scroll );
1366 QFrame *advFrame = new QFrame;
1367 /* GridLayout inside the Frame */
1368 QGridLayout *gLayout = new QGridLayout( advFrame );
1370 scroll->setWidgetResizable( true );
1371 scroll->setWidget( advFrame );
1373 /* Create the options inside the FrameLayout */
1374 for( int n = 0; n < (int)i_confsize; n++ )
1376 module_config_t *p_item = p_config + n;
1377 ConfigControl *config = ConfigControl::createControl(
1378 VLC_OBJECT( p_intf ), p_item, advFrame, gLayout, n );
1380 controls.append( config );
1384 QDialogButtonBox *advButtonBox = new QDialogButtonBox( adv );
1385 QPushButton *closeButton = new QPushButton( qtr( "OK" ) );
1386 QPushButton *cancelButton = new QPushButton( qtr( "Cancel" ) );
1388 CONNECT( closeButton, clicked(), adv, accept() );
1389 CONNECT( cancelButton, clicked(), adv, reject() );
1391 advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
1392 advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
1394 mainLayout->addWidget( advButtonBox );
1396 /* Creation of the MRL */
1399 QString tempMRL = "";
1400 for( int i = 0; i < controls.size(); i++ )
1402 ConfigControl *control = controls[i];
1404 tempMRL += (i ? " :" : ":");
1406 if( control->getType() == CONFIG_ITEM_BOOL )
1407 if( !(qobject_cast<VIntConfigControl *>(control)->getValue() ) )
1410 tempMRL += control->getName();
1412 switch( control->getType() )
1414 case CONFIG_ITEM_STRING:
1415 case CONFIG_ITEM_LOADFILE:
1416 case CONFIG_ITEM_SAVEFILE:
1417 case CONFIG_ITEM_DIRECTORY:
1418 case CONFIG_ITEM_MODULE:
1419 tempMRL += colon_escape( QString("=%1").arg( qobject_cast<VStringConfigControl *>(control)->getValue() ) );
1421 case CONFIG_ITEM_INTEGER:
1422 tempMRL += QString("=%1").arg( qobject_cast<VIntConfigControl *>(control)->getValue() );
1424 case CONFIG_ITEM_FLOAT:
1425 tempMRL += QString("=%1").arg( qobject_cast<VFloatConfigControl *>(control)->getValue() );
1431 msg_Dbg( p_intf, "%s", qtu( advMRL ) );
1433 for( int i = 0; i < controls.size(); i++ )
1435 ConfigControl *control = controls[i];
1439 module_config_free( p_config );
1440 module_release (p_module);