Changes functions that control the supported formats of the PlaYUVerStream lib

This commit is contained in:
2014-06-26 01:36:12 +01:00
parent d4d3b11c3a
commit e5e9971f39
7 changed files with 238 additions and 138 deletions
+19 -6
View File
@@ -251,15 +251,28 @@ Void ModulesHandle::openModuleIfStream( PlaYUVerModuleIf *pcCurrModuleIf )
UInt Width = 0, Height = 0, FrameRate = 30;
Int InputFormat = -1;
QString supported = tr( "Supported Files" );
QString formats = PlaYUVerStream::supportedWriteFormats();
formats.prepend( " (" );
formats.append( ")" );
supported.append( formats ); // supported=="Supported Files (*.pbm *.jpg...)"
QString supported = tr( "Supported Files (" );
QStringList formatsList;
QStringList formatsExt = PlaYUVerStream::supportedWriteFormatsExt();
QStringList formatsName = PlaYUVerStream::supportedWriteFormatsName();
for( Int i = 0; i < formatsName.size(); i++ )
{
QString currFmt;
supported.append( " *." );
supported.append( formatsExt[i] );
currFmt.append( formatsName[i] );
currFmt.append( " (*." );
currFmt.append( formatsExt[i] );
currFmt.append( ")" );
formatsList << currFmt;
}
supported.append( " )" );
QStringList filter;
filter << supported
<< PlaYUVerStream::supportedWriteFormatsList()
<< formatsList
<< tr( "All Files (*)" );
QString fileName = QFileDialog::getSaveFileName( m_pcParent, tr( "Open File" ), QString(), filter.join( ";;" ) );