Minor fixes in the playuver and improve the combo box of the QualityMeasurementSidebar

This commit is contained in:
jfmcarreira committed 2014-09-18 15:55:23 +01:00
1 parent 20a7f05cef
commit 1d20750ea0
5 files changed
+15 -13

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ SubWindowHandle* ModulesHandle::enableModuleIf( PlaYUVerModuleIf *pcCurrModuleIf
}
else
{
windowName.append( pcSubWindow->userFriendlyCurrentFile() );
windowName.append( pcSubWindow->getWindowName() );
pcCurrModuleIf->m_pcSubWindow[0] = pcSubWindow;
}
windowName.append( " <" );
+5 -3
View File
@@ -45,7 +45,8 @@ QualityMeasurementSidebar::QualityMeasurementSidebar( QWidget* parent, QMdiArea
RecLabel->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
m_comboBoxRef = new QComboBox;
m_comboBoxRef->setSizeAdjustPolicy( QComboBox::AdjustToMinimumContentsLength );
m_comboBoxRef->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed);
updateSubWindowList();
QGridLayout *mainLayout = new QGridLayout;
@@ -114,7 +115,7 @@ Void QualityMeasurementSidebar::updateSubWindowList()
subWindow = qobject_cast<SubWindowHandle *>( m_pcMainWindowMdiArea->subWindowList().at( i ) );
if( subWindow )
{
currSubWindowName = subWindow->getWindowName();
currSubWindowName = subWindow->getWindowShortName();
if( !m_pcSelectedWindowListNames.contains( currSubWindowName ) && !subWindow->getIsModule() )
m_pcWindowListNames.append( currSubWindowName );
}
@@ -127,10 +128,11 @@ Void QualityMeasurementSidebar::updateSubWindowList()
{
if( SubWindowHandle* refSubWindow = m_pcCurrentSubWindow->getRefSubWindow() )
{
Int index = m_pcWindowListNames.indexOf( refSubWindow->getWindowName() );
Int index = m_pcWindowListNames.indexOf( refSubWindow->getWindowShortName() );
m_comboBoxRef->setCurrentIndex( index );
}
}
m_comboBoxRef->setSizeAdjustPolicy( QComboBox::AdjustToContents );
}
Void QualityMeasurementSidebar::updateCurrentWindow( SubWindowHandle *subWindow )
+1
View File
@@ -114,6 +114,7 @@ Bool SubWindowHandle::loadFile( QString cFilename, Bool bForceDialog )
m_cCurrFileName = cFilename;
m_cWindowName = m_pCurrStream->getStreamInformationString();
m_cWindowShortName = QFileInfo( cFilename ).fileName();
setWindowTitle( m_cWindowName );
return true;
}
+4 -5
View File
@@ -57,6 +57,7 @@ private:
SubWindowHandle* m_pcReferenceSubWindow;
QString m_cWindowName;
QString m_cWindowShortName;
QString m_cCurrFileName;
Bool m_bIsPlaying;
@@ -183,13 +184,11 @@ public:
{
return m_cWindowName;
}
QString userFriendlyCurrentFile()
QString getWindowShortName()
{
return m_cWindowName;
return m_cWindowShortName;
}
QString currentFile()
QString getCurrentFileName()
{
return m_cCurrFileName;
}
+4 -4
View File
@@ -269,7 +269,7 @@ Void plaYUVerApp::format()
{
if( m_pcCurrentSubWindow )
{
m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile(), true );
m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->getCurrentFileName(), true );
m_pcCurrentSubWindow = NULL;
chageSubWindowSelection();
}
@@ -888,7 +888,7 @@ SubWindowHandle* plaYUVerApp::findSubWindow( const QMdiArea* mdiArea, const QStr
foreach( QMdiSubWindow * window, mdiArea->subWindowList() ){
SubWindowHandle *mdiChild = qobject_cast<SubWindowHandle *>( window);
if( mdiChild->currentFile() == canonicalFilePath )
if( mdiChild->getCurrentFileName() == canonicalFilePath )
return mdiChild;
}
return 0;
@@ -1006,11 +1006,11 @@ Void plaYUVerApp::updateWindowMenu()
QString text;
if( i < 9 )
{
text = tr( "&%1 %2" ).arg( i + 1 ).arg( child->userFriendlyCurrentFile() );
text = tr( "&%1 %2" ).arg( i + 1 ).arg( child->getWindowName() );
}
else
{
text = tr( "%1 %2" ).arg( i + 1 ).arg( child->userFriendlyCurrentFile() );
text = tr( "%1 %2" ).arg( i + 1 ).arg( child->getWindowName() );
}
QAction *action = m_arrayMenu[WINDOW_MENU]->addAction( text );
action->setCheckable( true );