Use function ModulesHandle::applyModuleIf to apply modules

This commit is contained in:
jfmcarreira committed 2014-05-13 04:35:04 +01:00
1 parent 68ee327b25
commit e2cf98d4cd
5 files changed
+13 -25

No files matched your search

+5 -8
View File
@@ -81,8 +81,6 @@ SubWindowHandle* ModulesHandle::toggleSelectedModuleIf()
{
QString windowName;
interfaceChild = new SubWindowHandle( m_pcParent );
pcSubWindow->setModuleSubWindow( interfaceChild );
pcSubWindow->enableModule( currModuleIf );
windowName.append( pcSubWindow->userFriendlyCurrentFile() );
windowName.append( " [" );
windowName.append( currModuleIf->m_cModuleDef.m_pchModuleName );
@@ -93,12 +91,8 @@ SubWindowHandle* ModulesHandle::toggleSelectedModuleIf()
currModuleIf->m_pcDisplaySubWindow = interfaceChild;
currModuleIf->m_pcDisplaySubWindow->setModule( currModuleIf );
}
else
{
pcSubWindow->enableModule( currModuleIf );
currModuleIf->m_pcDisplaySubWindow = pcSubWindow;
}
currModuleIf->m_pcSubWindow = pcSubWindow;
pcSubWindow->enableModule( currModuleIf );
}
else
{
@@ -122,7 +116,10 @@ PlaYUVerFrame* ModulesHandle::applyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf )
case MODULE_REQUIRES_THREE_FRAMES:
break;
}
pcCurrModuleIf->m_pcDisplaySubWindow->setCurrFrame( processedFrame );
if( pcCurrModuleIf->m_pcDisplaySubWindow )
pcCurrModuleIf->m_pcDisplaySubWindow->setCurrFrame( processedFrame );
else
pcCurrModuleIf->m_pcSubWindow->setCurrFrame( processedFrame );
return processedFrame;
}
+1 -1
View File
@@ -549,7 +549,7 @@ Void FramePropertiesSideBar::stopHistogram()
void FramePropertiesSideBar::slotUpdateDataHistogram()
{
if( m_pcFrame && isVisible() )
if( m_pcFrame->isValid() && isVisible() )
{
// If a selection area is done in Image Editor and if the current
// image is the same in Image Viewer, then compute too the histogram
+5 -11
View File
@@ -56,7 +56,6 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
//m_pCurrStream = new InputStream;
m_pcCurrFrame = NULL;
m_pcCurrentModule = NULL;
m_pcModuleSubWindow = NULL;
m_cWindowName = QString( " " );
m_bIsPlaying = false;
@@ -132,7 +131,6 @@ Void SubWindowHandle::disableModule()
{
PlaYUVerModuleIf* pcCurrentModule = m_pcCurrentModule;
m_pcCurrentModule = NULL;
m_pcModuleSubWindow = NULL;
ModulesHandle::destroyModuleIf( pcCurrentModule );
refreshFrame();
}
@@ -151,16 +149,12 @@ Void SubWindowHandle::refreshFrame()
m_pcCurrFrame = m_pCurrStream->getCurrFrame();
if( m_pcCurrentModule )
{
if( m_pcModuleSubWindow )
{
m_pcModuleSubWindow->setCurrFrame( m_pcCurrentModule->process( m_pcCurrFrame ) );
}
else
{
m_pcCurrFrame = m_pcCurrentModule->process( m_pcCurrFrame );
}
ModulesHandle::applyModuleIf( m_pcCurrentModule );
}
else
{
m_cViewArea->setImage( m_pcCurrFrame );
}
m_cViewArea->setImage( m_pcCurrFrame );
}
}
-5
View File
@@ -51,7 +51,6 @@ private:
ViewArea* m_cViewArea;
PlaYUVerModuleIf* m_pcCurrentModule;
SubWindowHandle* m_pcModuleSubWindow;
InputStream* m_pCurrStream;
PlaYUVerFrame* m_pcCurrFrame;
@@ -103,10 +102,6 @@ public:
{
return m_cViewArea;
}
Void setModuleSubWindow( SubWindowHandle* pcWindow )
{
m_pcModuleSubWindow = pcWindow;
}
Void setModule( PlaYUVerModuleIf* pcCurrentModule )
{
m_pcCurrentModule = pcCurrentModule;
+2
View File
@@ -239,6 +239,8 @@ void plaYUVerApp::selectModule( QAction *curr_action )
interfaceChild->zoomToFit();
interfaceChild->getViewArea()->setTool( m_appTool );
}
if( activeSubWindow() )
m_pcCurrentSubWindow = activeSubWindow();
updateFrameProperties();
return;
}