Refactor modules ownership

This commit is contained in:
jfmcarreira committed 2021-09-19 21:50:15 +01:00
1 parent a093efce9c
commit 94444e38ec
8 files changed
+222 -168

No files matched your search

+2 -7
View File
@@ -33,7 +33,7 @@
#include "ModulesHandle.h"
ModuleHandleDock::ModuleHandleDock( QWidget* parent, CalypAppModuleIf* moduleIf )
: QWidget( parent )
: QWidget( parent ), m_pcCurrModuleIf( moduleIf )
{
// ----------------- Dock definition -----------------
@@ -60,11 +60,6 @@ ModuleHandleDock::ModuleHandleDock( QWidget* parent, CalypAppModuleIf* moduleIf
ModuleHandleDock::~ModuleHandleDock() = default;
void ModuleHandleDock::enableModule( std::unique_ptr<CalypAppModuleIf>&& module )
{
m_pcCurrModuleIf = std::move( module );
}
void ModuleHandleDock::setModuleReturnValue( double value )
{
labelModulueReturnValue->clear();
@@ -76,7 +71,7 @@ void ModuleHandleDock::visibilityChangedSlot( bool visiblity )
{
if( !visiblity )
{
m_pcCurrModuleIf = nullptr;
m_pcCurrModuleIf->disable();
}
}