diff --git a/app/SubWindowAbstract.cpp b/app/SubWindowAbstract.cpp index 6aadfae..7a465fb 100644 --- a/app/SubWindowAbstract.cpp +++ b/app/SubWindowAbstract.cpp @@ -61,8 +61,10 @@ SubWindowAbstract::~SubWindowAbstract() Void SubWindowAbstract::setWidget( QWidget* widget ) { if( !m_pcLayout ) + { m_pcLayout = new QHBoxLayout( this ); - + m_pcLayout->setContentsMargins( 0, 0, 0, 0 ); + } m_pcLayout->addWidget( widget ); } diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index b519a22..184b072 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -106,11 +106,11 @@ VideoSubWindow::VideoSubWindow( enum VideoSubWindowCategories category, QWidget connect( m_cViewArea, SIGNAL( selectionChanged( QRect ) ), this, SLOT( updateSelectedArea( QRect ) ) ); connect( m_cViewArea, SIGNAL( positionChanged( const QPoint & ) ), this, SLOT( updatePixelValueStatusBar( const QPoint & ) ) ); - m_pcScrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); - m_pcScrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + //m_pcScrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); + //m_pcScrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); // Define the cViewArea as the widget inside the scroll area - m_cViewArea->setMinimumSize( size() ); + // m_cViewArea->setMinimumSize( size() ); m_pcScrollArea->setWidget( m_cViewArea ); @@ -465,6 +465,29 @@ Void VideoSubWindow::paintEvent( QPaintEvent *event ) // p.drawLine( 0, 0, width(), height() ); } +Void VideoSubWindow::refreshFrameOperation() +{ + Bool bSetFrame = false; + if( m_pCurrStream ) + { + m_pcCurrFrame = m_pCurrStream->getCurrFrame(); + bSetFrame = m_pcCurrFrame ? true : false; + } + if( m_pcCurrentDisplayModule ) + { + ModulesHandle::applyModuleIf( m_pcCurrentDisplayModule, m_bIsPlaying ); + bSetFrame = false; + } + if( bSetFrame ) + { + m_cViewArea->setImage( m_pcCurrFrame ); + } + for( Int i = 0; i < m_apcCurrentModule.size(); i++ ) + { + ModulesHandle::applyModuleIf( m_apcCurrentModule.at( i ), m_bIsPlaying ); + } +} + Void VideoSubWindow::refreshFrame( Bool bThreaded ) { //#ifndef QT_NO_CONCURRENT @@ -476,8 +499,8 @@ Void VideoSubWindow::refreshFrame( Bool bThreaded ) // else //#endif { - //refreshFrameOperation(); - update(); + refreshFrameOperation(); + //update(); } }