Improve window title when handling modules and add new shortcuts
This commit is contained in:
1 parent
21a628b66d
commit
e5d9adf521
4 files changed
+18
-15
No files matched your search
+12
-13
@@ -335,10 +335,6 @@ Void ModulesHandle::activateModule()
|
||||
return;
|
||||
}
|
||||
|
||||
QString windowName;
|
||||
windowName.append( QStringLiteral( "Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
|
||||
for( Int i = 0; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
pcCurrAppModuleIf->m_pcSubWindow[i] = videoSubWindowList.at( i );
|
||||
@@ -357,13 +353,16 @@ Void ModulesHandle::activateModule()
|
||||
|
||||
Bool bShowModulesNewWindow = m_arrayActions[FORCE_NEW_WINDOW_ACT]->isChecked() | bTmpForceNewWindow;
|
||||
|
||||
QString windowName;
|
||||
|
||||
VideoSubWindow* pcModuleSubWindow = NULL;
|
||||
if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == FRAME_PROCESSING_MODULE )
|
||||
{
|
||||
if( ( pcCurrAppModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_NEW_WINDOW ) || bShowModulesNewWindow )
|
||||
{
|
||||
pcModuleSubWindow = new VideoSubWindow( VideoSubWindow::MODULE_SUBWINDOW );
|
||||
pcModuleSubWindow->setWindowName( windowName );
|
||||
windowName.append( QStringLiteral( "Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
|
||||
connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
|
||||
connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo,
|
||||
@@ -372,14 +371,6 @@ Void ModulesHandle::activateModule()
|
||||
|
||||
pcCurrAppModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
|
||||
}
|
||||
else
|
||||
{
|
||||
QString windowName = videoSubWindowList.at( 0 )->getWindowName();
|
||||
windowName.append( QStringLiteral( " - Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
videoSubWindowList.at( 0 )->setWindowName( windowName );
|
||||
|
||||
}
|
||||
}
|
||||
else if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == FRAME_MEASUREMENT_MODULE )
|
||||
{
|
||||
@@ -439,9 +430,17 @@ Void ModulesHandle::activateModule()
|
||||
|
||||
if( pcModuleSubWindow )
|
||||
{
|
||||
pcModuleSubWindow->setWindowName( windowName );
|
||||
m_pcMainWindowManager->addSubWindow( pcModuleSubWindow );
|
||||
pcModuleSubWindow->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
windowName = videoSubWindowList.at( 0 )->getWindowName();
|
||||
windowName.append( QStringLiteral( " - Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
videoSubWindowList.at( 0 )->setWindowName( windowName );
|
||||
}
|
||||
|
||||
m_pcPlaYUVerAppModuleIfList.append( pcCurrAppModuleIf );
|
||||
|
||||
|
||||
@@ -475,6 +475,7 @@ Void PlaYUVerSubWindowHandle::createActions()
|
||||
m_arrayActions[TILE_WINDOWS_ACT] = new QAction( tr( "Tile" ), this );
|
||||
m_arrayActions[TILE_WINDOWS_ACT]->setIcon( QIcon( ":images/windowstile.png" ) );
|
||||
m_arrayActions[TILE_WINDOWS_ACT]->setStatusTip( tr( "Tile the windows" ) );
|
||||
m_arrayActions[TILE_WINDOWS_ACT]->setShortcut( tr( "Ctrl+T" ) );
|
||||
//connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( tileSubWindows() ) );
|
||||
connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), this, SLOT( tileSubWindows() ) );
|
||||
|
||||
|
||||
+2
-2
@@ -107,12 +107,12 @@ Void VideoHandle::createActions()
|
||||
m_arrayActions[VIDEO_REPEAT_ACT]->setChecked( false );
|
||||
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT] = new QAction( "Zoom Lock", this );
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->setStatusTip( "Lock zoom between all video windows" );
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->setStatusTip( "Sync zoom between all video windows" );
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->setShortcut( tr( "Ctrl+L" ) );
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->setCheckable( true );
|
||||
m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->setChecked( false );
|
||||
|
||||
m_arrayActions[VIDEO_LOCK_SELECTION_ACT] = new QAction( "Playing Lock", this );
|
||||
m_arrayActions[VIDEO_LOCK_SELECTION_ACT] = new QAction( "Sync Play", this );
|
||||
m_arrayActions[VIDEO_LOCK_SELECTION_ACT]->setStatusTip(
|
||||
"Select which windows should be played synchronized. Press Ctrl while click to quickly to select all!" );
|
||||
connect( m_arrayActions[VIDEO_LOCK_SELECTION_ACT], SIGNAL( triggered() ), this, SLOT( videoSelectionButtonEvent() ) );
|
||||
|
||||
@@ -415,11 +415,13 @@ Void VideoSubWindow::updateVideoWindowInfo()
|
||||
QString m_cCodedName = QString::fromStdString( m_pCurrStream->getCodecName() );
|
||||
m_cStreamInformation = m_cFormatName + " | " + m_cCodedName;
|
||||
}
|
||||
//#if 0
|
||||
if( m_pcCurrFrame )
|
||||
{
|
||||
QString m_cPelFmtName = QString::fromStdString( m_pcCurrFrame->getPelFmtName() );
|
||||
m_cStreamInformation += " | " + m_cPelFmtName;
|
||||
}
|
||||
//#endif
|
||||
if( m_cStreamInformation.isEmpty() )
|
||||
{
|
||||
m_cStreamInformation = " ";
|
||||
@@ -558,6 +560,7 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule )
|
||||
pcModule = m_pcCurrentDisplayModule;
|
||||
m_pcCurrentDisplayModule = 0;
|
||||
ModulesHandle::destroyModuleIf( pcModule );
|
||||
setWindowName( QFileInfo( m_cFilename ).fileName() );
|
||||
bRefresh |= true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user