Minor fixes in Modules handles and introduction of threads into each module
The modules are applied inside a different thread in order to avoid lag in the main window while processing. This still need further testing A new flag is added to selected if the threads should be used in this purpose
This commit is contained in:
1 parent
13f39eee4b
commit
0fe1cdce48
8 files changed
+169
-52
No files matched your search
@@ -36,6 +36,7 @@ SubWindowHandle::SubWindowHandle( QWidget * parent ) :
|
||||
|
||||
setAttribute( Qt::WA_DeleteOnClose );
|
||||
setBackgroundRole( QPalette::Light );
|
||||
setVisible( false );
|
||||
|
||||
// Create a new scroll area inside the sub-window
|
||||
m_cScrollArea = new QScrollArea( this );
|
||||
@@ -121,7 +122,7 @@ Void SubWindowHandle::enableModule( PlaYUVerModuleIf* select_module )
|
||||
disableModule();
|
||||
}
|
||||
m_pcCurrentModule = select_module;
|
||||
refreshFrame();
|
||||
// refreshFrame();
|
||||
}
|
||||
|
||||
Void SubWindowHandle::disableModule()
|
||||
@@ -148,6 +149,13 @@ Void SubWindowHandle::setCurrFrame( PlaYUVerFrame* pcCurrFrame )
|
||||
{
|
||||
m_pcCurrFrame = pcCurrFrame;
|
||||
m_cViewArea->setImage( m_pcCurrFrame );
|
||||
if( !isVisible() )
|
||||
{
|
||||
show();
|
||||
resize( sizeHint() );
|
||||
zoomToFit();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Void SubWindowHandle::refreshFrame()
|
||||
@@ -390,7 +398,8 @@ QSize SubWindowHandle::sizeHint() const
|
||||
if( m_pcCurrFrame )
|
||||
isize = QSize( m_pcCurrFrame->getWidth() + 50, m_pcCurrFrame->getHeight() + 50 );
|
||||
else
|
||||
isize = QSize( m_pCurrStream->getWidth() + 50, m_pCurrStream->getHeight() + 50 );
|
||||
if( m_pCurrStream )
|
||||
isize = QSize( m_pCurrStream->getWidth() + 50, m_pCurrStream->getHeight() + 50 );
|
||||
|
||||
// If the SubWindowHandle needs more space that the avaiable, we'll give
|
||||
// to the subwindow a reasonable size preserving the image aspect ratio.
|
||||
|
||||
Reference in new issue
Block a user