Add new long name description to modules in order to enhance GUI
This commit is contained in:
@@ -38,7 +38,7 @@ ModuleHandleDock::ModuleHandleDock( QWidget* parent, PlaYUVerAppModuleIf* module
|
||||
// ----------------- Dock definition -----------------
|
||||
|
||||
QString labelStr;
|
||||
labelStr.append( moduleIf->m_pcModule->m_pchModuleName );
|
||||
labelStr.append( moduleIf->m_pcModule->getModuleLongName() );
|
||||
labelStr.append( " Result:" );
|
||||
labelModulueValueLabel = new QLabel( labelStr );
|
||||
labelModulueValueLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||
|
||||
+22
-18
@@ -129,8 +129,12 @@ Void ModulesHandle::buildMenu()
|
||||
}
|
||||
}
|
||||
|
||||
currAction = new QAction( pcCurrModuleIf->m_pchModuleName, parent() );
|
||||
currAction->setStatusTip( pcCurrModuleIf->m_pchModuleTooltip );
|
||||
currAction = new QAction( pcCurrModuleIf->getModuleLongName(), parent() );
|
||||
QString moduleTooltip = pcCurrModuleIf->m_pchModuleTooltip;
|
||||
if( pcCurrModuleIf->m_uiNumberOfFrames > 1 )
|
||||
moduleTooltip += QString(" | Requires %1 frames").arg( pcCurrModuleIf->m_uiNumberOfFrames );
|
||||
|
||||
currAction->setStatusTip( moduleTooltip );
|
||||
currAction->setData( ModuleIfInternalName );
|
||||
currAction->setCheckable( false );
|
||||
connect( currAction, SIGNAL( triggered() ), this, SLOT( activateModule() ) );
|
||||
@@ -157,18 +161,18 @@ Void ModulesHandle::updateMenus()
|
||||
{
|
||||
VideoSubWindow* pcSubWindow = qobject_cast<VideoSubWindow*>( m_pcMainWindowManager->activeSubWindow() );
|
||||
Bool hasSubWindow = pcSubWindow ? true : false;
|
||||
QAction* currModuleAction;
|
||||
QAction* currModuleAction;
|
||||
|
||||
for( Int i = 0; i < m_arrayModulesActions.size(); i++ )
|
||||
{
|
||||
currModuleAction = m_arrayModulesActions.at( i );
|
||||
currModuleAction->setEnabled( hasSubWindow );
|
||||
currModuleAction->setChecked( false );
|
||||
}
|
||||
for( Int i = 0; i < m_pcModulesSubMenuList.size(); i++ )
|
||||
{
|
||||
m_pcModulesSubMenuList.at( i )->setEnabled( hasSubWindow );
|
||||
}
|
||||
for( Int i = 0; i < m_arrayModulesActions.size(); i++ )
|
||||
{
|
||||
currModuleAction = m_arrayModulesActions.at( i );
|
||||
//currModuleAction->setEnabled( hasSubWindow );
|
||||
currModuleAction->setChecked( false );
|
||||
}
|
||||
//for( Int i = 0; i < m_pcModulesSubMenuList.size(); i++ )
|
||||
//{
|
||||
// m_pcModulesSubMenuList.at( i )->setEnabled( hasSubWindow );
|
||||
//}
|
||||
|
||||
for( Int i = 0; i < m_arrayActions.size(); i++ )
|
||||
{
|
||||
@@ -187,11 +191,11 @@ Void ModulesHandle::updateMenus()
|
||||
m_arrayActions[APPLY_ALL_ACT]->setEnabled( true );
|
||||
m_arrayActions[SWAP_FRAMES_ACT]->setEnabled( true );
|
||||
}
|
||||
for( Int i = 0; i < apcCurrentModule.size(); i++ )
|
||||
{
|
||||
currModuleAction = apcCurrentModule.at( i )->m_pcModuleAction;
|
||||
currModuleAction->setChecked( true );
|
||||
}
|
||||
for( Int i = 0; i < apcCurrentModule.size(); i++ )
|
||||
{
|
||||
currModuleAction = apcCurrentModule.at( i )->m_pcModuleAction;
|
||||
currModuleAction->setChecked( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ public:
|
||||
const Char* m_pchModuleCategory;
|
||||
const Char* m_pchModuleName;
|
||||
const Char* m_pchModuleTooltip;
|
||||
const Char* m_pchModuleLongName;
|
||||
|
||||
//! Number of frames
|
||||
enum Module_NumberOfFrames m_uiNumberOfFrames;
|
||||
@@ -138,11 +139,17 @@ public:
|
||||
{
|
||||
m_iModuleAPI = MODULE_API_1;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
m_pchModuleLongName = NULL;
|
||||
}
|
||||
virtual ~PlaYUVerModuleIf() {}
|
||||
virtual void Delete() = 0;
|
||||
virtual Void destroy() = 0;
|
||||
|
||||
const Char* getModuleLongName()
|
||||
{
|
||||
return m_pchModuleLongName ? m_pchModuleLongName : m_pchModuleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Module API version 1
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,8 @@ AbsoluteFrameDifference::AbsoluteFrameDifference()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE; // Apply module to the frames or to
|
||||
// the whole sequence.
|
||||
m_pchModuleCategory = "Measurements"; // Category (sub-menu)
|
||||
m_pchModuleName = "AbsoluteFrameDifference"; // Name
|
||||
m_pchModuleName = "AbsoluteFrameDifference"; // Name (no spaces)
|
||||
m_pchModuleLongName = "Absolute Difference"; // Long Name
|
||||
m_pchModuleTooltip = "Measure the absolute difference " // Description
|
||||
"between two images (Y plane), e. g., abs( Y1 - Y2 )";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES; // Number of Frames required
|
||||
|
||||
@@ -32,6 +32,7 @@ DisparityStereoBM::DisparityStereoBM()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Stereo";
|
||||
m_pchModuleName = "Disparity-BM";
|
||||
m_pchModuleLongName = "Block macth based disparity";
|
||||
m_pchModuleTooltip = "Measure the disparity between two images using the "
|
||||
"Stereo BM method (OpenCV)";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES;
|
||||
|
||||
@@ -32,6 +32,7 @@ DisparityStereoSGBM::DisparityStereoSGBM()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Stereo";
|
||||
m_pchModuleName = "Disparity-SGBM";
|
||||
m_pchModuleName = "SGBM based disparity";
|
||||
m_pchModuleTooltip = "Measure the disparity between two images using the "
|
||||
"Stereo SGBM method (OpenCV)";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES;
|
||||
|
||||
@@ -31,6 +31,7 @@ EightBitsSampling::EightBitsSampling()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Conversions";
|
||||
m_pchModuleName = "EightBitsSampling";
|
||||
m_pchModuleLongName = "8 bit sub-sampling";
|
||||
m_pchModuleTooltip = "Sub-sampling frame to 8bpp";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
|
||||
+14
-27
@@ -28,6 +28,13 @@
|
||||
|
||||
FilterComponentModule::FilterComponentModule()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
m_pchModuleCategory = "Filtering";
|
||||
|
||||
m_pcFilteredFrame = NULL;
|
||||
}
|
||||
|
||||
@@ -57,20 +64,9 @@ Void FilterComponentModule::destroy()
|
||||
FilterComponentLuma::FilterComponentLuma()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE; // Apply module to the frames or to
|
||||
// the whole sequence.
|
||||
// Currently only support for frame
|
||||
m_pchModuleCategory = "FilterComponent"; // Category (sub-menu)
|
||||
m_pchModuleName = "Luma"; // Name
|
||||
m_pchModuleName = "FilterLuma"; // Name
|
||||
m_pchModuleLongName = "Luma Component"; // Name on the Gui
|
||||
m_pchModuleTooltip = "Filter Y matrix of YUV frame"; // Description
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME; // Number of Frames required
|
||||
// (ONE_FRAME, TWO_FRAMES,
|
||||
// THREE_FRAMES)
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING; // Module requirements
|
||||
// (check
|
||||
// PlaYUVerModulesIf.h).
|
||||
// Several requirements should be "or" between each others.
|
||||
}
|
||||
|
||||
Bool FilterComponentLuma::create( std::vector<PlaYUVerFrame*> apcFrameList )
|
||||
@@ -85,14 +81,9 @@ PlaYUVerFrame* FilterComponentLuma::process( std::vector<PlaYUVerFrame*> apcFram
|
||||
|
||||
FilterComponentChromaU::FilterComponentChromaU()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "FilterComponent";
|
||||
m_pchModuleName = "ChromaU";
|
||||
m_pchModuleName = "FilterChromaU";
|
||||
m_pchModuleLongName = "U/Cb Component";
|
||||
m_pchModuleTooltip = "Filter U matrix of YUV frame";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
}
|
||||
|
||||
Bool FilterComponentChromaU::create( std::vector<PlaYUVerFrame*> apcFrameList )
|
||||
@@ -113,13 +104,9 @@ PlaYUVerFrame* FilterComponentChromaU::process( std::vector<PlaYUVerFrame*> apcF
|
||||
FilterComponentChromaV::FilterComponentChromaV()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "FilterComponent";
|
||||
m_pchModuleName = "ChromaV";
|
||||
m_pchModuleTooltip = "Filter V matrix of YUV frame";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
m_pchModuleName = "FilterChromaV";
|
||||
m_pchModuleLongName = "V/Cr Component";
|
||||
m_pchModuleTooltip = "Filter V matrix of YUV frame";
|
||||
}
|
||||
|
||||
Bool FilterComponentChromaV::create( std::vector<PlaYUVerFrame*> apcFrameList )
|
||||
|
||||
@@ -29,6 +29,7 @@ FrameBinarization::FrameBinarization()
|
||||
/* Module Definition */
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Utilities";
|
||||
m_pchModuleLongName = "Binarization";
|
||||
m_pchModuleName = "FrameBinarization";
|
||||
m_pchModuleTooltip = "Binarize frame";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
|
||||
@@ -29,6 +29,7 @@ FrameCrop::FrameCrop()
|
||||
/* Module Definition */
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Utilities";
|
||||
m_pchModuleLongName = "Crop";
|
||||
m_pchModuleName = "FrameCrop";
|
||||
m_pchModuleTooltip = "Crop a region of a frame";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
|
||||
@@ -31,6 +31,7 @@ FrameDifference::FrameDifference()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Measurements";
|
||||
m_pchModuleName = "FrameDifference";
|
||||
m_pchModuleName = "Difference";
|
||||
m_pchModuleTooltip = "Measure the difference between two images (Y plane), "
|
||||
"Y1 - Y2, with max absolute diff of 128";
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NEW_WINDOW | MODULE_REQUIRES_OPTIONS;
|
||||
|
||||
@@ -30,6 +30,7 @@ FrameMask::FrameMask()
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Utilities";
|
||||
m_pchModuleLongName = "Apply mask";
|
||||
m_pchModuleName = "FrameMask";
|
||||
m_pchModuleTooltip = "Applies a mask to the selected image (first image)";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES;
|
||||
|
||||
@@ -30,6 +30,7 @@ FrameRotate::FrameRotate()
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Utilities";
|
||||
m_pchModuleLongName = "Rotation";
|
||||
m_pchModuleName = "FrameRotate";
|
||||
m_pchModuleTooltip = "Rotates frame";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
|
||||
@@ -30,8 +30,9 @@ FrameShift::FrameShift()
|
||||
m_iModuleAPI = MODULE_API_2;
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Utilities";
|
||||
m_pchModuleLongName = "Pixel Shift";
|
||||
m_pchModuleName = "FrameShift";
|
||||
m_pchModuleTooltip = "Shift frame";
|
||||
m_pchModuleTooltip = "Shift frame horizontal and vertical";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_OPTIONS | MODULE_USES_KEYS;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ InterFrameVariance::InterFrameVariance()
|
||||
// the whole sequence.
|
||||
m_pchModuleCategory = "Measurements"; // Category (sub-menu)
|
||||
m_pchModuleName = "InterFrameVariance"; // Name
|
||||
m_pchModuleLongName = "Variance across frames";
|
||||
m_pchModuleTooltip = "Measure the variance across several frames";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_SEVERAL_FRAMES; // Number of Frames required (This module
|
||||
// allows a variable number of inputs)
|
||||
|
||||
@@ -32,6 +32,7 @@ LumaAverage::LumaAverage()
|
||||
// Currently only support for frame
|
||||
m_pchModuleCategory = "Measurements"; // Category (sub-menu)
|
||||
m_pchModuleName = "LumaAverage"; // Name
|
||||
m_pchModuleLongName = "Average"; // Long name
|
||||
m_pchModuleTooltip = "Measure the average of luma component"; // Description
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME; // Number of Frames required
|
||||
// (ONE_FRAME, TWO_FRAMES,
|
||||
|
||||
@@ -38,6 +38,7 @@ MeasureOpticalFlowDualTVL1::MeasureOpticalFlowDualTVL1()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Measurements";
|
||||
m_pchModuleName = "MeasureOpticalFlowDualTVL1";
|
||||
m_pchModuleLongName = "Optical flow based on DualTVL1";
|
||||
m_pchModuleTooltip = "Measure optical flow";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_TWO_FRAMES;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_SKIP_WHILE_PLAY | MODULE_REQUIRES_NEW_WINDOW | MODULE_REQUIRES_OPTIONS;
|
||||
|
||||
@@ -156,7 +156,8 @@ Void OpticalFlowModule::destroy()
|
||||
OpticalFlowDualTVL1::OpticalFlowDualTVL1()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_pchModuleName = "OpticalFlowDualTVL1";
|
||||
m_pchModuleName = "OpticalFlowDualTVL1";
|
||||
m_pchModuleLongName = "Dual TVL1";
|
||||
m_pchModuleTooltip = "Measure optical flow using DualTVL1 method";
|
||||
}
|
||||
|
||||
@@ -173,6 +174,7 @@ OpticalFlowSparseToDense::OpticalFlowSparseToDense()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_pchModuleName = "OpticalFlowSparseToDense";
|
||||
m_pchModuleLongName = "Sparse to dense";
|
||||
m_pchModuleTooltip = "Measure optical flow using SparseToDense method";
|
||||
}
|
||||
|
||||
@@ -189,6 +191,7 @@ OpticalFlowFarneback::OpticalFlowFarneback()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_pchModuleName = "OpticalFlowFarneback";
|
||||
m_pchModuleLongName = "Farneback";
|
||||
m_pchModuleTooltip = "Measure optical flow using Farneback method";
|
||||
}
|
||||
|
||||
@@ -205,6 +208,7 @@ OpticalDeepFlow::OpticalDeepFlow()
|
||||
{
|
||||
/* Module Definition */
|
||||
m_pchModuleName = "OpticalDeepFlow";
|
||||
m_pchModuleLongName = "Deep flow";
|
||||
m_pchModuleTooltip = "Measure optical flow using Farneback method";
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ SetChromaHalfScale::SetChromaHalfScale()
|
||||
m_iModuleType = FRAME_PROCESSING_MODULE;
|
||||
m_pchModuleCategory = "Conversions";
|
||||
m_pchModuleName = "SetChromaHalfScale";
|
||||
m_pchModuleLongName = "Half scale chroma";
|
||||
m_pchModuleTooltip = "Copy frame only keeping luma component";
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_ONE_FRAME;
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_NOTHING;
|
||||
|
||||
@@ -33,6 +33,7 @@ WeightedPSNR::WeightedPSNR()
|
||||
m_iModuleType = FRAME_MEASUREMENT_MODULE;
|
||||
m_pchModuleCategory = "Quality";
|
||||
m_pchModuleName = "WeightedPSNR";
|
||||
m_pchModuleLongName = "Weighted PSNR";
|
||||
m_pchModuleTooltip = "Measure the weighted PSNR between two images";
|
||||
m_uiModuleRequirements = MODULE_REQUIRES_OPTIONS;
|
||||
m_uiNumberOfFrames = MODULE_REQUIRES_THREE_FRAMES;
|
||||
|
||||
Reference in New Issue
Block a user