Change module definition

This commit is contained in:
jfmcarreira committed 2014-02-23 01:16:58 +00:00
1 parent 0d6aa2b5bc
commit 8b098468af
4 files changed
+25 -23

No files matched your search

+2 -2
View File
@@ -87,8 +87,8 @@ QMenu* ModulesHandle::createMenus( QMenuBar *MainAppMenuBar )
{
currModuleIf = m_pcPlaYUVerModules.at( i );
currAction = new QAction( tr( currModuleIf->m_pchModuleName ), parent() );
currAction->setStatusTip( tr( currModuleIf->m_pchModuleTooltip ) );
currAction = new QAction( tr( currModuleIf->m_cModuleDef.m_pchModuleName ), parent() );
currAction->setStatusTip( tr( currModuleIf->m_cModuleDef.m_pchModuleTooltip ) );
currAction->setCheckable( true );
connect( currAction, SIGNAL( triggered() ), m_pcActionMapper, SLOT( map() ) );
m_pcActionMapper->setMapping( currAction, i );
+13
View File
@@ -29,6 +29,19 @@
namespace plaYUVer
{
PlaYUVerModuleDefinition FilterFrameDef = {
"FrameLevel",
"Y_Filter",
"Filter Y matrix of YUV frame",
};
FilterFrame::FilterFrame()
{
m_cModuleDef = FilterFrameDef;
m_pcFilteredFrame = NULL;
}
Void FilterFrame::create( PlaYUVerFrame* InputFrame )
{
if( m_pcFilteredFrame )
+1 -9
View File
@@ -37,21 +37,13 @@
namespace plaYUVer
{
const Char ModuleType[] = "Filter";
const Char ModuleName[] = "Y_Filter";
const Char ModuleTooltip[] = "Filter Y matrix of YUV frame";
class FilterFrame: public PlaYUVerModuleIf
{
private:
PlaYUVerFrame* m_pcFilteredFrame;
public:
FilterFrame()
{
REGISTER_MODULE_NAME(ModuleType, ModuleName, ModuleTooltip )
m_pcFilteredFrame = NULL;
}
FilterFrame();
virtual ~FilterFrame()
{
}
+9 -12
View File
@@ -38,18 +38,20 @@ class QAction;
namespace plaYUVer
{
#define REGISTER_MODULE_NAME( type, name, tooltip ) \
m_pchModuleType = type; \
m_pchModuleName = name; \
m_pchModuleTooltip = tooltip;
typedef struct __PlaYUVerModuleDefinition
{
const char *m_pchModuleType;
const char *m_pchModuleName;
const char *m_pchModuleTooltip;
}PlaYUVerModuleDefinition;
class PlaYUVerModuleIf
{
public:
PlaYUVerModuleIf() :
m_pchModuleType( NULL ), m_pchModuleName( NULL ), m_pchModuleTooltip( NULL )
PlaYUVerModuleIf()
{
m_pcAction = NULL;
}
virtual ~PlaYUVerModuleIf()
{
@@ -57,18 +59,13 @@ public:
QAction* m_pcAction;
const Char* m_pchModuleType;
const Char* m_pchModuleName;
const Char* m_pchModuleTooltip;
PlaYUVerModuleDefinition m_cModuleDef;
virtual Void create() {};
virtual Void process() {};
virtual Void create( PlaYUVerFrame* ) {};
virtual PlaYUVerFrame* process( PlaYUVerFrame* ) {};
virtual PlaYUVerFrame* getModImage() {};
virtual QImage* process( QImage* ) {};
virtual Void destroy() {};