Add function to check if the dialog box to configure the sequence parameters is needed
This commit is contained in:
1 parent
8f46cf8a5d
commit
73fbd05488
3 files changed
+20
-2
No files matched your search
@@ -61,9 +61,12 @@ bool ImageInterface::loadFile( const QString &fileName )
|
||||
{
|
||||
ConfigureFormatDialog formatDialog( this );
|
||||
|
||||
if( formatDialog.exec() == QDialog::Rejected )
|
||||
if( m_currStream.needFormatDialog( fileName ) )
|
||||
{
|
||||
return false;
|
||||
if( formatDialog.exec() == QDialog::Rejected )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
|
||||
@@ -119,6 +119,19 @@ QStringList InputStream::supportedPixelFormatList()
|
||||
return formats;
|
||||
}
|
||||
|
||||
Bool InputStream::needFormatDialog( QString filename )
|
||||
{
|
||||
QString fileExtension = QFileInfo(filename).completeSuffix();
|
||||
if( !fileExtension.compare( QString("yuv") ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Void InputStream::init( QString filename, UInt width, UInt height, Int input_format )
|
||||
{
|
||||
|
||||
|
||||
@@ -90,6 +90,8 @@ public:
|
||||
YUVFormat = 0, // Use color space.
|
||||
};
|
||||
|
||||
Bool needFormatDialog( QString filename );
|
||||
|
||||
Void init( QString filename, UInt width, UInt height, Int input_format );
|
||||
|
||||
Void YUV420toRGB();
|
||||
|
||||
Reference in new issue
Block a user