]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Merge remote-tracking branch 'origin/agr/fix_tests'
authorabn <adrien.bruneton@cea.fr>
Wed, 27 Jul 2016 10:10:55 +0000 (12:10 +0200)
committerabn <adrien.bruneton@cea.fr>
Wed, 27 Jul 2016 10:10:55 +0000 (12:10 +0200)
Conflicts:
src/MEDCalc/gui/CMakeLists.txt
src/MEDCalc/gui/MEDModule.cxx
src/MEDCalc/gui/MEDModule.hxx

1  2 
CMakeLists.txt
src/MEDCalc/gui/DatasourceController.cxx
src/MEDCalc/gui/MEDModule.cxx
src/MEDCalc/gui/MEDModule.hxx
src/MEDCalc/gui/WorkspaceController.cxx
src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx

diff --cc CMakeLists.txt
Simple merge
index 69f51d44684c43bd60cbf51c44db17050e8b591c,cb0c4703e4e218374b03a02a1ccca5feb4aef7eb..1501c32b102dd4fc0e387875955f985435bbc9d5
  
  #ifndef DISABLE_PVVIEWER
  #include "PVViewer_ViewModel.h"
 +#include "PVViewer_GUIElements.h"
  #endif
  
++
 +#include "MEDFactoryClient.hxx"
 +#include "MEDPresentationManager_i.hxx"
+ #include <QTimer>
  
  #include <sstream>
  
@@@ -95,18 -86,22 +97,27 @@@ voi
  MEDModule::init()
  {
    // initialize MED module engine (load, if necessary)
 -  if ( CORBA::is_nil( myEngine ) ) {
 +  if ( CORBA::is_nil( _MED_engine ) ) {
      Engines::EngineComponent_var comp =
        SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "MED" );
 -    myEngine = MED_ORB::MED_Gen::_narrow( comp );
 +    _MED_engine = MED_ORB::MED_Gen::_narrow( comp );
    }
 +
 +  // Retrieve MEDFactory to get MEDPresentationManager (sometimes
 +  if ( ! _presManager ) {
 +      _presManager = MEDFactoryClient::getFactory()->getPresentationManager();
 +    }
  }
  
+ //void MEDModule::onEventLoopStarted()
+ //{
+ //  if(!getApp()->isMainEventLoopStarted())
+ //    {
+ //      QTimer::singleShot(100, this, SLOT(onEventLoopStarted()));
+ //      return;
+ //    }
+ //}
  void
  MEDModule::initialize( CAM_Application* app )
  {
@@@ -259,26 -257,10 +277,32 @@@ MEDModule::createModuleWidgets() 
    connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
      _presentationController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
  
++
 +  // Now that the workspace controller is created, ParaView core application has normally been started,
 +  // and hidden GUI elements have been created.  We can fire the VCR toolbar activation:
 +  initToolbars();
 +}
 +
 +void
 +MEDModule::initToolbars()
 +{
 +  // VCR and Time toolbars:
 +  SUIT_Desktop* dsk = getApp()->desktop();
 +  _pvGuiElements = PVViewer_GUIElements::GetInstance(dsk);
 +
 +  _pvGuiElements->getVCRToolbar();  // make sure VCR toolbar is built
 +  _pvGuiElements->setToolBarVisible(false);
 +  _pvGuiElements->setVCRTimeToolBarVisible(true);
 +
 +  // Emit signal in order to make sure that animation scene is set - same trick as in PARAVIS module activation
 +  QMetaObject::invokeMethod( pqPVApplicationCore::instance()->animationManager(),
 +                             "activeSceneChanged",
 +                             Q_ARG( pqAnimationScene*, pqPVApplicationCore::instance()->animationManager()->getActiveScene() ) );
++
+ #ifdef MED_HAS_QTTESTING
+   connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
+     _testController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
+ #endif
  }
  
  void
index 4c783a6bc06ce9c05428915d0437cc91cbb3a923,4a2e01851234a9dd92d1565f4ce48ca4198e905a..7541e3f919534227299daf9d2a097c0430144fd1
@@@ -107,12 -105,10 +112,17 @@@ private
    XmedDataModel* _xmedDataModel;
    PresentationController* _presentationController;
    ProcessingController* _processingController;
 -  static MED_ORB::MED_Gen_var myEngine;
++
 +  PVViewer_GUIElements*   _pvGuiElements;
 +
 +  static MED_ORB::MED_Gen_var _MED_engine;
 +
 +  // GUI needs to talk directly to the pres manager to activate a view, get some params, etc ...:
 +  static MEDCALC::MEDPresentationManager_ptr _presManager;
++
+ #ifdef MED_HAS_QTTESTING
+   TestController * _testController;
+ #endif
  };
  
  #endif
index 758a545024e9417756795bb4d7d83d6f308c702d,72be05804ac17160954a5377fc30d6c6f98c7798..8e1905a8c9258fa7a9e81e88f30453836d2d7a94
  
  #include <QObject>
  
 -class WidgetPresentationParameters : public QWidget
 +class MEDCALCGUI_DIALOGS_EXPORT WidgetPresentationParameters : public QWidget
  {
    Q_OBJECT
  public:
    WidgetPresentationParameters(QWidget* parent = 0);
    virtual ~WidgetPresentationParameters() {}