../app/DialogSubWindowSelector.cpp

Fix duplicate call of select sub window function
This commit is contained in:
2015-03-31 17:23:06 +01:00
parent 4c2abb4ca1
commit 32c224a49d
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ Void DialogSubWindowSelector::selectSubWindow( SubWindowHandle * subWindow )
if( iIdx >= 0 )
{
m_apcWindowsListCheckBox.at( iIdx )->setChecked( true );
m_apcSelectedSubWindowList.append( m_apcSubWindowList.at( iIdx ) );
//m_apcSelectedSubWindowList.append( m_apcSubWindowList.at( iIdx ) );
}
}
+3 -1
View File
@@ -215,6 +215,8 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
videoSubWindow->show();
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
connect( subWindow, SIGNAL( aboutToClose( SubWindowHandle* ) ), m_appModuleVideo, SLOT( closeSubWindow( SubWindowHandle* ) ) );
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 ) ) );
@@ -643,7 +645,7 @@ Void plaYUVerApp::createActions()
m_arrayActions[CLOSEALL_ACT] = new QAction( tr( "Close &All" ), this );
m_arrayActions[CLOSEALL_ACT]->setStatusTip( tr( "Close all the windows" ) );
connect( m_arrayActions[CLOSEALL_ACT], SIGNAL( triggered() ), this, SLOT( closeAll() ) );
connect( m_arrayActions[CLOSEALL_ACT], SIGNAL( triggered() ), m_pcWindowHandle, SLOT( removeAllSubWindow() ) );
m_arrayActions[EXIT_ACT] = new QAction( tr( "E&xit" ), this );
m_arrayActions[EXIT_ACT]->setShortcuts( QKeySequence::Quit );
+6 -4
View File
@@ -276,11 +276,13 @@ Void VideoHandle::updateSelectionArea( QRect area )
}
}
Void VideoHandle::closeSubWindow( VideoSubWindow* currSubWindow )
Void VideoHandle::closeSubWindow( SubWindowHandle* subWindow )
{
if( m_acPlayingSubWindows.contains( currSubWindow ) )
VideoSubWindow* videoSubWindow = qobject_cast<VideoSubWindow *>( subWindow );
if( m_acPlayingSubWindows.contains( videoSubWindow ) )
{
Int pos = m_acPlayingSubWindows.indexOf( currSubWindow );
Int pos = m_acPlayingSubWindows.indexOf( videoSubWindow );
m_acPlayingSubWindows.at( pos )->stop();
m_acPlayingSubWindows.remove( pos );
if( m_acPlayingSubWindows.size() < 2 )
@@ -401,7 +403,7 @@ Void VideoHandle::setTimerStatus()
else
{
#if( _CONTROL_PLAYING_TIME_ == 1 )
if( m_pcPlayControlTimer )
if( m_pcPlayControlTimer && m_pcPlayingTimer->interval() > 0 )
{
qDebug( ) << "Desired Fps: "
<< 1000 / m_pcPlayingTimer->interval()
+1 -2
View File
@@ -66,8 +66,6 @@ public:
Void update( VideoSubWindow* currSubWindow );
Void closeSubWindow( VideoSubWindow* currSubWindow );
private:
QWidget* m_pcParet;
PlaYUVerSubWindowHandle* m_pcMainWindowManager;
@@ -119,6 +117,7 @@ Q_SIGNALS:
private Q_SLOTS:
void update();
void updateSelectionArea( QRect area );
void closeSubWindow( SubWindowHandle* subWindow );
void zoomToFactorAll( const double factor, const QPoint center = QPoint() );
void moveAllScrollBars( const QPoint offset );
void play();