Two improvements related with PlotSubWindow

Fix ModulesHandle to filter PlotSubWinodws
Generalize reload to be applied to all kinds of subwindows
This commit is contained in:
jfmcarreira committed 2015-03-13 15:40:29 +00:00
1 parent d3a83bde04
commit 59f744c725
6 files changed
+42 -16

No files matched your search

+14 -10
View File
@@ -328,9 +328,9 @@ Void plaYUVerApp::format()
Void plaYUVerApp::reload()
{
if( m_pcCurrentVideoSubWindow )
if( m_pcCurrentSubWindow )
{
m_pcCurrentVideoSubWindow->reloadFile();
m_pcCurrentSubWindow->refreshSubWindow();
m_pcCurrentSubWindow = NULL;
update();
}
@@ -338,14 +338,18 @@ Void plaYUVerApp::reload()
Void plaYUVerApp::reloadAll()
{
VideoSubWindow *videoSubWindow;
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
for( Int i = 0; i < subWindowList.size(); i++ )
UInt windowCategoryOrder[] =
{
videoSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
if( !videoSubWindow->getIsModule() )
SubWindowHandle::VIDEO_STREAM_SUBWINDOW,
SubWindowHandle::MODULE_SUBWINDOW,
SubWindowHandle::MODULE_SUBWINDOW };
for( UInt c = 0; c < 3; c++ )
{
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow( windowCategoryOrder[c] );
for( Int i = 0; i < subWindowList.size(); i++ )
{
videoSubWindow->reloadFile();
subWindowList.at( i )->refreshSubWindow();
}
}
m_pcCurrentSubWindow = NULL;
@@ -533,10 +537,10 @@ Void plaYUVerApp::updateMenus()
m_arrayActions[SAVE_ACT]->setEnabled( hasSubWindow );
m_arrayActions[CLOSE_ACT]->setEnabled( hasSubWindow );
m_arrayActions[CLOSEALL_ACT]->setEnabled( hasSubWindow );
m_arrayActions[RELOAD_ACT]->setEnabled( hasSubWindow );
m_arrayActions[RELOAD_ALL_ACT]->setEnabled( hasSubWindow );
m_arrayActions[FORMAT_ACT]->setEnabled( hasVideoStreamSubWindow );
m_arrayActions[RELOAD_ACT]->setEnabled( hasVideoStreamSubWindow );
m_arrayActions[RELOAD_ALL_ACT]->setEnabled( hasVideoStreamSubWindow );
m_arrayActions[LOAD_ALL_ACT]->setEnabled( hasVideoStreamSubWindow );
m_arrayActions[ZOOM_IN_ACT]->setEnabled( hasSubWindow );