From c55144bfb0c9d1d77af03ad9d0c34e18781a0532 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 29 Jan 2016 09:41:33 +0100 Subject: [PATCH] [MEDCalc] add icons and menu for presentations --- src/MEDCalc/gui/DatasourceController.cxx | 157 +++------------- src/MEDCalc/gui/DatasourceController.hxx | 22 +-- src/MEDCalc/gui/MEDModule.cxx | 28 ++- src/MEDCalc/gui/MEDModule.hxx | 32 ++-- src/MEDCalc/gui/MED_images.ts | 56 +++++- src/MEDCalc/gui/MED_msg_en.ts | 101 ++++++++--- src/MEDCalc/gui/MED_msg_fr.ts | 103 ++++++++--- src/MEDCalc/gui/PresentationController.cxx | 167 ++++++++++++++++++ src/MEDCalc/gui/PresentationController.hxx | 36 ++++ src/MEDCalc/gui/WorkspaceController.cxx | 126 +++++++------ src/MEDCalc/gui/WorkspaceController.hxx | 20 ++- src/MEDCalc/res/CMakeLists.txt | 3 +- src/MEDCalc/res/presentations/CMakeLists.txt | 34 ++++ src/MEDCalc/res/presentations/pqGlyph16.png | Bin 0 -> 1023 bytes src/MEDCalc/res/presentations/pqGlyph24.png | Bin 0 -> 1441 bytes .../res/presentations/pqIsosurface16.png | Bin 0 -> 1044 bytes .../res/presentations/pqIsosurface24.png | Bin 0 -> 1532 bytes .../res/presentations/pqNodeMapData16.png | Bin 0 -> 404 bytes .../res/presentations/pqNodeMapData24.png | Bin 0 -> 1606 bytes src/MEDCalc/res/presentations/pqSlice16.png | Bin 0 -> 918 bytes src/MEDCalc/res/presentations/pqSlice24.png | Bin 0 -> 1087 bytes src/MEDCalc/res/presentations/pqWarp16.png | Bin 0 -> 808 bytes src/MEDCalc/res/presentations/pqWarp24.png | Bin 0 -> 999 bytes src/MEDCalc/res/presentations/scalarmap16.png | Bin 0 -> 658 bytes src/MEDCalc/res/presentations/scalarmap24.png | Bin 0 -> 1036 bytes 25 files changed, 591 insertions(+), 294 deletions(-) create mode 100644 src/MEDCalc/res/presentations/CMakeLists.txt create mode 100644 src/MEDCalc/res/presentations/pqGlyph16.png create mode 100644 src/MEDCalc/res/presentations/pqGlyph24.png create mode 100644 src/MEDCalc/res/presentations/pqIsosurface16.png create mode 100644 src/MEDCalc/res/presentations/pqIsosurface24.png create mode 100644 src/MEDCalc/res/presentations/pqNodeMapData16.png create mode 100644 src/MEDCalc/res/presentations/pqNodeMapData24.png create mode 100644 src/MEDCalc/res/presentations/pqSlice16.png create mode 100644 src/MEDCalc/res/presentations/pqSlice24.png create mode 100644 src/MEDCalc/res/presentations/pqWarp16.png create mode 100644 src/MEDCalc/res/presentations/pqWarp24.png create mode 100644 src/MEDCalc/res/presentations/scalarmap16.png create mode 100644 src/MEDCalc/res/presentations/scalarmap24.png diff --git a/src/MEDCalc/gui/DatasourceController.cxx b/src/MEDCalc/gui/DatasourceController.cxx index 636c4d95b..f7a96890b 100644 --- a/src/MEDCalc/gui/DatasourceController.cxx +++ b/src/MEDCalc/gui/DatasourceController.cxx @@ -53,12 +53,12 @@ // Datasource controller // ============================================================== // -//DatasourceController::DatasourceController(StandardApp_Module * salomeModule) -DatasourceController::DatasourceController(MEDModule * salomeModule) +//DatasourceController::DatasourceController(StandardApp_Module* salomeModule) +DatasourceController::DatasourceController(MEDModule* salomeModule) { STDLOG("Creating a DatasourceController"); _salomeModule = salomeModule; - _studyEditor = new SALOME_AppStudyEditor(_salomeModule->getApp()); + _studyEditor = _salomeModule->getStudyEditor(); _dlgChangeUnderlyingMesh = new DlgChangeUnderlyingMesh(_studyEditor); connect(_dlgChangeUnderlyingMesh,SIGNAL(inputValidated()), @@ -72,7 +72,6 @@ DatasourceController::DatasourceController(MEDModule * salomeModule) DatasourceController::~DatasourceController() { STDLOG("Deleting the DatasourceController"); - delete _studyEditor; } void DatasourceController::createActions() { @@ -103,6 +102,8 @@ void DatasourceController::createActions() { actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddImagesource()),icon,tooltip); // _salomeModule->addActionInToolbar(actionId); _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, menuId, 20); // // Actions for popup menu only @@ -113,37 +114,6 @@ void DatasourceController::createActions() { actionId = _salomeModule->createStandardAction(label,this,SLOT(OnExpandField()),icon); _salomeModule->addActionInPopupMenu(actionId); - // Create a view submenu with usual visualization functions - label = tr("LAB_VISUALIZE_SCALARMAP"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeScalarMap()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - - label = tr("LAB_VISUALIZE_CONTOUR"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeContour()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - - label = tr("LAB_VISUALIZE_VECTORFIELD"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeVectorField()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - - label = tr("LAB_VISUALIZE_SLICES"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeSlices()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - - label = tr("LAB_VISUALIZE_DEFLECTIONSHAPE"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeDeflectionShape()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - - label = tr("LAB_VISUALIZE_POINTSPRITE"); - icon = tr("ICO_DATASOURCE_VIEW"); - actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizePointSprite()),icon); - _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE")); - // Use in workspace label = tr("LAB_USE_IN_WORKSPACE"); icon = tr("ICO_DATASOURCE_USE"); @@ -197,27 +167,6 @@ DatasourceController::updateTreeViewWithNewDatasource(const MEDCALC::DatasourceH _salomeModule->getApp()->updateObjectBrowser(true); } -void -DatasourceController::updateTreeViewWithNewPresentation(long fieldId, long presentationId) -{ - if (presentationId < 0) { - std::cerr << "Unknown presentation\n"; - return; - } - - std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name"); - name = tr(name.c_str()).toStdString(); - std::string label = tr("ICO_MED_PRESENTATION").toStdString(); - - SalomeApp_Study* study = dynamic_cast(_salomeModule->application()->activeStudy()); - _PTR(Study) studyDS = study->studyDS(); - - _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str()); - - // update Object browser - _salomeModule->getApp()->updateObjectBrowser(true); -} - void DatasourceController::OnAddDatasource() { // Dialog to get the filename where the input data are read from @@ -291,7 +240,7 @@ void DatasourceController::OnExpandField() _studyEditor->updateActiveStudy(); // Get the selected objects in the study (SObject) - SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects(); + SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); for (int i=0; isize(); i++) { SALOMEDS::SObject_var soFieldseries = listOfSObject->at(i); @@ -308,7 +257,7 @@ void DatasourceController::OnExpandField() // contextual menu if the selected object is not conform // Then retrieve the list of fields in this timeseries - MEDCALC::FieldHandlerList * fieldHandlerList = + MEDCALC::FieldHandlerList* fieldHandlerList = MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldseriesId); // Finally, create an entry for each of the field @@ -324,71 +273,12 @@ void DatasourceController::OnExpandField() _salomeModule->updateObjBrowser(true); } -void DatasourceController::visualize(DatasourceEvent::EventType eventType) { - // We need a _studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - - // Get the selected objects in the study (SObject) - SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects(); - - // For each object, emit a signal to the workspace to request a - // visualisation using the tui command (so that the user can see how - // to make a view of an object from the tui console). - for (int i=0; isize(); i++) { - SALOMEDS::SObject_var soField = listOfSObject->at(i); - int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); - // If fieldId equals -1, then it means that it is not a field - // managed by the MED module, and we stop this function process. - if ( fieldId < 0 ) - continue; - - MEDCALC::FieldHandler * fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); - if (! fieldHandler) { - QMessageBox::warning(_salomeModule->getApp()->desktop(), - tr("Operation not allowed"), - tr("No field is defined")); - return; - } - - DatasourceEvent * event = new DatasourceEvent(); - event->eventtype = eventType; - XmedDataObject * dataObject = new XmedDataObject(); - dataObject->setFieldHandler(*fieldHandler); - event->objectdata = dataObject; - emit datasourceSignal(event); - } -} - -void DatasourceController::OnVisualizeScalarMap() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP); -} - -void DatasourceController::OnVisualizeContour() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_CONTOUR); -} - -void DatasourceController::OnVisualizeVectorField() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD); -} - -void DatasourceController::OnVisualizeSlices() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_SLICES); -} - -void DatasourceController::OnVisualizeDeflectionShape() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE); -} - -void DatasourceController::OnVisualizePointSprite() { - this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_POINT_SPRITE); -} - void DatasourceController::OnUseInWorkspace() { // We need a studyEditor updated on the active study _studyEditor->updateActiveStudy(); // Get the selected objects in the study (SObject) - SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects(); + SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); if ( listOfSObject->size() == 1 ) { // In this case we ask the name of the variable for the python // console @@ -421,7 +311,7 @@ void DatasourceController::OnUseInWorkspace() { return; } - MEDCALC::FieldHandler * fieldHandler = + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); if (! fieldHandler) { @@ -441,9 +331,9 @@ void DatasourceController::OnUseInWorkspace() { } alias = dialog.getAlias(); - DatasourceEvent * event = new DatasourceEvent(); + DatasourceEvent* event = new DatasourceEvent(); event->eventtype = DatasourceEvent::EVENT_USE_OBJECT; - XmedDataObject * dataObject = new XmedDataObject(); + XmedDataObject* dataObject = new XmedDataObject(); dataObject->setFieldHandler(*fieldHandler); event->objectdata = dataObject; event->objectalias = alias; @@ -464,11 +354,11 @@ void DatasourceController::OnUseInWorkspace() { bool isInWorkspace = _studyEditor->getParameterBool(soField,OBJECT_IS_IN_WORKSPACE); if ( !isInWorkspace ) { int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); - MEDCALC::FieldHandler * fieldHandler = + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); - DatasourceEvent * event = new DatasourceEvent(); + DatasourceEvent* event = new DatasourceEvent(); event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT; - XmedDataObject * dataObject = new XmedDataObject(); + XmedDataObject* dataObject = new XmedDataObject(); dataObject->setFieldHandler(*fieldHandler); event->objectdata = dataObject; emit datasourceSignal(event); @@ -496,7 +386,7 @@ void DatasourceController::OnChangeUnderlyingMesh() { // Get the selected objects in the study (SObject). In cas of a // multiple selection, we consider only the first item. At least one // item must be selected. - SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects(); + SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); if ( listOfSObject->size() > 0 ) { SALOMEDS::SObject_var soField = listOfSObject->at(0); int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); @@ -514,11 +404,11 @@ void DatasourceController::OnChangeUnderlyingMeshInputValidated() { int meshId = _dlgChangeUnderlyingMesh->getMeshId(); STDLOG("meshId = " << ToString(meshId)); int fieldId = _dlgChangeUnderlyingMesh->getFieldId(); - MEDCALC::FieldHandler * fieldHandler = + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); // We don't modify the original field but create first a duplicate - MEDCALC::FieldHandler * duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler); + MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler); MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId); // Request once more the duplicate to update the meta-data on this @@ -528,9 +418,9 @@ void DatasourceController::OnChangeUnderlyingMeshInputValidated() { // >>> // WARN: the following is a temporary code for test purpose // Automatically add in ws - DatasourceEvent * event = new DatasourceEvent(); + DatasourceEvent* event = new DatasourceEvent(); event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT; - XmedDataObject * dataObject = new XmedDataObject(); + XmedDataObject* dataObject = new XmedDataObject(); dataObject->setFieldHandler(*duplicate); event->objectdata = dataObject; emit datasourceSignal(event); @@ -547,7 +437,7 @@ void DatasourceController::OnInterpolateField() { // Get the selected objects in the study (SObject). In case of a // multiple selection, we consider only the first item. At least one // item must be selected. - SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects(); + SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); if ( listOfSObject->size() > 0 ) { SALOMEDS::SObject_var soField = listOfSObject->at(0); int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); @@ -603,9 +493,9 @@ void DatasourceController::OnInterpolateFieldInputValidated() { // >>> // WARN: the following is a temporary code for test purpose // Automatically add in ws - DatasourceEvent * event = new DatasourceEvent(); + DatasourceEvent* event = new DatasourceEvent(); event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT; - XmedDataObject * dataObject = new XmedDataObject(); + XmedDataObject* dataObject = new XmedDataObject(); dataObject->setFieldHandler(*result); event->objectdata = dataObject; emit datasourceSignal(event); @@ -622,7 +512,4 @@ DatasourceController::processWorkspaceEvent(const MEDCALC::MedEvent* event) MEDCALC::DatasourceHandler* datasourceHandler = MEDFactoryClient::getDataManager()->getDatasourceHandler(event->filename); this->updateTreeViewWithNewDatasource(datasourceHandler); } - else if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) { - this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId); - } } diff --git a/src/MEDCalc/gui/DatasourceController.hxx b/src/MEDCalc/gui/DatasourceController.hxx index 69b9f8cb6..b2097e38c 100644 --- a/src/MEDCalc/gui/DatasourceController.hxx +++ b/src/MEDCalc/gui/DatasourceController.hxx @@ -67,7 +67,7 @@ typedef struct { EVENT_ADD_PRESENTATION }; int eventtype; - XmedDataObject * objectdata; + XmedDataObject* objectdata; QString objectalias; } DatasourceEvent; @@ -82,7 +82,7 @@ class MEDCALCGUI_EXPORT DatasourceController: public QObject { Q_OBJECT public: - DatasourceController(MEDModule * salomeModule); + DatasourceController(MEDModule* salomeModule); ~DatasourceController(); void createActions(); @@ -91,37 +91,29 @@ public slots: // Callback connected to dialog box validation signals void OnChangeUnderlyingMeshInputValidated(); void OnInterpolateFieldInputValidated(); - void processWorkspaceEvent(const MEDCALC::MedEvent * event); + void processWorkspaceEvent(const MEDCALC::MedEvent* event); signals: - void datasourceSignal(const DatasourceEvent * event); + void datasourceSignal(const DatasourceEvent* event); protected slots: void OnAddDatasource(); void OnAddImagesource(); void OnExpandField(); - void OnVisualizeScalarMap(); - void OnVisualizeContour(); - void OnVisualizeVectorField(); - void OnVisualizeSlices(); - void OnVisualizeDeflectionShape(); - void OnVisualizePointSprite(); void OnUseInWorkspace(); void OnChangeUnderlyingMesh(); void OnInterpolateField(); private: - void visualize(DatasourceEvent::EventType); void addDatasource(const char* filename); void updateTreeViewWithNewDatasource(const MEDCALC::DatasourceHandler*); - void updateTreeViewWithNewPresentation(long fieldId, long presentationId); private: MEDModule* _salomeModule; - SALOME_AppStudyEditor * _studyEditor; + SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule - DlgChangeUnderlyingMesh * _dlgChangeUnderlyingMesh; - DlgInterpolateField * _dlgInterpolateField; + DlgChangeUnderlyingMesh* _dlgChangeUnderlyingMesh; + DlgInterpolateField* _dlgInterpolateField; }; diff --git a/src/MEDCalc/gui/MEDModule.cxx b/src/MEDCalc/gui/MEDModule.cxx index 50c7a4203..7b9fccbb3 100644 --- a/src/MEDCalc/gui/MEDModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -38,7 +38,7 @@ MED_ORB::MED_Gen_var MEDModule::myEngine; MEDModule::MEDModule() : - SalomeApp_Module("MED") + SalomeApp_Module("MED"), _studyEditor(0), _datasourceController(0), _workspaceController(0), _presentationController(0) { // Note also that we can't use the getApp() function here because // the initialize(...) function has not been called yet. @@ -48,7 +48,14 @@ MEDModule::MEDModule() : MEDModule::~MEDModule() { - // nothing to do + if (_studyEditor) + delete _studyEditor; + if (_datasourceController) + delete _datasourceController; + //if (_workspaceController) + // delete _workspaceController; + if (_presentationController) + delete _presentationController; } MED_ORB::MED_Gen_var @@ -169,17 +176,24 @@ MEDModule::deactivateModule( SUIT_Study* theStudy ) */ void MEDModule::createModuleWidgets() { + _studyEditor = new SALOME_AppStudyEditor(getApp()); _datasourceController = new DatasourceController(this); _workspaceController = new WorkspaceController(this); _xmedDataModel = new XmedDataModel(); _workspaceController->setDataModel(_xmedDataModel); _presentationController = new PresentationController(this); - connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent *)), - _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *))); + connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent*)), + _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent*))); - connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent *)), - _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent *))); + connect(_presentationController, SIGNAL(presentationSignal(const PresentationEvent*)), + _workspaceController, SLOT(processPresentationEvent(const PresentationEvent*))); + + connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)), + _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*))); + + connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)), + _presentationController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*))); } void @@ -191,7 +205,7 @@ MEDModule::createModuleActions() { int MEDModule::createStandardAction(const QString& label, - QObject * slotobject, + QObject* slotobject, const char* slotmember, const QString& iconName, const QString& tooltip) diff --git a/src/MEDCalc/gui/MEDModule.hxx b/src/MEDCalc/gui/MEDModule.hxx index 8f39391ca..508253dcd 100644 --- a/src/MEDCalc/gui/MEDModule.hxx +++ b/src/MEDCalc/gui/MEDModule.hxx @@ -25,6 +25,7 @@ #include "MEDCALCGUI.hxx" #include +#include #include "WorkspaceController.hxx" #include "XmedDataModel.hxx" @@ -54,26 +55,30 @@ public: static MED_ORB::MED_Gen_var engine(); - virtual void initialize( CAM_Application* app ); - virtual QString engineIOR() const; + virtual void initialize(CAM_Application* app); + virtual QString engineIOR() const; - virtual QString iconName() const; + virtual QString iconName() const; - virtual void windows( QMap& theMap ) const; - virtual void viewManagers( QStringList& theList ) const; + virtual void windows(QMap& theMap) const; + virtual void viewManagers(QStringList& theList) const; int createStandardAction(const QString& label, - QObject * slotobject, + QObject* slotobject, const char* slotmember, const QString& iconName, const QString& tooltip=QString()); - void addActionInPopupMenu(int actionId,const QString& menus="",const QString& rule="client='ObjectBrowser'"); + void addActionInPopupMenu(int actionId, + const QString& menus="", + const QString& rule="client='ObjectBrowser'"); MEDCALC::MEDPresentationViewMode getSelectedViewMode(); + inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; } + public slots: - virtual bool activateModule( SUIT_Study* theStudy ); - virtual bool deactivateModule( SUIT_Study* theStudy ); + virtual bool activateModule(SUIT_Study* theStudy); + virtual bool deactivateModule(SUIT_Study* theStudy); private: void createModuleWidgets(); @@ -81,10 +86,11 @@ private: static void init(); private: - DatasourceController * _datasourceController; - WorkspaceController * _workspaceController; - XmedDataModel * _xmedDataModel; - PresentationController * _presentationController; + SALOME_AppStudyEditor* _studyEditor; + DatasourceController* _datasourceController; + WorkspaceController* _workspaceController; + XmedDataModel* _xmedDataModel; + PresentationController* _presentationController; static MED_ORB::MED_Gen_var myEngine; }; diff --git a/src/MEDCalc/gui/MED_images.ts b/src/MEDCalc/gui/MED_images.ts index 86476bca1..3f7fcf1e0 100644 --- a/src/MEDCalc/gui/MED_images.ts +++ b/src/MEDCalc/gui/MED_images.ts @@ -3,10 +3,6 @@ @default - - ICO_MED_PRESENTATION - pqAppIcon16.png - ICO_IMPORT_MED datasource_add.png @@ -43,10 +39,6 @@ ICO_DATASOURCE_USE datasource_use.png - - ICO_DATASOURCE_VIEW - datasource_view.png - ICO_FOLDER folder.png @@ -71,5 +63,53 @@ ICO_WORKSPACE_SAVE workspace_save.png + + ICO_PRESENTATION_SCALAR_MAP + scalarmap24.png + + + ICO_PRESENTATION_CONTOUR + pqIsosurface24.png + + + ICO_PRESENTATION_VECTOR_FIELD + pqGlyph24.png + + + ICO_PRESENTATION_SLICES + pqSlice24.png + + + ICO_PRESENTATION_DEFLECTION_SHAPE + pqWarp24.png + + + ICO_PRESENTATION_POINT_SPRITE + pqNodeMapData24.png + + + ICO_MEDPresentationScalarMap + scalarmap16.png + + + ICO_MEDPresentationContour + pqIsosurface16.png + + + ICO_MEDPresentationVectorField + pqGlyph16.png + + + ICO_MEDPresentationSlices + pqSlice16.png + + + ICO_MEDPresentationDeflectionShape + pqWarp16.png + + + ICO_MEDPresentationPointSprite + pqNodeMapData16.png + diff --git a/src/MEDCalc/gui/MED_msg_en.ts b/src/MEDCalc/gui/MED_msg_en.ts index a1c303a63..8a6d8934e 100644 --- a/src/MEDCalc/gui/MED_msg_en.ts +++ b/src/MEDCalc/gui/MED_msg_en.ts @@ -35,62 +35,109 @@ TIP_VIEW_MODE_SPLIT_VIEW Split - - - DatasourceController - - LAB_ADD_DATA_SOURCE - Add Data Source + LAB_PRESENTATION_SCALAR_MAP + Scalar map - - TIP_ADD_DATA_SOURCE - Add a file data source (file providing med data) + TIP_PRESENTATION_SCALAR_MAP + Scalar map - - LAB_ADD_IMAGE_SOURCE - Add Image Source + LAB_PRESENTATION_CONTOUR + Contour - - TIP_ADD_IMAGE_SOURCE - Create a Data Source from an image file + TIP_PRESENTATION_CONTOUR + Contour - - LAB_EXPAND_FIELD - Expand field timeseries + LAB_PRESENTATION_VECTOR_FIELD + Vector field + + + TIP_PRESENTATION_VECTOR_FIELD + Vector field + + + LAB_PRESENTATION_SLICES + Slices + + + TIP_PRESENTATION_SLICES + Slices + + + LAB_PRESENTATION_DEFLECTION_SHAPE + Deflection shape + + + TIP_PRESENTATION_DEFLECTION_SHAPE + Deflection shape + + + LAB_PRESENTATION_POINT_SPRITE + Point sprite + + + TIP_PRESENTATION_POINT_SPRITE + Point sprite + + + MENU_PRESENTATIONS + Presentations - LAB_VISUALIZE_SCALARMAP + MEDPresentationScalarMap Scalar map - LAB_VISUALIZE_CONTOUR + MEDPresentationContour Contour - LAB_VISUALIZE_VECTORFIELD + MEDPresentationVectorField Vector field - LAB_VISUALIZE_SLICES + MEDPresentationSlices Slices - LAB_VISUALIZE_DEFLECTIONSHAPE + MEDPresentationDeflectionShape Deflection shape - LAB_VISUALIZE_POINTSPRITE + MEDPresentationPointSprite Point sprite + + + DatasourceController + + + LAB_ADD_DATA_SOURCE + Add Data Source + - - LAB_VISUALIZE - Visualize + + TIP_ADD_DATA_SOURCE + Add a file data source (file providing med data) + + + + LAB_ADD_IMAGE_SOURCE + Add Image Source + + + + TIP_ADD_IMAGE_SOURCE + Create a Data Source from an image file + + + + LAB_EXPAND_FIELD + Expand field timeseries diff --git a/src/MEDCalc/gui/MED_msg_fr.ts b/src/MEDCalc/gui/MED_msg_fr.ts index 812cfaeb2..290fe00fb 100644 --- a/src/MEDCalc/gui/MED_msg_fr.ts +++ b/src/MEDCalc/gui/MED_msg_fr.ts @@ -35,66 +35,113 @@ TIP_VIEW_MODE_SPLIT_VIEW Scinder - - - DatasourceController - MEDPresentationScalarMap + LAB_PRESENTATION_SCALAR_MAP Carte scalaire - - LAB_ADD_DATA_SOURCE - Importer des données MED + TIP_PRESENTATION_SCALAR_MAP + Carte scalaire - - TIP_ADD_DATA_SOURCE - Ajouter des données par import de fichiers MED + LAB_PRESENTATION_CONTOUR + Contour - - LAB_ADD_IMAGE_SOURCE - Ajouter une image + TIP_PRESENTATION_CONTOUR + Contour - - TIP_ADD_IMAGE_SOURCE - Ajouter des données par import d'un fichier image + LAB_PRESENTATION_VECTOR_FIELD + Champ de vecteurs - - LAB_EXPAND_FIELD - Étendre les series temporelles du champ + TIP_PRESENTATION_VECTOR_FIELD + Champ de vecteurs - LAB_VISUALIZE_SCALARMAP + LAB_PRESENTATION_SLICES + Coupes + + + TIP_PRESENTATION_SLICES + Coupes + + + LAB_PRESENTATION_DEFLECTION_SHAPE + Déformée + + + TIP_PRESENTATION_DEFLECTION_SHAPE + Déformée + + + LAB_PRESENTATION_POINT_SPRITE + Point sprite + + + TIP_PRESENTATION_POINT_SPRITE + Point sprite + + + MENU_PRESENTATIONS + Présentations + + + MEDPresentationScalarMap Carte scalaire - LAB_VISUALIZE_CONTOUR + MEDPresentationContour Contour - LAB_VISUALIZE_VECTORFIELD + MEDPresentationVectorField Champ de vecteurs - LAB_VISUALIZE_SLICES + MEDPresentationSlices Coupes - LAB_VISUALIZE_DEFLECTIONSHAPE + MEDPresentationDeflectionShape Déformée - LAB_VISUALIZE_POINTSPRITE + MEDPresentationPointSprite Point sprite + + + DatasourceController + + MEDPresentationScalarMap + Carte scalaire + + + + LAB_ADD_DATA_SOURCE + Importer des données MED + - - LAB_VISUALIZE - Visualiser + + TIP_ADD_DATA_SOURCE + Ajouter des données par import de fichiers MED + + + + LAB_ADD_IMAGE_SOURCE + Ajouter une image + + + + TIP_ADD_IMAGE_SOURCE + Ajouter des données par import d'un fichier image + + + + LAB_EXPAND_FIELD + Étendre les series temporelles du champ diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index 0e0bf8441..ea2aa5752 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -18,9 +18,21 @@ // #include "PresentationController.hxx" +#include "DatasourceConstants.hxx" #include "MEDModule.hxx" #include "Basics_Utils.hxx" #include "QtxActionGroup.h" +#include "MEDFactoryClient.hxx" + +#include +#include +#include + +#include +#include + +#include +#include static const int OPTIONS_VIEW_MODE_ID = 943; static const int OPTIONS_VIEW_MODE_REPLACE_ID = 944; @@ -32,6 +44,7 @@ PresentationController::PresentationController(MEDModule* salomeModule) { STDLOG("Creating a PresentationController"); _salomeModule = salomeModule; + _studyEditor = _salomeModule->getStudyEditor(); } PresentationController::~PresentationController() @@ -45,6 +58,9 @@ PresentationController::createActions() STDLOG("Creating PresentationController actions"); int toolbarId = _salomeModule->createTool("View Mode", "PresentationToolbar"); + int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, 1); + + // View Mode QtxActionGroup* ag = _salomeModule->createActionGroup(OPTIONS_VIEW_MODE_ID, true); ag->setText("View mode"); ag->setUsesDropDown(true); @@ -76,7 +92,55 @@ PresentationController::createActions() _salomeModule->createTool(OPTIONS_VIEW_MODE_ID, toolbarId); + // Presentations + label = tr("LAB_PRESENTATION_SCALAR_MAP"); + tooltip = tr("TIP_PRESENTATION_SCALAR_MAP"); + QString icon = tr("ICO_PRESENTATION_SCALAR_MAP"); + int actionId; + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeScalarMap()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); + + label = tr("LAB_PRESENTATION_CONTOUR"); + tooltip = tr("TIP_PRESENTATION_CONTOUR"); + icon = tr("ICO_PRESENTATION_CONTOUR"); + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeContour()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); + + label = tr("LAB_PRESENTATION_VECTOR_FIELD"); + tooltip = tr("TIP_PRESENTATION_VECTOR_FIELD"); + icon = tr("ICO_PRESENTATION_VECTOR_FIELD"); + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeVectorField()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); + + label = tr("LAB_PRESENTATION_SLICES"); + tooltip = tr("TIP_PRESENTATION_SLICES"); + icon = tr("ICO_PRESENTATION_SLICES"); + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeSlices()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); + label = tr("LAB_PRESENTATION_DEFLECTION_SHAPE"); + tooltip = tr("TIP_PRESENTATION_DEFLECTION_SHAPE"); + icon = tr("ICO_PRESENTATION_DEFLECTION_SHAPE"); + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeDeflectionShape()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); + + label = tr("LAB_PRESENTATION_POINT_SPRITE"); + tooltip = tr("TIP_PRESENTATION_POINT_SPRITE"); + icon = tr("ICO_PRESENTATION_POINT_SPRITE"); + actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizePointSprite()),icon,tooltip); + _salomeModule->createTool(actionId, toolbarId); + _salomeModule->action(actionId)->setIconVisibleInMenu(true); + _salomeModule->createMenu(actionId, presentationMenuId); } MEDCALC::MEDPresentationViewMode @@ -95,3 +159,106 @@ PresentationController::getSelectedViewMode() return MEDCALC::VIEW_MODE_SPLIT_VIEW; } } + +void +PresentationController::visualize(PresentationEvent::EventType eventType) +{ + // We need a _studyEditor updated on the active study + _studyEditor->updateActiveStudy(); + + // Get the selected objects in the study (SObject) + SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); + + // For each object, emit a signal to the workspace to request a + // visualisation using the tui command (so that the user can see how + // to make a view of an object from the tui console). + for (int i=0; isize(); i++) { + SALOMEDS::SObject_var soField = listOfSObject->at(i); + int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID); + // If fieldId equals -1, then it means that it is not a field + // managed by the MED module, and we stop this function process. + if ( fieldId < 0 ) + continue; + + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId); + if (! fieldHandler) { + QMessageBox::warning(_salomeModule->getApp()->desktop(), + tr("Operation not allowed"), + tr("No field is defined")); + return; + } + + PresentationEvent* event = new PresentationEvent(); + event->eventtype = eventType; + XmedDataObject* dataObject = new XmedDataObject(); + dataObject->setFieldHandler(*fieldHandler); + event->objectdata = dataObject; + emit presentationSignal(event); + } +} + +void +PresentationController::OnVisualizeScalarMap() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP); +} + +void +PresentationController::OnVisualizeContour() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR); +} + +void +PresentationController::OnVisualizeVectorField() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD); +} + +void +PresentationController::OnVisualizeSlices() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SLICES); +} + +void +PresentationController::OnVisualizeDeflectionShape() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE); +} + +void +PresentationController::OnVisualizePointSprite() +{ + this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE); +} + +void +PresentationController::updateTreeViewWithNewPresentation(long fieldId, long presentationId) +{ + if (presentationId < 0) { + std::cerr << "Unknown presentation\n"; + return; + } + + std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name"); + std::string icon = std::string("ICO_") + name; + name = tr(name.c_str()).toStdString(); + std::string label = tr(icon.c_str()).toStdString(); + + SalomeApp_Study* study = dynamic_cast(_salomeModule->application()->activeStudy()); + _PTR(Study) studyDS = study->studyDS(); + + _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str()); + + // update Object browser + _salomeModule->getApp()->updateObjectBrowser(true); +} + +void +PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event) +{ + if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) { + this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId); + } +} diff --git a/src/MEDCalc/gui/PresentationController.hxx b/src/MEDCalc/gui/PresentationController.hxx index fbd90737f..f48f8e77b 100644 --- a/src/MEDCalc/gui/PresentationController.hxx +++ b/src/MEDCalc/gui/PresentationController.hxx @@ -23,8 +23,27 @@ #include #include "MEDCALCGUI.hxx" +#include "MEDEventListener_i.hxx" #include #include CORBA_SERVER_HEADER(MEDPresentationManager) +#include CORBA_CLIENT_HEADER(MEDDataManager) + +#include "XmedDataModel.hxx" +#include + +typedef struct { + enum EventType { + EVENT_VIEW_OBJECT_CONTOUR, + EVENT_VIEW_OBJECT_DEFLECTION_SHAPE, + EVENT_VIEW_OBJECT_POINT_SPRITE, + EVENT_VIEW_OBJECT_SCALAR_MAP, + EVENT_VIEW_OBJECT_SLICES, + EVENT_VIEW_OBJECT_VECTOR_FIELD + }; + int eventtype; + XmedDataObject* objectdata; + QString objectalias; +} PresentationEvent; class MEDModule; @@ -39,8 +58,25 @@ public: MEDCALC::MEDPresentationViewMode getSelectedViewMode(); +signals: + void presentationSignal(const PresentationEvent* event); + +protected slots: + void OnVisualizeScalarMap(); + void OnVisualizeContour(); + void OnVisualizeVectorField(); + void OnVisualizeSlices(); + void OnVisualizeDeflectionShape(); + void OnVisualizePointSprite(); + void processWorkspaceEvent(const MEDCALC::MedEvent* event); + +private: + void visualize(PresentationEvent::EventType); + void updateTreeViewWithNewPresentation(long fieldId, long presentationId); + private: MEDModule* _salomeModule; + SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule }; diff --git a/src/MEDCalc/gui/WorkspaceController.cxx b/src/MEDCalc/gui/WorkspaceController.cxx index 0fc4f443f..3137c82d2 100644 --- a/src/MEDCalc/gui/WorkspaceController.cxx +++ b/src/MEDCalc/gui/WorkspaceController.cxx @@ -40,8 +40,8 @@ * and containing a tree view for rendering a hierarchical data * model. This datamodel contains the objects used in the workspace. */ -//WorkspaceController::WorkspaceController(StandardApp_Module * salomeModule) -WorkspaceController::WorkspaceController(MEDModule * salomeModule) +//WorkspaceController::WorkspaceController(StandardApp_Module* salomeModule) +WorkspaceController::WorkspaceController(MEDModule* salomeModule) : TreeGuiManager(salomeModule->getApp(), "Workspace") { _salomeModule = salomeModule; @@ -67,8 +67,8 @@ WorkspaceController::WorkspaceController(MEDModule * salomeModule) // with other parts of the application, in particular the python // console that could retrieve this IOR using the // getEventListenerIOR() function of the MEDDataManager. - SalomeApp_Application * salomeApp = salomeModule->getApp(); - const char * medEventListenerIOR = + SalomeApp_Application* salomeApp = salomeModule->getApp(); + const char* medEventListenerIOR = salomeApp->orb()->object_to_string(medEventListenerServant); MEDFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR); @@ -178,7 +178,7 @@ void WorkspaceController::_importItemList(QStringList itemNameIdList) { * console (see _importItemList). */ void WorkspaceController::_importItem(QString itemNameId) { - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { LOG("No data model associated to this tree view"); return; @@ -186,8 +186,8 @@ void WorkspaceController::_importItem(QString itemNameId) { // We can request the dataModel to obtain the dataObject associated // to this item (iteNameId is a TreeView id, Qt stuff only). - XmedDataObject * dataObject = - (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId)); + XmedDataObject* dataObject = + (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId)); if ( dataObject == NULL ) { LOG("WorkspaceController: WARN! No data object associated to the item "<getFieldHandler(); + MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); STDLOG("Field: mesh="<meshname<<" name="<fieldname); // Finally, we can import the field @@ -211,14 +211,14 @@ void WorkspaceController::_importItem(QString itemNameId) { * options or simply specify the alias (i.e. the name of the python * variable). */ -void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler, +void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler, bool askForOptions, - const char * alias) + const char* alias) { STDLOG("alias="<fieldname); } @@ -260,11 +260,11 @@ void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldH * emitted from the MEDEventListener. It processes events coming from * the python console. */ -void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) { +void WorkspaceController::processMedEvent(const MEDCALC::MedEvent* event) { STDLOG("WorkspaceController::processMedEvent"); STDLOG("dataId :"<dataId); - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { STDLOG("No data model associated to this tree view"); return; @@ -275,16 +275,16 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) { } else if ( event->type == MEDCALC::EVENT_PUT_IN_WORKSPACE ) { STDLOG("add new field"); - MEDCALC::FieldHandler * fieldHandler = + MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(event->dataId); - XmedDataObject * dataObject = (XmedDataObject *)dataModel->newDataObject(); + XmedDataObject* dataObject = (XmedDataObject*)dataModel->newDataObject(); dataObject->setFieldHandler(*fieldHandler); this->getDataTreeModel()->addData(dataObject); } else if ( event->type == MEDCALC::EVENT_REMOVE_FROM_WORKSPACE ) { STDLOG("remove field"); - std::map::iterator itr = dataModel->begin(); + std::map::iterator itr = dataModel->begin(); for ( ; itr != dataModel->end(); ++itr) { XmedDataObject* obj = dynamic_cast(itr->second); if (obj->getFieldHandler()->id == event->dataId) { @@ -297,7 +297,7 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) { } else if ( event->type == MEDCALC::EVENT_CLEAN_WORKSPACE ) { STDLOG("clean workspace"); - std::map::iterator itr = dataModel->begin(); + std::map::iterator itr = dataModel->begin(); for ( ; itr != dataModel->end(); ++itr) { XmedDataObject* obj = dynamic_cast(itr->second); std::string itemNameId = obj->getNameId(); @@ -319,7 +319,7 @@ void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) { * name is requested to the user using a file chooser dialog box */ void WorkspaceController::_saveItemList(QStringList itemNameIdList) { - XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel()); + XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel()); dataProcessor->process(itemNameIdList); MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); delete dataProcessor; @@ -341,7 +341,7 @@ void WorkspaceController::_saveItemList(QStringList itemNameIdList) { * This function remove the selected item from workspace. */ void WorkspaceController::_removeItemList(QStringList itemNameIdList) { - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { LOG("No data model associated to this tree view"); return; @@ -352,8 +352,8 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) { // We can request the dataModel to obtain the dataObject associated // to this item (iteNameId is a TreeView id, Qt stuff only). - XmedDataObject * dataObject = - (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId)); + XmedDataObject* dataObject = + (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId)); if ( dataObject == NULL ) { LOG("WorkspaceController: WARN! No data object associated to the item "<getFieldHandler(); + MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); STDLOG("Field: mesh="<meshname<<" name="<fieldname); // Remove the field variable from console @@ -382,7 +382,7 @@ void WorkspaceController::_removeItemList(QStringList itemNameIdList) { * scalar map of the first item to start the job. */ void WorkspaceController::_exportItemList(QStringList itemNameIdList) { - XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel()); + XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel()); dataProcessor->process(itemNameIdList); MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList(); delete dataProcessor; @@ -390,24 +390,24 @@ void WorkspaceController::_exportItemList(QStringList itemNameIdList) { // _GBO_ We use a temporary file to proceed with this export to // paravis. I'm sure it could be better in a futur version or when I // will get a better understanding of paravis API. - const char * tmpfilename = "/tmp/medcalc_export2paravis.med"; + const char* tmpfilename = "/tmp/medcalc_export2paravis.med"; MEDFactoryClient::getDataManager()->saveFields(tmpfilename, fieldIdList); // We import the whole file but create a scalar map for the first // selected field only (it's just an export to continue the job in // paravis) - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { STDLOG("No data model associated to this tree view"); return; } QString itemNameId = itemNameIdList[0]; - XmedDataObject * dataObject = (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId)); + XmedDataObject* dataObject = (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId)); if ( dataObject == NULL ) { LOG("WorkspaceController: WARN! No data object associated to the item "<getFieldHandler(); + MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; /* commands+=QString("from xmed.driver_pvis import pvis_scalarmap"); @@ -434,7 +434,7 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) { // __GBO__: In this version, we consider only the first field in the selection QString itemNameId = itemNameIdList[0]; - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { LOG("No data model associated to this tree view"); return; @@ -442,8 +442,8 @@ void WorkspaceController::_viewItemList(QStringList itemNameIdList) { // We can request the dataModel to obtain the dataObject associated // to this item (iteNameId is a TreeView id, Qt stuff only). - XmedDataObject * dataObject = - (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId)); + XmedDataObject* dataObject = + (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId)); if ( dataObject == NULL ) { LOG("WorkspaceController: WARN! No data object associated to the item "<getFieldHandler(); + MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); // And finally, we can create the set of medcalc instructions to // generate the scalar map on this field. @@ -477,8 +477,8 @@ WorkspaceController::_getViewMode() { * DatasourceController. The connection between the datasource signal * and this slot is realized by the main class MEDModule. */ -void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) { - XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel(); +void WorkspaceController::processDatasourceEvent(const DatasourceEvent* event) { + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); if ( dataModel == NULL ) { STDLOG("No data model associated to this tree view"); return; @@ -491,7 +491,7 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) // options such that "change the underlying mesh". // <<< - XmedDataObject * dataObject = event->objectdata; + XmedDataObject* dataObject = event->objectdata; if ( event->eventtype == DatasourceEvent::EVENT_IMPORT_OBJECT ) { std::cout << "IMPORT object in workspace: " << dataObject->toString() << std::endl; @@ -516,62 +516,86 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) askForOptions, QCHARSTAR(event->objectalias)); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) { + else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) { + QStringList commands; + commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias); + _consoleDriver->exec(commands); + } + else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) { + QStringList commands; + commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias); + _consoleDriver->exec(commands); + } + else { + STDLOG("The event "<eventtype<<" is not implemented yet"); + } +} +/** + * This slot can process the event coming from the + * DatasourceController. The connection between the datasource signal + * and this slot is realized by the main class MEDModule. + */ +void WorkspaceController::processPresentationEvent(const PresentationEvent* event) { + XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel(); + if ( dataModel == NULL ) { + STDLOG("No data model associated to this tree view"); + return; + } + + // >>> + // __GBO__ To know what to do we should test the type, because the + // object could be a mesh, a timeseries or a single field. We test + // here the case of a single field. Moreover, there could have + // options such that "change the underlying mesh". + // <<< + + XmedDataObject* dataObject = event->objectdata; + + if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeScalarMap(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_CONTOUR ) { + else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeContour(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) { + else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeVectorField(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SLICES ) { + else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SLICES ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeSlices(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) { + else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeDeflectionShape(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_POINT_SPRITE ) { + else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE ) { QString viewMode = _getViewMode(); MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakePointSprite(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); _consoleDriver->exec(commands); } - else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) { - QStringList commands; - commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias); - _consoleDriver->exec(commands); - } - else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) { - QStringList commands; - commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias); - _consoleDriver->exec(commands); - } else { STDLOG("The event "<eventtype<<" is not implemented yet"); } - } void WorkspaceController::OnSaveWorkspace() { diff --git a/src/MEDCalc/gui/WorkspaceController.hxx b/src/MEDCalc/gui/WorkspaceController.hxx index 969fab86a..876ae6eab 100644 --- a/src/MEDCalc/gui/WorkspaceController.hxx +++ b/src/MEDCalc/gui/WorkspaceController.hxx @@ -26,6 +26,7 @@ #include "MEDEventListener_i.hxx" #include "XmedConsoleDriver.hxx" #include "DatasourceController.hxx" +#include "PresentationController.hxx" #include "MEDCALCGUI.hxx" #include @@ -46,7 +47,7 @@ class MEDCALCGUI_EXPORT WorkspaceController: public TreeGuiManager { Q_OBJECT public: - WorkspaceController(MEDModule * salomeModule); + WorkspaceController(MEDModule* salomeModule); ~WorkspaceController(); void createActions(); @@ -56,20 +57,21 @@ public slots: void processItemList(QStringList itemNameIdList, int actionId); // Internal slots - void processMedEvent(const MEDCALC::MedEvent * event); - void processDatasourceEvent(const DatasourceEvent * event); + void processMedEvent(const MEDCALC::MedEvent* event); + void processDatasourceEvent(const DatasourceEvent* event); + void processPresentationEvent(const PresentationEvent* event); void OnSaveWorkspace(); void OnCleanWorkspace(); signals: - void workspaceSignal(const MEDCALC::MedEvent * event); + void workspaceSignal(const MEDCALC::MedEvent* event); private: void _importItem(QString itemNameId); void _importItemList(QStringList itemNameIdList); - void _importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler, + void _importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler, bool askForOptions, - const char * alias=NULL); + const char* alias=NULL); void _exportItemList(QStringList itemNameIdList); void _saveItemList(QStringList itemNameIdList); @@ -78,9 +80,9 @@ private: QString _getViewMode(); private: - XmedConsoleDriver * _consoleDriver; - MEDModule * _salomeModule; - MEDEventListener_i * _medEventListener; + XmedConsoleDriver* _consoleDriver; + MEDModule* _salomeModule; + MEDEventListener_i* _medEventListener; // This structure is intended to memorized in a bundle the whole set // of integers identifying the actions of the popup menu associated diff --git a/src/MEDCalc/res/CMakeLists.txt b/src/MEDCalc/res/CMakeLists.txt index fb78aa13c..c46ae2bbb 100644 --- a/src/MEDCalc/res/CMakeLists.txt +++ b/src/MEDCalc/res/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D +# Copyright (C) 2007-2016 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 @@ -18,6 +18,7 @@ # ADD_SUBDIRECTORY(testfiles) +ADD_SUBDIRECTORY(presentations) SET(MED_RESOURCES_FILES datasource_add.png diff --git a/src/MEDCalc/res/presentations/CMakeLists.txt b/src/MEDCalc/res/presentations/CMakeLists.txt new file mode 100644 index 000000000..b5ca40881 --- /dev/null +++ b/src/MEDCalc/res/presentations/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (C) 2016 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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(MED_RESOURCES_FILES + pqGlyph16.png + pqGlyph24.png + pqIsosurface16.png + pqIsosurface24.png + pqNodeMapData16.png + pqNodeMapData24.png + pqSlice16.png + pqSlice24.png + pqWarp16.png + pqWarp24.png + scalarmap16.png + scalarmap24.png + ) +INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}) diff --git a/src/MEDCalc/res/presentations/pqGlyph16.png b/src/MEDCalc/res/presentations/pqGlyph16.png new file mode 100644 index 0000000000000000000000000000000000000000..ff441b0a4602dc5c8fb4290969e8acdd227f43b5 GIT binary patch literal 1023 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jBr6 z3OgE!#Dqiu00VzXL_t(I%WacgOq+ES#-H=HKw%7lx|WZkz}O~GBrFqfBrv)mE@o=f zQrH5MxKK2q7=~UkTK7M&=0;%Q7z+5j#FP7cN|@|3tC4LrYuJNB!+{R4yD4@{=ce`2?`>^gX~=Loa; zV(jD3K9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QVyRqLFW#awjgE;KbBIN&V5Db`pKC7OS9R21J%kKPk zCX=bz@1H($cZ28o4_LN$0f>;IJTdL$9Bt{`(euuK0Us>Vwa`<~t^fc407*qoM6N<$ Eg0Ghky#N3J literal 0 HcmV?d00001 diff --git a/src/MEDCalc/res/presentations/pqSlice16.png b/src/MEDCalc/res/presentations/pqSlice16.png new file mode 100644 index 0000000000000000000000000000000000000000..5b1f1cc656053f67bc48b6b52c4c1b25ca52fe8f GIT binary patch literal 918 zcmV;H18Mw;P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jBr6 z3OX{SY90Ro00S0DL_t(I%T1F@Xk29&hM(_0XKtB^rZKi@B?&QFMU#f2)C5H;g48Q@ zBbl9B7v@9|ZwnW?Q-nFwB4k%va0Xp?OI0YMX3l8Sw$P*&E8(2a3RReP-d+g(x?HfcyP*m8CH<5l8 z^eI(|5pda-b-FPZUQOIUV6 z>0rQah41-(ZUW>Jpy4XiL3=ApTYq#UZrSR8v^O4EZr7P}bK*wJ?CrmUp3x|q&Km!G zT`0f*!KuaVw{-%4y8`p796UdLVR7$~N9I!Oy1Q?1Ke7>{uV;Y1p?(&NGh8bfB9Zw6 z+>8Q_0gQ;afAVioU9Mksi4nDJ5;ZY86Wz2+Coyd!nMzqF=5_HB`%%t335#AXY89JmP_nD;Lle{aYYlSt@xD}gfXenF` zuNCH;^_e2Jq+O#AADBjE5cu6>{oGF|=TtTM;pC^!)r!^9Vrj-y!lJIXmbfzemt6Sj zqEnb!`0@HTwP6!6Z)m7f2uFd{n^X42UR5iP(Qfy|4>um*N&>rRg00oo)Y_$@m;d3+ ztoKT~2jw;3e$aRQO#XZMA5M$!=hPcdKdz3RCKbe}IKPE8dHeWe{!4EnJ*=v)i%6TQ zp2+(7&u>VzEfN5JCWrTOx>rLvfun&KJq>aQxE*-Q&*XmDAs>DwhwK;z<6c^_eoj4a stW)6>PzH`={ruT&$S8!_OzsBr9}@R_>r<{UmjD0&07*qoM6N<$g1T^?s{jB1 literal 0 HcmV?d00001 diff --git a/src/MEDCalc/res/presentations/pqSlice24.png b/src/MEDCalc/res/presentations/pqSlice24.png new file mode 100644 index 0000000000000000000000000000000000000000..070ce3bda466eb48ec29e873917fe3699d4262b9 GIT binary patch literal 1087 zcmV-F1i<@=P)RCwBi zR?Ti3RTTc_&Ws(~F}CZ_g48xa2qZ+Sh8-)CA|c2MFM&-h@c=k)5S{?@1e6U(Y}&p- ziUbm3<06Cvi^i=`QR3Jc|9k#9=jKc_apQQbqdUHH=ljn2&bjxD5yvqM!@yT>Dvbv1?|2`2tT1r5GB>_u3ZS%`y`vmYr zNVnwqspUdoY9j4Gn(U0AvHQh?RQUI0v2zZLJT^)ZjH-{g>S@D70Y6vT^1LoqP9kf5 z^TT6H$Z9e&!A2s5S_@&nYQV0Tu&*kpjD;w+5JncfP{GT%h-f`|{fyRsO%d{Y%@mno zr6gnEhBhmL{l1IU*9%xN^T?VjFqN&PjH3vC>=D5X(_oCg9kX-~BqtE(8saR@2*itB zTHLVTiV*yk!=$26e6N7=^(rhPP=-Pjg*ZCsVBDT!^qeH};{>9X%2g?uv@S?~tMFQG zvvj+R;F-eVuMQ3=9XIdX!0>p4P73g;EwJ)za0&;3nM{GZkG`wwXPf zvnd}cqmYvLa)Km^!HWUy#E9xXBs(2vRF(mG9!7!8hluHyyOK@HJh`@$GF?p28NiEX za7hN1B8YvQxJMXzCsh93ic7__rGHgmJ5ky2VJJKUZGWG|j zM8Om)A1_RFnxM{`Eb(OA9b@G6NhUhad{=wgn;mLd7?i=8WHcG*NccV8VDm?Kx=a~- zPey0f^Bk5VBxzhP)F2!I6L_JE$#jInKaX+p*ATHE?+Z?wNSYFjbCv^Q-IYU%!OP-B zyZdh!j@!k^ceFGdL8tp4p8j%xzkfPF@5x}Fz_)4rT{by1>w?3l?D>X6?Dyoj=0!F8 zwqMJ?Z6fYc9$GQ76$|47EeEgJlk*FyUa=>;nw@RZaovBZqtU`Ua*jB-KHD&EdNBSe zAUZaarm_?`$-}~yDVru~kB$(QMTT^=b*cZRw9fu~%e=5m*+T-@7AcYjR8Il#$x@Ey z`^y@?vFxjY0KXIPc4~Sl@Y1h}Ig)!)Aq&4C77_d}zyJ#79Cn(6X0QMN002ovPDHLk FV1h>P1PK5D literal 0 HcmV?d00001 diff --git a/src/MEDCalc/res/presentations/pqWarp16.png b/src/MEDCalc/res/presentations/pqWarp16.png new file mode 100644 index 0000000000000000000000000000000000000000..b27599a227532c68b4dd8c5ec7a29fc94d545617 GIT binary patch literal 808 zcmV+@1K0eCP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jBr6 z3OXSn)LbC|00O8*!`mmy3)@a^L1H4i_PE92!&Ixf`<*@d zN&d|^T>&gmtIYub2KScc%ST3Fjd3<}6zuREk18*GnqJ8s$aC`3&b6Pff6!MhpT9LW zv16=Q>alSgG5}|_0|<^hkV|RyA1houJ8@um-|*b{#Q2w`y?rj~bSX12Qk%F;$CM#L z>$Z;7LSc`bx;l9xYQ~BM7d+qFCwt`Sfvp2)b{*Y`Ldmn8$)+G=Q%I)xNTJK?C2tkPHMJ@cgZ z8|nA^@z}932q~<~L1Y<3Oyr2Hvo5!ql*yo6f-vq-`aD+~4(ge-KZjYixpdYMG{d7J z3zAOC9+D)TV2>D#+~!b}xYoP3+k)bbU#2)?PRpVJ-8#&gm;MUhi>yJTTCI}&5 zv_bb}$nO@rYvrAzGdyaR8gHNX637tdZE-SIgKOn5w&JO+o zVo|9`h{CE<(G5`x2%-=*Ni&Hj_V|7HaqqJ`0?{@!q7oh*-8X*rIrr;bSvcqLzq~%a z{=pH(LC*z;6}WWi^&4cqBpVY3KYV{L|E~r5-M41vMGZ@8M}PD*A#up`d>A#u{wwdF zgtiJ~Y?cH+- zr=Hy#P6PJmh?jl&FUdb;@{8|XKz*iu;Pd7IIiSTYD)cwuL0*$t?kseA=Pr}y%>brQ z2YRpWd%u@`7gZ!&v2DUM;RIokuoO4r&g|Ja%%7i!Ees63&GzxySo+Vl(9i|%X^eiP zj@rQ2^!_J=gd@0C@5W2vv;>c(*0C0%=?L{s17RG3XH}~AP&i9u7DZ87TZu7w34?r# zT6SzwoYh|;mv3M#UiT?F{bmoXmm5S)8ke)@ zY)ILd2$Z>}@L|2DR6?H?pL^j*fV{58mZc&qHOA(HEhG<<^ytFTe*0AO?nv*_Jj#9Q z7}gn2?*%w?O*bV|3sZUvIjMoD#EdZ*uI*rVZ5Of@47!VReOoix_V^F#w2|+&eM8U* z@v)PCDKbZ(S=ITXOo**1kZdN%c2ewZBnYR&LH(tvn^8Af-7vpG?%CS9Mr_DQ_W|Cg#J)5ck z9u*UT>*;pdA=}woA1zh^4G28bshZ;V^0UBE0-yAOAS*oaQsPB_Rmd0p_3@_w0|3+9 V>3#6VB<27B002ovPDHLkV1h~8&@=!5 literal 0 HcmV?d00001 diff --git a/src/MEDCalc/res/presentations/scalarmap16.png b/src/MEDCalc/res/presentations/scalarmap16.png new file mode 100644 index 0000000000000000000000000000000000000000..aa7d554ac43338263578c1d18b3c878fd4321830 GIT binary patch literal 658 zcmV;D0&V??P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jBr6 z3OW<%0}Y`700I(8L_t(I%e|9JNK|nY#()3+z0-_x8A}iWY@E zphdX}qJ>1+wpQ&5auo%=XpvBshK~$Fq0xLKmEo(XbjFg%ASbGsJ9AG9AvG$BqHl9v zeCHfE=Y#(RDS$w?`W9z}euI=ZVR5lu8H*YT_(B;5o$_;HTifDzmymVp302kIY~(Cy z3v2T`H6MX!9%LU>Y(VHJ%|8|!*im*Pc{ngidTJ(^+n}Wc&cv2Inl=ud*Us+71!K?6 zH)}0AdHl)}>8e5=gN$erlRHU7@8NVrkizGPdb;&Cy`!ayOU+=-D5`6OCh;3ad1tM+ zcin+*muMHRKND>fBD0mK=^&g|;1|jpZF&GquK5)0HKH%y54hgC!5m*t*6KKk_k|eN z8dT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