/************************************************************************** * Open Files and subtitles * **************************************************************************/ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : OpenPanel( _parent, _p_intf ), dialogBox( NULL ) { /* Classic UI Setup */ ui.setupUi( this ); /* Set Filters for file selection */ /* QString fileTypes = ""; ADD_FILTER_MEDIA( fileTypes ); ADD_FILTER_VIDEO( fileTypes ); ADD_FILTER_AUDIO( fileTypes ); ADD_FILTER_PLAYLIST( fileTypes ); ADD_FILTER_ALL( fileTypes ); fileTypes.replace( QString(";*"), QString(" *")); */ /* lineFileEdit = ui.fileEdit; //TODO later: fill the fileCompleteList with previous items played. QCompleter *fileCompleter = new QCompleter( fileCompleteList, this ); fileCompleter->setModel( new QDirModel( fileCompleter ) ); lineFileEdit->setCompleter( fileCompleter );*/ if( config_GetInt( p_intf, "qt-embedded-open" ) ) { ui.tempWidget->hide(); BuildOldPanel(); } /* Subtitles */ /* Deactivate the subtitles control by default. */ ui.subFrame->setEnabled( false ); /* Build the subs size combo box */ setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf, ui.sizeSubComboBox ); /* Build the subs align combo box */ setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox ); /* Connects */ BUTTONACT( ui.fileBrowseButton, browseFile() ); BUTTONACT( ui.removeFileButton, removeFile() ); BUTTONACT( ui.subBrowseButton, browseFileSub() ); CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) ); CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() ); CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() ); CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() ); CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() ); updateButtons(); }
/************************************************************************** * Open Files and subtitles * **************************************************************************/ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : OpenPanel( _parent, _p_intf ), dialogBox( NULL ) { /* Classic UI Setup */ ui.setupUi( this ); setAcceptDrops( true ); /* Set Filters for file selection */ /* QString fileTypes = ""; ADD_FILTER_MEDIA( fileTypes ); ADD_FILTER_VIDEO( fileTypes ); ADD_FILTER_AUDIO( fileTypes ); ADD_FILTER_PLAYLIST( fileTypes ); ADD_FILTER_ALL( fileTypes ); fileTypes.replace( QString(";*"), QString(" *")); */ /* lineFileEdit = ui.fileEdit; //TODO later: fill the fileCompleteList with previous items played. QCompleter *fileCompleter = new QCompleter( fileCompleteList, this ); fileCompleter->setModel( new QDirModel( fileCompleter ) ); lineFileEdit->setCompleter( fileCompleter );*/ if( var_InheritBool( p_intf, "qt-embedded-open" ) ) { ui.tempWidget->hide(); BuildOldPanel(); } /* Subtitles */ /* Deactivate the subtitles control by default. */ ui.subGroupBox->setEnabled( false ); /* Connects */ BUTTONACT( ui.fileBrowseButton, browseFile() ); BUTTONACT( ui.removeFileButton, removeFile() ); BUTTONACT( ui.subBrowseButton, browseFileSub() ); CONNECT( ui.subGroupBox, toggled( bool ), this, updateMRL() ); CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() ); CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() ); updateButtons(); }