Fix invalid slots in the module sub window
This commit is contained in:
@@ -304,16 +304,12 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
pcModuleSubWindow->setWindowName( windowName );
|
||||
|
||||
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( 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 ) ) );
|
||||
|
||||
//connect( pcModuleSubWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
|
||||
//connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), this, SLOT( updateZoomFactorSBox() ) );
|
||||
|
||||
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
|
||||
|
||||
//m_pcMdiArea->addSubWindow( pcModuleSubWindow );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -351,6 +347,7 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
pcCurrModuleIf->m_pcSubWindow[i]->associateModule( pcCurrModuleIf );
|
||||
}
|
||||
}
|
||||
|
||||
applyModuleIf( pcCurrModuleIf, false );
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
* \brief Handle multiple sub-windows
|
||||
*/
|
||||
|
||||
#include "plaYUVerApp.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
#include "SubWindowHandle.h"
|
||||
@@ -131,21 +132,26 @@ Void PlaYUVerSubWindowHandle::updateActiveSubWindow( SubWindowHandle *window )
|
||||
|
||||
Void PlaYUVerSubWindowHandle::addSubWindow( SubWindowHandle *window, Qt::WindowFlags flags )
|
||||
{
|
||||
if( m_uiWindowMode == NormalSubWindows )
|
||||
if( window )
|
||||
{
|
||||
connect( window, SIGNAL( aboutToActivate( SubWindowHandle* ) ), this, SLOT( updateActiveSubWindow( SubWindowHandle* ) ) );
|
||||
connect( window, SIGNAL( aboutToClose( SubWindowHandle* ) ), this, SLOT( removeSubWindow( SubWindowHandle* ) ) );
|
||||
connect( window, SIGNAL( updateStatusBar( const QString& ) ), qobject_cast<plaYUVerApp*>( parent() ), SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( window, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), qobject_cast<plaYUVerApp*>( parent() ), SLOT( updateZoomFactorSBox() ) );
|
||||
if( m_uiWindowMode == NormalSubWindows )
|
||||
{
|
||||
connect( window, SIGNAL( aboutToActivate( SubWindowHandle* ) ), this, SLOT( updateActiveSubWindow( SubWindowHandle* ) ) );
|
||||
connect( window, SIGNAL( aboutToClose( SubWindowHandle* ) ), this, SLOT( removeSubWindow( SubWindowHandle* ) ) );
|
||||
}
|
||||
if( m_uiWindowMode == MdiWSubWindows )
|
||||
{
|
||||
PlaYUVerMdiSubWindow* mdiSubWindow = new PlaYUVerMdiSubWindow;
|
||||
mdiSubWindow->setWidget( window );
|
||||
m_pcMdiArea->addSubWindow( mdiSubWindow );
|
||||
m_apcMdiSubWindowList.append( mdiSubWindow );
|
||||
window->setSubWindow( mdiSubWindow );
|
||||
connect( mdiSubWindow, SIGNAL( aboutToClose( PlaYUVerMdiSubWindow* ) ), this, SLOT( removeMdiSubWindow( PlaYUVerMdiSubWindow* ) ) );
|
||||
}
|
||||
m_apcSubWindowList.append( window );
|
||||
}
|
||||
if( m_uiWindowMode == MdiWSubWindows )
|
||||
{
|
||||
PlaYUVerMdiSubWindow* mdiSubWindow = new PlaYUVerMdiSubWindow;
|
||||
mdiSubWindow->setWidget( window );
|
||||
m_pcMdiArea->addSubWindow( mdiSubWindow );
|
||||
m_apcMdiSubWindowList.append( mdiSubWindow );
|
||||
window->setSubWindow( mdiSubWindow );
|
||||
connect( mdiSubWindow, SIGNAL( aboutToClose( PlaYUVerMdiSubWindow* ) ), this, SLOT( removeMdiSubWindow( PlaYUVerMdiSubWindow* ) ) );
|
||||
}
|
||||
m_apcSubWindowList.append( window );
|
||||
}
|
||||
|
||||
Void PlaYUVerSubWindowHandle::removeSubWindow( Int windowIdx )
|
||||
|
||||
@@ -349,6 +349,13 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule )
|
||||
ModulesHandle::destroyModuleIf( pcModule );
|
||||
bRefresh |= true;
|
||||
}
|
||||
if( pcModule == m_pcCurrentDisplayModule )
|
||||
{
|
||||
pcModule = m_pcCurrentDisplayModule;
|
||||
m_pcCurrentDisplayModule = 0;
|
||||
ModulesHandle::destroyModuleIf( pcModule );
|
||||
bRefresh |= true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+4
-4
@@ -28,6 +28,10 @@
|
||||
#endif
|
||||
#include "plaYUVerApp.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "VideoHandle.h"
|
||||
#include "QualityHandle.h"
|
||||
#include "ModulesHandle.h"
|
||||
|
||||
#include "DialogSubWindowSelector.h"
|
||||
|
||||
#define SYNCHRONISED_ZOON 1
|
||||
@@ -183,10 +187,6 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
connect( subWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo, SLOT( zoomToFactorAll( double, QPoint ) ) );
|
||||
connect( subWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo, SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
|
||||
connect( subWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( subWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), this, SLOT( updateZoomFactorSBox() ) );
|
||||
|
||||
|
||||
videoSubWindow->zoomToFit();
|
||||
videoSubWindow->getViewArea()->setTool( ( ViewArea::eTool )m_uiViewTool );
|
||||
updateZoomFactorSBox();
|
||||
|
||||
+4
-3
@@ -36,9 +36,7 @@
|
||||
#include "PlaYUVerAppAdaptor.h"
|
||||
#endif
|
||||
#include <QMainWindow>
|
||||
#include "VideoHandle.h"
|
||||
#include "QualityHandle.h"
|
||||
#include "ModulesHandle.h"
|
||||
|
||||
#include "SubWindowHandle.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "VideoSubWindow.h"
|
||||
@@ -48,6 +46,9 @@ namespace plaYUVer
|
||||
|
||||
class PlaYUVerStream;
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class VideoHandle;
|
||||
class QualityHandle;
|
||||
class ModulesHandle;
|
||||
class PlaYUVerAppAdaptor;
|
||||
|
||||
class plaYUVerApp: public QMainWindow
|
||||
|
||||
Reference in New Issue
Block a user