Changes in Modules handling and re-enable module while playing

This commit is contained in:
2018-02-02 03:42:28 +00:00
parent 2dfb3f0ecd
commit 5863c3c48d
5 changed files with 12 additions and 17 deletions
+8 -10
View File
@@ -376,21 +376,18 @@ Void ModulesHandle::activateModule()
VideoSubWindow* pcModuleSubWindow = NULL;
if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == FRAME_PROCESSING_MODULE )
{
if( ( pcCurrAppModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_NEW_WINDOW ) ||
bShowModulesNewWindow )
if( ( pcCurrAppModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_NEW_WINDOW ) || bShowModulesNewWindow )
{
pcModuleSubWindow = new VideoSubWindow( VideoSubWindow::MODULE_SUBWINDOW );
windowName.append( QStringLiteral( "Module " ) );
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo,
SLOT( updateSelectionArea( QRect ) ) );
connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo,
SLOT( zoomToFactorAll( double, QPoint ) ) );
connect( pcModuleSubWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo,
SLOT( moveAllScrollBars( const QPoint ) ) );
pcCurrAppModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
// connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo,
// SLOT( updateSelectionArea( QRect ) ) );
// connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo,
// SLOT( zoomToFactorAll( double, QPoint ) ) );
// connect( pcModuleSubWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo,
// SLOT( moveAllScrollBars( const QPoint ) ) );
}
}
else if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == FRAME_MEASUREMENT_MODULE )
@@ -455,6 +452,7 @@ Void ModulesHandle::activateModule()
pcModuleSubWindow->setWindowName( windowName );
m_pcMainWindowManager->addSubWindow( pcModuleSubWindow );
pcModuleSubWindow->show();
m_appModuleVideo->addSubWindow( pcModuleSubWindow );
}
else
{
+1 -1
View File
@@ -219,7 +219,7 @@ Void PlaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
m_pcWindowHandle->addSubWindow( videoSubWindow );
videoSubWindow->show();
m_appModuleVideo->openSubWindow( videoSubWindow );
m_appModuleVideo->addSubWindow( videoSubWindow );
updateZoomFactorSBox();
+1 -4
View File
@@ -382,7 +382,7 @@ Void VideoHandle::updateSelectionArea( QRect area )
}
}
Void VideoHandle::openSubWindow( VideoSubWindow* window )
Void VideoHandle::addSubWindow( VideoSubWindow* window )
{
window->zoomToFit();
window->getViewArea()->setTool( m_uiViewTool );
@@ -397,9 +397,6 @@ Void VideoHandle::openSubWindow( VideoSubWindow* window )
connect( window, &SubWindowAbstract::scrollBarMoved,
this, &VideoHandle::moveAllScrollBars );
//connect( window, SIGNAL( aboutToClose( SubWindowAbstract* ) ), this, SLOT( closeSubWindow( SubWindowAbstract* ) ) );
//connect( window, SIGNAL( zoomFactorChanged( const double, const QPoint ) ), this, SLOT( zoomToFactorAll( double, QPoint ) ) );
//connect( window, SIGNAL( scrollBarMoved( const QPoint ) ), this, SLOT( moveAllScrollBars( const QPoint ) ) );
connect( window->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this, SLOT( updateSelectionArea( QRect ) ) );
}
+1 -1
View File
@@ -69,7 +69,7 @@ public:
Void update( VideoSubWindow* currSubWindow );
Void openSubWindow( VideoSubWindow* subWindow );
Void addSubWindow( VideoSubWindow* subWindow );
private:
QWidget* m_pcParet;
+1 -1
View File
@@ -660,7 +660,7 @@ Void VideoSubWindow::refreshFrameOperation()
{
m_cViewArea->setImage( m_pcCurrFrame );
}
for( Int i = 0; i < m_apcCurrentModule.size() && !m_bIsPlaying; i++ )
for( Int i = 0; i < m_apcCurrentModule.size(); i++ )
{
m_apcCurrentModule.at( i )->update();
}