Improve Modules Interface
Now the modules are created using a factory instead of static allocated. The same module can be applied to different sequences. Pain in the ass memory free
This commit is contained in:
1 parent
bec150f705
commit
73bf370e6e
18 files changed
+432
-210
No files matched your search
+7
-24
@@ -55,9 +55,8 @@ plaYUVerApp::plaYUVerApp()
|
||||
mapperWindow = new QSignalMapper( this );
|
||||
connect( mapperWindow, SIGNAL( mapped(QWidget*) ), this, SLOT( setActiveSubWindow(QWidget*) ) );
|
||||
|
||||
m_pcModulesHandle = new ModulesHandle( this, mdiArea );
|
||||
|
||||
m_appModuleQuality = new QualityMeasurement( this, mdiArea );
|
||||
m_appModuleExtensions = new ModulesHandle( this, mdiArea );
|
||||
|
||||
createActions();
|
||||
createToolBars();
|
||||
@@ -412,24 +411,6 @@ Void plaYUVerApp::closeAll()
|
||||
mdiArea->closeAllSubWindows();
|
||||
}
|
||||
|
||||
// ----------------------- Modules Selection --------------------
|
||||
|
||||
Void plaYUVerApp::ModuleHandling( QAction *curr_action )
|
||||
{
|
||||
m_pcFrameProperties->stopHistogram();
|
||||
SubWindowHandle *interfaceChild = m_pcModulesHandle->processModuleHandlingOpt();
|
||||
if( interfaceChild )
|
||||
{
|
||||
mdiArea->addSubWindow( interfaceChild );
|
||||
//interfaceChild->getViewArea()->setTool( m_appTool );
|
||||
}
|
||||
if( activeSubWindow() )
|
||||
m_pcCurrentSubWindow = activeSubWindow();
|
||||
|
||||
updateStreamProperties();
|
||||
return;
|
||||
}
|
||||
|
||||
// ----------------------- Update Properties --------------------
|
||||
|
||||
UInt64 plaYUVerApp::getMaxFrameNumber()
|
||||
@@ -956,7 +937,8 @@ Void plaYUVerApp::updateMenus()
|
||||
m_arrayActions[NAVIGATION_TOOL_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[SELECTION_TOOL_ACT]->setEnabled( hasSubWindow );
|
||||
|
||||
m_pcModulesHandle->updateMenus( hasSubWindow );
|
||||
m_appModuleQuality->updateMenus();
|
||||
m_appModuleExtensions->updateMenus();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateWindowMenu()
|
||||
@@ -1189,6 +1171,7 @@ Void plaYUVerApp::createActions()
|
||||
m_mapperTools->setMapping( m_arrayActions[SELECTION_TOOL_ACT], ViewArea::NormalSelectionTool );
|
||||
|
||||
m_appModuleQuality->createActions();
|
||||
m_appModuleExtensions->createActions();
|
||||
|
||||
// ------------ Window ------------
|
||||
|
||||
@@ -1292,9 +1275,9 @@ Void plaYUVerApp::createMenus()
|
||||
|
||||
QMenu* QualityMenu = m_appModuleQuality->createMenu();
|
||||
menuBar()->addMenu( QualityMenu );
|
||||
|
||||
QMenu* modules_menu = m_pcModulesHandle->createMenus( menuBar() );
|
||||
connect( modules_menu, SIGNAL( triggered(QAction *) ), this, SLOT( ModuleHandling(QAction *) ) );
|
||||
QMenu* ModuleMenu = m_appModuleExtensions->createMenu();
|
||||
menuBar()->addMenu( ModuleMenu );
|
||||
//connect( ModuleMenu, SIGNAL( triggered(QAction *) ), this, SLOT( ModuleHandling(QAction *) ) );
|
||||
|
||||
m_arrayMenu[WINDOW_MENU] = menuBar()->addMenu( tr( "&Window" ) );
|
||||
updateWindowMenu();
|
||||
|
||||
Reference in new issue
Block a user