Commit 0e80477b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open: Try to repair Open File. Add the beginning of DirectShow.

parent 6b34b9ee
...@@ -65,7 +65,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -65,7 +65,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dialogBox = new FileOpenBox( ui.tempWidget, NULL, dialogBox = new FileOpenBox( ui.tempWidget, NULL,
qfu( p_intf->p_libvlc->psz_homedir ), fileTypes ); qfu( p_intf->p_libvlc->psz_homedir ), fileTypes );
/* dialogBox->setFileMode( QFileDialog::ExistingFiles );*/ /* dialogBox->setFileMode( QFileDialog::ExistingFiles );*/
/* dialogBox->setAcceptMode( QFileDialog::AcceptOpen );*/ dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
/* retrieve last known path used in file browsing */ /* retrieve last known path used in file browsing */
char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" ); char *psz_filepath = config_GetPsz( p_intf, "qt-filedialog-path" );
...@@ -79,7 +79,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -79,7 +79,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dialogBox->setSizeGripEnabled( false ); dialogBox->setSizeGripEnabled( false );
/* Add a tooltip */ /* Add a tooltip */
dialogBox->setToolTip( qtr( "Select one or multiple files, or a folder" ) ); // dialogBox->setToolTip( qtr( "Select one or multiple files, or a folder" ) );
// Add it to the layout // Add it to the layout
ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 ); ui.gridLayout->addWidget( dialogBox, 0, 0, 1, 3 );
...@@ -135,7 +135,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -135,7 +135,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this,
updateMRL() ); updateMRL() );
/* CONNECT( lineFileEdit, textChanged( QString ), this, browseFile() );*/ CONNECT( lineFileEdit, textChanged( QString ), this, browseFile() );
} }
FileOpenPanel::~FileOpenPanel() FileOpenPanel::~FileOpenPanel()
...@@ -146,8 +146,6 @@ QStringList FileOpenPanel::browse( QString help ) ...@@ -146,8 +146,6 @@ QStringList FileOpenPanel::browse( QString help )
return THEDP->showSimpleOpen( help ); return THEDP->showSimpleOpen( help );
} }
#if 0
/* Unused. FIXME ? */
void FileOpenPanel::browseFile() void FileOpenPanel::browseFile()
{ {
QString fileString = ""; QString fileString = "";
...@@ -157,7 +155,6 @@ void FileOpenPanel::browseFile() ...@@ -157,7 +155,6 @@ void FileOpenPanel::browseFile()
ui.fileInput->setEditText( fileString ); ui.fileInput->setEditText( fileString );
updateMRL(); updateMRL();
} }
#endif
void FileOpenPanel::browseFileSub() void FileOpenPanel::browseFileSub()
{ {
...@@ -502,21 +499,21 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -502,21 +499,21 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
v4lDevLayout->addWidget( v4lAudioDevice, 1, 1 ); v4lDevLayout->addWidget( v4lAudioDevice, 1, 1 );
/* V4l Props panel */ /* V4l Props panel */
QLabel *v4lNormLabel = new QLabel( qtr( "Norm" ) );
v4lPropLayout->addWidget( v4lNormLabel, 0 , 0 );
v4lNormBox = new QComboBox; v4lNormBox = new QComboBox;
setfillVLCConfigCombo( "v4l-norm", p_intf, v4lNormBox ); setfillVLCConfigCombo( "v4l-norm", p_intf, v4lNormBox );
v4lPropLayout->addWidget( v4lNormBox, 0 , 1 ); v4lPropLayout->addWidget( v4lNormBox, 0 , 1 );
QLabel *v4lFreqLabel = new QLabel( qtr( "Frequency" ) );
v4lPropLayout->addWidget( v4lFreqLabel, 1 , 0 );
v4lFreq = new QSpinBox; v4lFreq = new QSpinBox;
v4lFreq->setAlignment( Qt::AlignRight ); v4lFreq->setAlignment( Qt::AlignRight );
v4lFreq->setSuffix(" kHz"); v4lFreq->setSuffix(" kHz");
v4lPropLayout->addWidget( v4lFreq, 1 , 1 ); v4lPropLayout->addWidget( v4lFreq, 1 , 1 );
QLabel *v4lNormLabel = new QLabel( qtr( "Norm" ) );
v4lPropLayout->addWidget( v4lNormLabel, 0 , 0 );
QLabel *v4lFreqLabel = new QLabel( qtr( "Frequency" ) );
v4lPropLayout->addWidget( v4lFreqLabel, 1 , 0 );
/* v4l CONNECTs */ /* v4l CONNECTs */
CuMRL( v4lVideoDevice, textChanged( QString ) ); CuMRL( v4lVideoDevice, textChanged( QString ) );
CuMRL( v4lAudioDevice, textChanged( QString ) ); CuMRL( v4lAudioDevice, textChanged( QString ) );
...@@ -542,12 +539,15 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -542,12 +539,15 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
pvrDevLayout->addWidget( pvrRadioDevice, 1, 1 ); pvrDevLayout->addWidget( pvrRadioDevice, 1, 1 );
/* PVR props panel */ /* PVR props panel */
QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) );
pvrPropLayout->addWidget( pvrNormLabel, 0, 0 );
pvrNormBox = new QComboBox; pvrNormBox = new QComboBox;
setfillVLCConfigCombo( "pvr-norm", p_intf, pvrNormBox ); setfillVLCConfigCombo( "pvr-norm", p_intf, pvrNormBox );
pvrPropLayout->addWidget( pvrNormBox, 0, 1 ); pvrPropLayout->addWidget( pvrNormBox, 0, 1 );
QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) ); QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) );
pvrPropLayout->addWidget( pvrNormLabel, 0, 0 ); pvrPropLayout->addWidget( pvrFreqLabel, 1, 0 );
pvrFreq = new QSpinBox; pvrFreq = new QSpinBox;
pvrFreq->setAlignment( Qt::AlignRight ); pvrFreq->setAlignment( Qt::AlignRight );
...@@ -555,18 +555,15 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -555,18 +555,15 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
setMaxBound( pvrFreq ); setMaxBound( pvrFreq );
pvrPropLayout->addWidget( pvrFreq, 1, 1 ); pvrPropLayout->addWidget( pvrFreq, 1, 1 );
QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) );
pvrPropLayout->addWidget( pvrBitrLabel, 2, 0 );
pvrBitr = new QSpinBox; pvrBitr = new QSpinBox;
pvrBitr->setAlignment( Qt::AlignRight ); pvrBitr->setAlignment( Qt::AlignRight );
pvrBitr->setSuffix(" kHz"); pvrBitr->setSuffix(" kHz");
setMaxBound( pvrBitr ); setMaxBound( pvrBitr );
pvrPropLayout->addWidget( pvrBitr, 2, 1 ); pvrPropLayout->addWidget( pvrBitr, 2, 1 );
QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) );
pvrPropLayout->addWidget( pvrFreqLabel, 1, 0 );
QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) );
pvrPropLayout->addWidget( pvrBitrLabel, 2, 0 );
/* PVR CONNECTs */ /* PVR CONNECTs */
CuMRL( pvrDevice, textChanged( QString ) ); CuMRL( pvrDevice, textChanged( QString ) );
CuMRL( pvrRadioDevice, textChanged( QString ) ); CuMRL( pvrRadioDevice, textChanged( QString ) );
...@@ -580,6 +577,45 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -580,6 +577,45 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
*********************/ *********************/
addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" ); addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
/* dshow Main */
QLabel *dshowVDeviceLabel = new QLabel( qtr( "Video Device Name " ) );
dshowDevLayout->addWidget( dshowVDeviceLabel, 0, 0 );
QLabel *dshowADeviceLabel = new QLabel( qtr( "Audio Device Name " ) );
dshowDevLayout->addWidget( dshowADeviceLabel, 1, 0 );
QComboBox *dshowVDevice = new QComboBox;
dshowDevLayout->addWidget( dshowVDevice, 0, 1 );
QComboBox *dshowADevice = new QComboBox;
dshowDevLayout->addWidget( dshowADevice, 1, 1 );
QPushButton *dshowVRefresh = new QPushButton( qtr( "Update List" ) );
dshowDevLayout->addWidget( dshowVRefresh, 0, 2 );
QPushButton *dshowARefresh = new QPushButton( qtr( "Update List" ) );
dshowDevLayout->addWidget( dshowARefresh, 1, 2 );
QPushButton *dshowVConfig = new QPushButton( qtr( "Configure" ) );
dshowDevLayout->addWidget( dshowVConfig, 0, 3 );
QPushButton *dshowAConfig = new QPushButton( qtr( "Configure" ) );
dshowDevLayout->addWidget( dshowAConfig, 1, 3 );
/* dshow Properties */
QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) );
dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 );
QLineEdit *dshowVSizeLine = new QLineEdit;
dshowPropLayout->addWidget( dshowVSizeLine, 0, 1);
/* dshow CONNECTs */
CuMRL( dshowVDevice, currentIndexChanged ( int ) );
CuMRL( dshowADevice, currentIndexChanged ( int ) );
CuMRL( dshowVSizeLine, textChanged( QString ) );
/************** /**************
* BDA Stuffs * * BDA Stuffs *
**************/ **************/
...@@ -593,10 +629,10 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -593,10 +629,10 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
bdac = new QRadioButton( "DVB-C" ); bdac = new QRadioButton( "DVB-C" );
bdat = new QRadioButton( "DVB-T" ); bdat = new QRadioButton( "DVB-T" );
bdaDevLayout->addWidget( bdaTypeLabel, 1, 0 ); bdaDevLayout->addWidget( bdaTypeLabel, 0, 0 );
bdaDevLayout->addWidget( bdas, 1, 1 ); bdaDevLayout->addWidget( bdas, 0, 1 );
bdaDevLayout->addWidget( bdac, 1, 2 ); bdaDevLayout->addWidget( bdac, 0, 2 );
bdaDevLayout->addWidget( bdat, 1, 3 ); bdaDevLayout->addWidget( bdat, 0, 3 );
/* bda Props */ /* bda Props */
QLabel *bdaFreqLabel = QLabel *bdaFreqLabel =
......
...@@ -89,9 +89,7 @@ private: ...@@ -89,9 +89,7 @@ private:
public slots: public slots:
virtual void updateMRL(); virtual void updateMRL();
private slots: private slots:
#if 0
void browseFile(); void browseFile();
#endif
void browseFileSub(); void browseFileSub();
void toggleSubtitleFrame(); void toggleSubtitleFrame();
}; };
......
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