Add filename into configure format dialog
This commit is contained in:
1 parent
e711e9c8b3
commit
18bc64444f
3 files changed
+20
-3
No files matched your search
@@ -70,6 +70,20 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
|
||||
MainLayout->addLayout( headLayout );
|
||||
|
||||
MainLayout->addItem( new QSpacerItem( 10, 20, QSizePolicy::Minimum ) );
|
||||
|
||||
// Filename layout
|
||||
QHBoxLayout* filenameLayout = new QHBoxLayout();
|
||||
QLabel* filenameLabel = new QLabel();
|
||||
filenameLabel->setText( "Name" );
|
||||
filenameLabel->setFont( menusFont );
|
||||
m_labelFilename = new QLabel();
|
||||
m_labelFilename->setText( "Test" );
|
||||
filenameLayout->addWidget( filenameLabel );
|
||||
filenameLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
|
||||
filenameLayout->addWidget( m_labelFilename );
|
||||
MainLayout->addLayout( filenameLayout );
|
||||
|
||||
// standardResolutionLayout
|
||||
MainLayout->addItem( new QSpacerItem( 10, 20, QSizePolicy::Minimum ) );
|
||||
QHBoxLayout* standardResolutionLayout = new QHBoxLayout();
|
||||
@@ -179,9 +193,11 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
|
||||
}
|
||||
|
||||
Int ConfigureFormatDialog::runConfigureFormatDialog( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate )
|
||||
Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate )
|
||||
{
|
||||
// Set default values
|
||||
m_labelFilename->setText( Filename );
|
||||
//m_labelFilename->setText( QFileInfo( Filename ).fileName() );
|
||||
m_spinBoxWidth->setValue( rWidth );
|
||||
m_spinBoxheight->setValue( rHeight );
|
||||
m_comboBoxPixelFormat->setCurrentIndex( rInputFormat >= 0 ? rInputFormat : 0 );
|
||||
|
||||
@@ -56,7 +56,7 @@ Q_OBJECT
|
||||
public:
|
||||
|
||||
ConfigureFormatDialog( QWidget *parent = 0 );
|
||||
Int runConfigureFormatDialog ( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
Int runConfigureFormatDialog ( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
|
||||
private Q_SLOTS:
|
||||
void StandardResolutionSelection();
|
||||
@@ -65,6 +65,7 @@ private:
|
||||
QStringList standardResolutionNames;
|
||||
QVector<QSize> standardResolutionSizes;
|
||||
|
||||
QLabel* m_labelFilename;
|
||||
QComboBox *m_comboBoxStandardResolution;
|
||||
QSpinBox *m_spinBoxWidth;
|
||||
QSpinBox *m_spinBoxheight;
|
||||
|
||||
@@ -94,7 +94,7 @@ Bool SubWindowHandle::loadFile( QString cFilename, Bool bForceDialog )
|
||||
if( m_pCurrStream->guessFormat( cFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog )
|
||||
{
|
||||
ConfigureFormatDialog formatDialog( this );
|
||||
if( formatDialog.runConfigureFormatDialog( Width, Height, InputFormat, FrameRate ) == QDialog::Rejected )
|
||||
if( formatDialog.runConfigureFormatDialog( cFilename, Width, Height, InputFormat, FrameRate ) == QDialog::Rejected )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user