Clean code and fix some issues regarding video handle and subwindow management

This commit is contained in:
jfmcarreira committed 2014-12-30 19:06:05 +00:00
1 parent 1f9affe499
commit d7a8f52756
7 files changed
+56 -105

No files matched your search

+13 -72
View File
@@ -145,6 +145,18 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
}
}
Void plaYUVerApp::closeActiveWindow()
{
SubWindowHandle *currSubWindow = activeSubWindow();
m_appModuleVideo->closeSubWindow( qobject_cast<VideoSubWindow*>( currSubWindow ) );
mdiArea->closeActiveSubWindow();
}
Void plaYUVerApp::closeAll()
{
mdiArea->closeAllSubWindows();
}
Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
{
if( !QFileInfo( fileName ).exists() )
@@ -181,7 +193,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
mdiArea->addSubWindow( videoSubWindow );
videoSubWindow->show();
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this, SLOT( updatePropertiesSelectedArea( QRect ) ) );
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
connect( subWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
connect( subWindow, SIGNAL( zoomChanged() ), this, SLOT( updateZoomFactorSBox() ) );
@@ -367,11 +379,6 @@ Void plaYUVerApp::setTool( Int idxTool )
{
m_appTool = ( ViewArea::eTool )idxTool;
actionGroupTools->actions().at( m_appTool )->setChecked( true );
setAllSubWindowTool();
}
Void plaYUVerApp::setAllSubWindowTool()
{
QList<VideoSubWindow*> videoSubWindowList = mdiArea->findChildren<VideoSubWindow*>();
for( Int i = 0; i < videoSubWindowList.size(); i++ )
{
@@ -379,72 +386,6 @@ Void plaYUVerApp::setAllSubWindowTool()
}
}
Void plaYUVerApp::closeActiveWindow()
{
SubWindowHandle *currSubWindow = activeSubWindow();
m_appModuleVideo->closeSubWindow( qobject_cast<VideoSubWindow*>( currSubWindow ) );
mdiArea->closeActiveSubWindow();
}
Void plaYUVerApp::closeAll()
{
mdiArea->closeAllSubWindows();
}
//
//Void plaYUVerApp::updateStreamProperties()
//{
// if( m_pcCurrentVideoSubWindow )
// {
// Int frame_num = 0;
// UInt64 total_frame_num = 1;
// if( m_pcCurrentVideoSubWindow->getInputStream() )
// {
// frame_num = m_pcCurrentVideoSubWindow->getInputStream()->getCurrFrameNum();
// m_pcFrameNumInfo->setCurrFrameNum( frame_num );
// total_frame_num = getMaxFrameNumber();
// m_pcStreamProperties->setData( m_pcCurrentVideoSubWindow->getInputStream() );
// }
// else
// {
// m_pcStreamProperties->setData( NULL );
// m_pcFrameNumInfo->setCurrFrameNum( 0 );
// }
//
// m_pcFrameProperties->setData( m_pcCurrentVideoSubWindow->getCurrFrame(), m_pcCurrentVideoSubWindow->isPlaying() );
//
// m_pcFrameSlider->setValue( frame_num );
// m_pcFrameSlider->setMaximum( total_frame_num - 1 );
// m_pcFrameNumInfo->setTotalFrameNum( total_frame_num );
//
// if( m_pcCurrentVideoSubWindow->isPlaying() )
// m_arrayActions[PLAY_ACT]->setIcon( style()->standardIcon( QStyle::SP_MediaPause ) );
// else
// m_arrayActions[PLAY_ACT]->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
//
// return;
// }
// m_pcStreamProperties->setData( NULL );
// m_pcFrameProperties->setData( NULL, false );
// m_pcFrameNumInfo->setCurrFrameNum( 0 );
// m_pcFrameNumInfo->setTotalFrameNum( 0 );
// m_pcZoomFactorSBox->setValue( 0.0 );
//}
Void plaYUVerApp::updatePropertiesSelectedArea( QRect area )
{
// if( m_pcCurrentSubWindow )
// {
// if( area.isValid() )
// {
// m_pcFrameProperties->setSelection( area );
// }
// }
// else
// {
// m_pcFrameProperties->setData( NULL, false );
// }
}
// ----------------------- Zoom Functions -----------------------
Void plaYUVerApp::normalSize()