diff --git a/app/CalypAppModuleIf.h b/app/CalypAppModuleIf.h index 944b5cb..b0ebdb7 100644 --- a/app/CalypAppModuleIf.h +++ b/app/CalypAppModuleIf.h @@ -100,6 +100,7 @@ public: CalypModuleIf* getModule() { return m_pcModule; } unsigned int getModuleRequirements() { return m_pcModule->m_uiModuleRequirements; } + ClpString moduleInfo() { return m_pcModule->moduleInfo(); } void update(); bool apply( bool isPlaying = false, bool disableThreads = false ); bool isRunning(); diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index c6e41c4..797bdd9 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -227,6 +227,7 @@ void VideoSubWindow::keyPressEvent( QKeyEvent* event ) if( bRet ) { refreshFrame(); + updateVideoWindowInfo(); return; } } @@ -388,21 +389,25 @@ void VideoSubWindow::updateVideoWindowInfo() { m_cStreamInformation = "Module"; QList arraySubWindows = m_pcCurrentDisplayModule->getSubWindowList(); - QStringList sourceWindowList; + QStringList windowInfoList; if( arraySubWindows.size() > 0 ) { for( int i = 0; i < arraySubWindows.size(); i++ ) { if( arraySubWindows.at( i )->getWindowName() != getWindowName() ) { - sourceWindowList.append( QString( "Input %1 - " + arraySubWindows.at( i )->getWindowName() ).arg( i + 1 ) ); + windowInfoList.append( QString( "Input %1 - " + arraySubWindows.at( i )->getWindowName() ).arg( i + 1 ) ); } } } - // qDebug( ) << sourceWindowList; - if( sourceWindowList.size() > 0 ) + if( m_pcCurrentDisplayModule->getModuleRequirements() & CLP_MODULES_HAS_INFO ) { - m_pcVideoInfo->setInformationTopLeft( sourceWindowList ); + windowInfoList.append( QString::fromStdString( m_pcCurrentDisplayModule->moduleInfo() ) ); + } + // qDebug( ) << sourceWindowList; + if( windowInfoList.size() > 0 ) + { + m_pcVideoInfo->setInformationTopLeft( windowInfoList ); } } else if( m_pCurrStream ) diff --git a/lib/CalypModuleIf.h b/lib/CalypModuleIf.h index 5338655..4ad2cdb 100644 --- a/lib/CalypModuleIf.h +++ b/lib/CalypModuleIf.h @@ -86,6 +86,7 @@ enum Module_Features CLP_MODULE_REQUIRES_NEW_WINDOW = 4, CLP_MODULE_USES_KEYS = 8, CLP_MODULES_VARIABLE_NUM_FRAMES = 16, + CLP_MODULES_HAS_INFO = 32, CLP_MODULE_REQURES_MAX = 1024, }; @@ -147,6 +148,7 @@ public: virtual CalypFrame* process( std::vector ) { return NULL; } virtual double measure( std::vector ) { return 0; } virtual bool keyPressed( enum Module_Key_Supported ) { return false; } + virtual ClpString moduleInfo() { return ClpString(); } }; #endif // __CALYPMODULESIF_H__