diff --git a/app/ModulesHandle.cpp b/app/ModulesHandle.cpp index 1cef3dd..5ef70f6 100644 --- a/app/ModulesHandle.cpp +++ b/app/ModulesHandle.cpp @@ -234,6 +234,7 @@ Void ModulesHandle::activateModule() Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf ) { + VideoSubWindow* pcModuleSubWindow = NULL; Bool bShowModulesNewWindow = m_arrayActions[FORCE_NEW_WINDOW_ACT]->isChecked(); VideoSubWindow* pcVideoSubWindow = qobject_cast( m_pcMdiArea->activeSubWindow() ); @@ -300,15 +301,16 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf ) { if( ( pcCurrModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_NEW_WINDOW ) || bShowModulesNewWindow ) { - VideoSubWindow* interfaceChild = new VideoSubWindow( m_pcParent, true ); - interfaceChild->setWindowName( windowName ); + pcModuleSubWindow = new VideoSubWindow( m_pcParent, true ); + pcModuleSubWindow->setWindowShortName( windowName ); + pcModuleSubWindow->setWindowName( windowName ); - connect( interfaceChild, SIGNAL( updateStatusBar( const QString& ) ), m_pcParent, SLOT( updateStatusBar( const QString& ) ) ); - connect( interfaceChild, SIGNAL( zoomChanged() ), m_pcParent, SLOT( updateZoomFactorSBox() ) ); + connect( pcModuleSubWindow, SIGNAL( updateStatusBar( const QString& ) ), m_pcParent, SLOT( updateStatusBar( const QString& ) ) ); + connect( pcModuleSubWindow, SIGNAL( zoomChanged() ), m_pcParent, SLOT( updateZoomFactorSBox() ) ); - pcCurrModuleIf->m_pcDisplaySubWindow = interfaceChild; + pcCurrModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow; pcCurrModuleIf->m_pcDisplaySubWindow->enableModule( pcCurrModuleIf, true ); - m_pcMdiArea->addSubWindow( interfaceChild ); + m_pcMdiArea->addSubWindow( pcModuleSubWindow ); } } else if( pcCurrModuleIf->m_pcModule->m_iModuleType == FRAME_MEASUREMENT_MODULE ) @@ -337,7 +339,8 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf ) pcCurrModuleIf->m_pcModule->create( pcCurrModuleIf->m_pcSubWindow[0]->getCurrFrame() ); applyModuleIf( pcCurrModuleIf, false ); - + QCoreApplication::processEvents(); + //pcModuleSubWindow->show(); return; } diff --git a/app/VideoSubWindow.h b/app/VideoSubWindow.h index 911ae63..a92496b 100644 --- a/app/VideoSubWindow.h +++ b/app/VideoSubWindow.h @@ -139,6 +139,7 @@ public: if( m_pcCurrFrame->haveSameFmt( subWindow->getCurrFrame() ) ) m_pcReferenceSubWindow = subWindow; } + VideoSubWindow* getRefSubWindow() { return m_pcReferenceSubWindow; @@ -171,6 +172,10 @@ public: QSize sizeHint() const; + Void setWindowShortName( const QString& name) + { + m_cWindowShortName = name; + } QString getWindowShortName() { return m_cWindowShortName; diff --git a/app/plaYUVerApp.cpp b/app/plaYUVerApp.cpp index e56a9b4..a2fc7b9 100644 --- a/app/plaYUVerApp.cpp +++ b/app/plaYUVerApp.cpp @@ -48,7 +48,7 @@ plaYUVerApp::plaYUVerApp() mdiArea = new PlaYUVerMdiArea; setCentralWidget( mdiArea ); - mdiArea->setActivationOrder( QMdiArea::ActivationHistoryOrder ); + //mdiArea->setActivationOrder( QMdiArea::ActivationHistoryOrder ); mapperWindow = new QSignalMapper( this ); connect( mapperWindow, SIGNAL( mapped(QWidget*) ), this, SLOT( setActiveSubWindow(QWidget*) ) );