diff --git a/source/app/ConfigureFormatDialog.cpp b/source/app/ConfigureFormatDialog.cpp index cf79b07..9472b06 100644 --- a/source/app/ConfigureFormatDialog.cpp +++ b/source/app/ConfigureFormatDialog.cpp @@ -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 ); diff --git a/source/app/ConfigureFormatDialog.h b/source/app/ConfigureFormatDialog.h index eafa8b1..c3d564e 100644 --- a/source/app/ConfigureFormatDialog.h +++ b/source/app/ConfigureFormatDialog.h @@ -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 standardResolutionSizes; + QLabel* m_labelFilename; QComboBox *m_comboBoxStandardResolution; QSpinBox *m_spinBoxWidth; QSpinBox *m_spinBoxheight; diff --git a/source/app/SubWindowHandle.cpp b/source/app/SubWindowHandle.cpp index be6cec4..5c7d4e1 100644 --- a/source/app/SubWindowHandle.cpp +++ b/source/app/SubWindowHandle.cpp @@ -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; }