-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
MED_ORB::MED_Gen_var MEDModule::_MED_engine;
MEDModule::MEDModule() :
- SalomeApp_Module("MED"), _studyEditor(0),
+ SalomeApp_Module("FIELDS"), _studyEditor(0),
_datasourceController(0), _workspaceController(0), _presentationController(0),
_processingController(0), _pvGuiElements(0)
{
+ STDLOG("MEDModule::MEDModule()");
// Note also that we can't use the getApp() function here because
// the initialize(...) function has not been called yet.
MEDModule::~MEDModule()
{
+ // Clean up engine:
+ STDLOG("MEDModule::~MEDModule(): cleaning up engine side.");
+ _MED_engine->cleanUp();
+ MEDFactoryClient::getFactory()->getPresentationManager()->cleanUp();
+ MEDFactoryClient::getFactory()->getDataManager()->cleanUp();
+
if (_studyEditor)
delete _studyEditor;
if (_datasourceController)
void
MEDModule::init()
{
- // initialize MED module engine (load, if necessary)
+ // initialize FIELDS module engine (load, if necessary)
if ( CORBA::is_nil( _MED_engine ) ) {
Engines::EngineComponent_var comp =
- SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "MED" );
+ SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "FIELDS" );
if (CORBA::is_nil( comp ))
- STDLOG("Could not FindOrLoad_Component MED");
+ STDLOG("Could not FindOrLoad_Component FIELDS");
_MED_engine = MED_ORB::MED_Gen::_narrow( comp );
if (CORBA::is_nil( _MED_engine ))
- STDLOG("Could not narrow MED engine");
+ STDLOG("Could not narrow FIELDS engine");
}
}
void
MEDModule::initialize( CAM_Application* app )
{
+ STDLOG("MEDModule::initialize()");
// call the parent implementation
SalomeApp_Module::initialize( app );
+ if (! getApp()->objectBrowser())
+ getApp()->getWindow(SalomeApp_Application::WT_ObjectBrowser);
+
getApp()->objectBrowser()->setAutoOpenLevel(5);
if (app && app->desktop()) {
void
MEDModule::windows( QMap<int, int>& theMap ) const
{
+ STDLOG("MEDModule::windows()");
// want Object browser, in the left area
theMap.insert( SalomeApp_Application::WT_ObjectBrowser,
Qt::LeftDockWidgetArea );
bool
MEDModule::activateModule( SUIT_Study* theStudy )
{
+ STDLOG("MEDModule::activateModule()");
if ( CORBA::is_nil( _MED_engine ) )
return false;
bool
MEDModule::deactivateModule( SUIT_Study* theStudy )
{
- // Clean up engine:
- STDLOG("MEDModule::deactivateModule(): cleaning up engine side.");
- _MED_engine->cleanUp();
- MEDFactoryClient::getFactory()->getPresentationManager()->cleanUp();
- MEDFactoryClient::getFactory()->getDataManager()->cleanUp();
-
+ STDLOG("MEDModule::deactivateModule()");
_workspaceController->showDockWidgets(false);
_presentationController->showDockWidgets(false);
//this->unsetDockLayout();
if (iconName.isEmpty())
ico = QIcon();
else
- ico = QIcon(resMgr->loadPixmap("MED", iconName));
+ ico = QIcon(resMgr->loadPixmap("FIELDS", iconName));
QAction* action = createAction(-1,
label,
if (!model)
return false;
- if (item->componentDataType().toStdString() != "MED")
+ if (item->componentDataType().toStdString() != "FIELDS")
return false;
_PTR(SObject) obj = item->object();
_PTR(GenericAttribute) anAttribute;