From: abn Date: Mon, 1 Aug 2016 15:30:52 +0000 (+0200) Subject: [MEDCalc] Simplifying IDL enum names. X-Git-Tag: V8_1_0b1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ede17e79573b8cbb9a384e698a925450cc386a89;p=modules%2Fmed.git [MEDCalc] Simplifying IDL enum names. --- diff --git a/idl/MEDPresentationManager.idl b/idl/MEDPresentationManager.idl index f66f62721..09689a92d 100644 --- a/idl/MEDPresentationManager.idl +++ b/idl/MEDPresentationManager.idl @@ -27,24 +27,24 @@ module MEDCALC { /* Enumerations and constants */ - enum MEDPresentationViewMode { + enum ViewModeType { VIEW_MODE_OVERLAP, VIEW_MODE_REPLACE, VIEW_MODE_NEW_LAYOUT, VIEW_MODE_SPLIT_VIEW }; - enum MEDPresentationColorMap { + enum ColorMapType { COLOR_MAP_BLUE_TO_RED_RAINBOW, COLOR_MAP_COOL_TO_WARM }; - enum MEDPresentationScalarBarRange { + enum ScalarBarRangeType { SCALAR_BAR_ALL_TIMESTEPS, SCALAR_BAR_CURRENT_TIMESTEP }; - enum MEDPresentationMeshMode { + enum MeshModeType { MESH_MODE_WIREFRAME, MESH_MODE_SURFACE_EDGES, MESH_MODE_SURFACE @@ -64,7 +64,7 @@ module MEDCALC const string DISPLAY_EUCLIDEAN_NORM = ""; // Void string to avoid clash with a real component name -- never used actually? - enum MEDPresentationSliceOrientation { + enum SliceOrientationType { SLICE_NORMAL_TO_X, SLICE_NORMAL_TO_Y, SLICE_NORMAL_TO_Z, @@ -76,14 +76,14 @@ module MEDCALC /* Default values */ - const MEDPresentationViewMode VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE; - const MEDPresentationColorMap COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW; - const MEDPresentationScalarBarRange SCALAR_BAR_RANGE_DEFAULT = SCALAR_BAR_ALL_TIMESTEPS; - const MEDPresentationMeshMode MESH_MODE_DEFAULT = MESH_MODE_WIREFRAME; + const ViewModeType VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE; + const ColorMapType COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW; + const ScalarBarRangeType SCALAR_BAR_RANGE_DEFAULT = SCALAR_BAR_ALL_TIMESTEPS; + const MeshModeType MESH_MODE_DEFAULT = MESH_MODE_WIREFRAME; // const long SCALAR_BAR_RANGE_VAL_MIN_DEFAULT = -1; // const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1; const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM; - const MEDPresentationSliceOrientation SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_X; + const SliceOrientationType SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_X; const long NB_CONTOURS_DEFAULT = 10; const long NB_SLICES_DEFAULT = 1; @@ -92,38 +92,38 @@ module MEDCALC // Just showing the mesh struct MeshViewParameters { long fieldHandlerId; // TODO should be a meshHandlerId really ... - MEDPresentationMeshMode mode; + MeshModeType mode; }; // A simple scalar map struct ScalarMapParameters { long fieldHandlerId; string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name - MEDPresentationScalarBarRange scalarBarRange; - MEDPresentationColorMap colorMap; + ScalarBarRangeType scalarBarRange; + ColorMapType colorMap; }; // A contour is an isoline in 2D and an isosurface in 3D struct ContourParameters { // Contour are only for scalar fields long fieldHandlerId; - MEDPresentationScalarBarRange scalarBarRange; - MEDPresentationColorMap colorMap; + ScalarBarRangeType scalarBarRange; + ColorMapType colorMap; long nbContours; }; // struct VectorFieldParameters { // long fieldHandlerId; // string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name -// MEDPresentationScalarBarRange scalarBarRange; -// MEDPresentationColorMap colorMap; +// ScalarBarRangeType scalarBarRange; +// ColorMapType colorMap; // }; // struct SlicesParameters { long fieldHandlerId; string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name - MEDPresentationScalarBarRange scalarBarRange; - MEDPresentationColorMap colorMap; - MEDPresentationSliceOrientation orientation; + ScalarBarRangeType scalarBarRange; + ColorMapType colorMap; + SliceOrientationType orientation; long nbSlices; }; // @@ -134,8 +134,8 @@ module MEDCALC // struct PointSpriteParameters { // long fieldHandlerId; // string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name -// MEDPresentationScalarBarRange scalarBarRange; -// MEDPresentationColorMap colorMap; +// ScalarBarRangeType scalarBarRange; +// ColorMapType colorMap; // }; typedef sequence PresentationsList; @@ -144,14 +144,14 @@ module MEDCALC interface MEDPresentationManager : SALOME::GenericObj { - long makeMeshView(in MeshViewParameters params, in MEDPresentationViewMode viewMode); - long makeScalarMap(in ScalarMapParameters params, in MEDPresentationViewMode viewMode); - long makeContour(in ContourParameters params, in MEDPresentationViewMode viewMode) + long makeMeshView(in MeshViewParameters params, in ViewModeType viewMode); + long makeScalarMap(in ScalarMapParameters params, in ViewModeType viewMode); + long makeContour(in ContourParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception); -// long makeVectorField(in VectorFieldParameters params, in MEDPresentationViewMode viewMode); - long makeSlices(in SlicesParameters params, in MEDPresentationViewMode viewMode); -// long makeDeflectionShape(in DeflectionShapeParameters params, in MEDPresentationViewMode viewMode); -// long makePointSprite(in PointSpriteParameters params, in MEDPresentationViewMode viewMode); +// long makeVectorField(in VectorFieldParameters params, in ViewModeType viewMode); + long makeSlices(in SlicesParameters params, in ViewModeType viewMode); +// long makeDeflectionShape(in DeflectionShapeParameters params, in ViewModeType viewMode); +// long makePointSprite(in PointSpriteParameters params, in ViewModeType viewMode); void setPresentationStringProperty(in long presId, in string propName, in string propValue); string getPresentationStringProperty(in long presId, in string propName); @@ -179,7 +179,7 @@ module MEDCALC // Low level ParaVis dump string getParavisDump(in long presId); -// MEDPresentationViewMode getPresentationViewMode(in long presId); +// ViewModeType getPresentationViewMode(in long presId); PresentationsList getAllPresentations(); }; diff --git a/src/MEDCalc/cmp/MEDPresentation.cxx b/src/MEDCalc/cmp/MEDPresentation.cxx index 04e618dab..c82f30765 100644 --- a/src/MEDCalc/cmp/MEDPresentation.cxx +++ b/src/MEDCalc/cmp/MEDPresentation.cxx @@ -37,9 +37,9 @@ const std::string MEDPresentation::PROP_COLOR_MAP = "colorMap"; const std::string MEDPresentation::PROP_SCALAR_BAR_RANGE = "scalarBarRange"; MEDPresentation::MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name, - const MEDCALC::MEDPresentationViewMode viewMode, - const MEDCALC::MEDPresentationColorMap colorMap, - const MEDCALC::MEDPresentationScalarBarRange sbRange) + const MEDCALC::ViewModeType viewMode, + const MEDCALC::ColorMapType colorMap, + const MEDCALC::ScalarBarRangeType sbRange) : _fieldHandlerId(fieldHandlerId), _propertiesStr(), //_pipeline(0), _display(0) _selectedComponentIndex(-1), diff --git a/src/MEDCalc/cmp/MEDPresentation.hxx b/src/MEDCalc/cmp/MEDPresentation.hxx index a47d1b2ff..bfcdd2fcc 100644 --- a/src/MEDCalc/cmp/MEDPresentation.hxx +++ b/src/MEDCalc/cmp/MEDPresentation.hxx @@ -70,9 +70,9 @@ protected: static int GeneratePythonId(); MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name, - const MEDCALC::MEDPresentationViewMode viewMode, - const MEDCALC::MEDPresentationColorMap colorMap, - const MEDCALC::MEDPresentationScalarBarRange sbRange); + const MEDCALC::ViewModeType viewMode, + const MEDCALC::ColorMapType colorMap, + const MEDCALC::ScalarBarRangeType sbRange); std::string getRenderViewCommand() const; std::string getRenderViewVar() const; std::string getResetCameraCommand() const; @@ -91,16 +91,16 @@ protected: void fillAvailableFieldComponents(); -// virtual MEDCALC::MEDPresentationViewMode getViewMode() = 0; +// virtual MEDCALC::ViewModeType getViewMode() = 0; template void updateComponent(const std::string& newCompo); template - void updateColorMap(MEDCALC::MEDPresentationColorMap colorMap); + void updateColorMap(MEDCALC::ColorMapType colorMap); template - void updateScalarBarRange(MEDCALC::MEDPresentationScalarBarRange sbRange); + void updateScalarBarRange(MEDCALC::ScalarBarRangeType sbRange); template void getParameters(PresentationParameters& params) const; @@ -125,9 +125,9 @@ protected: MEDPresentation::TypeID _fieldHandlerId; int _selectedComponentIndex; - MEDCALC::MEDPresentationViewMode _viewMode; - MEDCALC::MEDPresentationColorMap _colorMap; - MEDCALC::MEDPresentationScalarBarRange _sbRange; + MEDCALC::ViewModeType _viewMode; + MEDCALC::ColorMapType _colorMap; + MEDCALC::ScalarBarRangeType _sbRange; ///! Identifier (in the Python dump) of the render view int _renderViewPyId; diff --git a/src/MEDCalc/cmp/MEDPresentation.txx b/src/MEDCalc/cmp/MEDPresentation.txx index 8d6fa6f07..dc99dcdc5 100644 --- a/src/MEDCalc/cmp/MEDPresentation.txx +++ b/src/MEDCalc/cmp/MEDPresentation.txx @@ -98,7 +98,7 @@ MEDPresentation::updateComponent(const std::string& newCompo) template void -MEDPresentation::updateColorMap(MEDCALC::MEDPresentationColorMap colorMap) +MEDPresentation::updateColorMap(MEDCALC::ColorMapType colorMap) { PresentationType * p = static_cast(this); @@ -123,7 +123,7 @@ MEDPresentation::updateColorMap(MEDCALC::MEDPresentationColorMap colorMap) template void -MEDPresentation::updateScalarBarRange(MEDCALC::MEDPresentationScalarBarRange sbRange) +MEDPresentation::updateScalarBarRange(MEDCALC::ScalarBarRangeType sbRange) { PresentationType * p = static_cast(this); diff --git a/src/MEDCalc/cmp/MEDPresentationContour.cxx b/src/MEDCalc/cmp/MEDPresentationContour.cxx index 591f73cee..fee4659e5 100644 --- a/src/MEDCalc/cmp/MEDPresentationContour.cxx +++ b/src/MEDCalc/cmp/MEDPresentationContour.cxx @@ -29,7 +29,7 @@ const std::string MEDPresentationContour::TYPE_NAME = "MEDPresentationContour"; const std::string MEDPresentationContour::PROP_NB_CONTOUR = "nbContour"; MEDPresentationContour::MEDPresentationContour(const MEDCALC::ContourParameters& params, - const MEDCALC::MEDPresentationViewMode viewMode) : + const MEDCALC::ViewModeType viewMode) : MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, params.colorMap, params.scalarBarRange), _params(params) { diff --git a/src/MEDCalc/cmp/MEDPresentationContour.hxx b/src/MEDCalc/cmp/MEDPresentationContour.hxx index 7a61ce020..bf36fee8c 100644 --- a/src/MEDCalc/cmp/MEDPresentationContour.hxx +++ b/src/MEDCalc/cmp/MEDPresentationContour.hxx @@ -29,7 +29,7 @@ public: static const std::string TYPE_NAME; static const std::string PROP_NB_CONTOUR; - MEDPresentationContour(const MEDCALC::ContourParameters& params, const MEDCALC::MEDPresentationViewMode viewMode); + MEDPresentationContour(const MEDCALC::ContourParameters& params, const MEDCALC::ViewModeType viewMode); virtual ~MEDPresentationContour() {} void updatePipeline(const MEDCALC::ContourParameters& params); diff --git a/src/MEDCalc/cmp/MEDPresentationDeflectionShape.hxx b/src/MEDCalc/cmp/MEDPresentationDeflectionShape.hxx index f03240e08..e23be4374 100644 --- a/src/MEDCalc/cmp/MEDPresentationDeflectionShape.hxx +++ b/src/MEDCalc/cmp/MEDPresentationDeflectionShape.hxx @@ -32,7 +32,7 @@ public: virtual ~MEDPresentationDeflectionShape() {} void updatePipeline(const MEDCALC::DeflectionShapeParameters& params); - MEDCALC::MEDPresentationViewMode getViewMode() { return _params.viewMode; } + MEDCALC::ViewModeType getViewMode() { return _params.viewMode; } protected: virtual void internalGeneratePipeline(); diff --git a/src/MEDCalc/cmp/MEDPresentationManager_i.cxx b/src/MEDCalc/cmp/MEDPresentationManager_i.cxx index ad763cb67..09b2f5726 100644 --- a/src/MEDCalc/cmp/MEDPresentationManager_i.cxx +++ b/src/MEDCalc/cmp/MEDPresentationManager_i.cxx @@ -124,19 +124,19 @@ MEDPresentationManager_i::getPresentationIntProperty(MEDPresentation::TypeID pre } MEDPresentation::TypeID -MEDPresentationManager_i::makeMeshView(const MEDCALC::MeshViewParameters& params, const MEDCALC::MEDPresentationViewMode viewMode) +MEDPresentationManager_i::makeMeshView(const MEDCALC::MeshViewParameters& params, const MEDCALC::ViewModeType viewMode) { return _makePresentation(params, viewMode); } MEDPresentation::TypeID -MEDPresentationManager_i::makeScalarMap(const MEDCALC::ScalarMapParameters& params, const MEDCALC::MEDPresentationViewMode viewMode) +MEDPresentationManager_i::makeScalarMap(const MEDCALC::ScalarMapParameters& params, const MEDCALC::ViewModeType viewMode) { return _makePresentation(params, viewMode); } MEDPresentation::TypeID -MEDPresentationManager_i::makeContour(const MEDCALC::ContourParameters& params, const MEDCALC::MEDPresentationViewMode viewMode) +MEDPresentationManager_i::makeContour(const MEDCALC::ContourParameters& params, const MEDCALC::ViewModeType viewMode) { return _makePresentation(params, viewMode); } @@ -148,7 +148,7 @@ MEDPresentationManager_i::makeContour(const MEDCALC::ContourParameters& params, //} // MEDPresentation::TypeID -MEDPresentationManager_i::makeSlices(const MEDCALC::SlicesParameters& params, const MEDCALC::MEDPresentationViewMode viewMode) +MEDPresentationManager_i::makeSlices(const MEDCALC::SlicesParameters& params, const MEDCALC::ViewModeType viewMode) { return _makePresentation(params, viewMode); } @@ -287,7 +287,7 @@ MEDPresentationManager_i::getActiveViewPythonId() } -//MEDCALC::MEDPresentationViewMode +//MEDCALC::ViewModeType //MEDPresentationManager_i::getPresentationViewMode(MEDPresentation::TypeID presentationID) //{ // MEDPresentation* pres = _getPresentation(presentationID); diff --git a/src/MEDCalc/cmp/MEDPresentationManager_i.hxx b/src/MEDCalc/cmp/MEDPresentationManager_i.hxx index 7c0cb19a0..c2c17873a 100644 --- a/src/MEDCalc/cmp/MEDPresentationManager_i.hxx +++ b/src/MEDCalc/cmp/MEDPresentationManager_i.hxx @@ -39,13 +39,13 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager, static MEDPresentationManager_i* getInstance(); - MEDCALC_EXPORT MEDPresentation::TypeID makeMeshView(const MEDCALC::MeshViewParameters&, const MEDCALC::MEDPresentationViewMode); - MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&, const MEDCALC::MEDPresentationViewMode); - MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&, const MEDCALC::MEDPresentationViewMode); -// MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&, const MEDCALC::MEDPresentationViewMode); - MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&, const MEDCALC::MEDPresentationViewMode); -// MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&, const MEDCALC::MEDPresentationViewMode); -// MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&, const MEDCALC::MEDPresentationViewMode); + MEDCALC_EXPORT MEDPresentation::TypeID makeMeshView(const MEDCALC::MeshViewParameters&, const MEDCALC::ViewModeType); + MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&, const MEDCALC::ViewModeType); + MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&, const MEDCALC::ViewModeType); +// MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&, const MEDCALC::ViewModeType); + MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&, const MEDCALC::ViewModeType); +// MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&, const MEDCALC::ViewModeType); +// MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&, const MEDCALC::ViewModeType); MEDCALC_EXPORT void setPresentationStringProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue); MEDCALC_EXPORT char* getPresentationStringProperty(MEDPresentation::TypeID presentationID, const char* propName); @@ -69,7 +69,7 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager, MEDCALC_EXPORT CORBA::Boolean removePresentation(MEDPresentation::TypeID); MEDCALC_EXPORT CORBA::Boolean activateView(MEDPresentation::TypeID); MEDCALC_EXPORT CORBA::Long getActiveViewPythonId(); -// MEDCALC_EXPORT MEDCALC::MEDPresentationViewMode getPresentationViewMode(MEDPresentation::TypeID); +// MEDCALC_EXPORT MEDCALC::ViewModeType getPresentationViewMode(MEDPresentation::TypeID); MEDCALC_EXPORT char* getParavisDump(MEDPresentation::TypeID presentationID); MEDCALC_EXPORT MEDCALC::PresentationsList* getAllPresentations(); @@ -81,7 +81,7 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager, // Create a new presentation instance and return its unique ID template - MEDPresentation::TypeID _makePresentation(const PresentationParameters params, MEDCALC::MEDPresentationViewMode viewMode); + MEDPresentation::TypeID _makePresentation(const PresentationParameters params, MEDCALC::ViewModeType viewMode); // Update presentation template diff --git a/src/MEDCalc/cmp/MEDPresentationManager_i.txx b/src/MEDCalc/cmp/MEDPresentationManager_i.txx index 898140895..f147554a3 100644 --- a/src/MEDCalc/cmp/MEDPresentationManager_i.txx +++ b/src/MEDCalc/cmp/MEDPresentationManager_i.txx @@ -24,7 +24,7 @@ template MEDPresentation::TypeID -MEDPresentationManager_i::_makePresentation(const PresentationParameters params, const MEDCALC::MEDPresentationViewMode viewMode) +MEDPresentationManager_i::_makePresentation(const PresentationParameters params, const MEDCALC::ViewModeType viewMode) { int activeViewId = getActiveViewPythonId(); diff --git a/src/MEDCalc/cmp/MEDPresentationMeshView.cxx b/src/MEDCalc/cmp/MEDPresentationMeshView.cxx index ff23a68b8..83678f19b 100644 --- a/src/MEDCalc/cmp/MEDPresentationMeshView.cxx +++ b/src/MEDCalc/cmp/MEDPresentationMeshView.cxx @@ -29,7 +29,7 @@ const std::string MEDPresentationMeshView::TYPE_NAME = "MEDPresentationMeshView" const std::string MEDPresentationMeshView::PROP_MESH_MODE = "meshMode"; MEDPresentationMeshView::MEDPresentationMeshView(const MEDCALC::MeshViewParameters& params, - const MEDCALC::MEDPresentationViewMode viewMode) : + const MEDCALC::ViewModeType viewMode) : // Cheating a bit here - a mesh view doesn't need a color map or a range: MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, MEDCALC::COLOR_MAP_DEFAULT, MEDCALC::SCALAR_BAR_RANGE_DEFAULT), @@ -96,7 +96,7 @@ MEDPresentationMeshView::updatePipeline(const MEDCALC::MeshViewParameters& param } void -MEDPresentationMeshView::updateMeshMode(const MEDCALC::MEDPresentationMeshMode mode) +MEDPresentationMeshView::updateMeshMode(const MEDCALC::MeshModeType mode) { _params.mode = mode; diff --git a/src/MEDCalc/cmp/MEDPresentationMeshView.hxx b/src/MEDCalc/cmp/MEDPresentationMeshView.hxx index 06c43fa92..30c6d8bca 100644 --- a/src/MEDCalc/cmp/MEDPresentationMeshView.hxx +++ b/src/MEDCalc/cmp/MEDPresentationMeshView.hxx @@ -29,7 +29,7 @@ public: static const std::string TYPE_NAME; static const std::string PROP_MESH_MODE; - MEDPresentationMeshView(const MEDCALC::MeshViewParameters& params, const MEDCALC::MEDPresentationViewMode viewMode); + MEDPresentationMeshView(const MEDCALC::MeshViewParameters& params, const MEDCALC::ViewModeType viewMode); virtual ~MEDPresentationMeshView() {} void updatePipeline(const MEDCALC::MeshViewParameters& params); @@ -38,7 +38,7 @@ public: void setParameters(const MEDCALC::MeshViewParameters & params) { _params = params; } ; protected: - void updateMeshMode(const MEDCALC::MEDPresentationMeshMode mode); + void updateMeshMode(const MEDCALC::MeshModeType mode); virtual void internalGeneratePipeline(); std::string getMeshViewCommand() const; diff --git a/src/MEDCalc/cmp/MEDPresentationPointSprite.hxx b/src/MEDCalc/cmp/MEDPresentationPointSprite.hxx index 49b200b12..56d83e27b 100644 --- a/src/MEDCalc/cmp/MEDPresentationPointSprite.hxx +++ b/src/MEDCalc/cmp/MEDPresentationPointSprite.hxx @@ -32,7 +32,7 @@ public: virtual ~MEDPresentationPointSprite() {} void updatePipeline(const MEDCALC::PointSpriteParameters& params); - MEDCALC::MEDPresentationViewMode getViewMode() { return _params.viewMode; } + MEDCALC::ViewModeType getViewMode() { return _params.viewMode; } protected: virtual void internalGeneratePipeline(); diff --git a/src/MEDCalc/cmp/MEDPresentationScalarMap.cxx b/src/MEDCalc/cmp/MEDPresentationScalarMap.cxx index 3f603db7b..79af31efd 100644 --- a/src/MEDCalc/cmp/MEDPresentationScalarMap.cxx +++ b/src/MEDCalc/cmp/MEDPresentationScalarMap.cxx @@ -31,7 +31,7 @@ const std::string MEDPresentationScalarMap::TYPE_NAME = "MEDPresentationScalarMap"; MEDPresentationScalarMap::MEDPresentationScalarMap(const MEDCALC::ScalarMapParameters& params, - const MEDCALC::MEDPresentationViewMode viewMode) : + const MEDCALC::ViewModeType viewMode) : MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, params.colorMap, params.scalarBarRange), _params(params) { } diff --git a/src/MEDCalc/cmp/MEDPresentationScalarMap.hxx b/src/MEDCalc/cmp/MEDPresentationScalarMap.hxx index d396d24f3..79a17963b 100644 --- a/src/MEDCalc/cmp/MEDPresentationScalarMap.hxx +++ b/src/MEDCalc/cmp/MEDPresentationScalarMap.hxx @@ -29,7 +29,7 @@ class MEDCALC_EXPORT MEDPresentationScalarMap : public MEDPresentation public: static const std::string TYPE_NAME; - MEDPresentationScalarMap(const MEDCALC::ScalarMapParameters& params, const MEDCALC::MEDPresentationViewMode viewMode); + MEDPresentationScalarMap(const MEDCALC::ScalarMapParameters& params, const MEDCALC::ViewModeType viewMode); virtual ~MEDPresentationScalarMap() {} void updatePipeline(const MEDCALC::ScalarMapParameters& params); @@ -37,7 +37,7 @@ public: void getParameters(MEDCALC::ScalarMapParameters & params) const { params = _params; } ; void setParameters(const MEDCALC::ScalarMapParameters & params) { _params = params; } ; -// MEDCALC::MEDPresentationViewMode getViewMode() { return _params.viewMode; } +// MEDCALC::ViewModeType getViewMode() { return _params.viewMode; } protected: virtual void internalGeneratePipeline(); diff --git a/src/MEDCalc/cmp/MEDPresentationSlices.cxx b/src/MEDCalc/cmp/MEDPresentationSlices.cxx index a71284f03..3e51ee28f 100644 --- a/src/MEDCalc/cmp/MEDPresentationSlices.cxx +++ b/src/MEDCalc/cmp/MEDPresentationSlices.cxx @@ -30,7 +30,7 @@ const std::string MEDPresentationSlices::PROP_NB_SLICES = "nbSlices"; const std::string MEDPresentationSlices::PROP_SLICE_ORIENTATION = "slicesOrientation"; MEDPresentationSlices::MEDPresentationSlices(const MEDCALC::SlicesParameters& params, - const MEDCALC::MEDPresentationViewMode viewMode) : + const MEDCALC::ViewModeType viewMode) : MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, params.colorMap, params.scalarBarRange), _params(params) { @@ -163,7 +163,7 @@ MEDPresentationSlices::updateNbSlices(const int nbSlices) } void -MEDPresentationSlices::updateOrientation(const MEDCALC::MEDPresentationSliceOrientation orientation) +MEDPresentationSlices::updateOrientation(const MEDCALC::SliceOrientationType orientation) { _params.orientation = orientation; diff --git a/src/MEDCalc/cmp/MEDPresentationSlices.hxx b/src/MEDCalc/cmp/MEDPresentationSlices.hxx index bc55bbcfd..923747534 100644 --- a/src/MEDCalc/cmp/MEDPresentationSlices.hxx +++ b/src/MEDCalc/cmp/MEDPresentationSlices.hxx @@ -30,7 +30,7 @@ public: static const std::string PROP_NB_SLICES; static const std::string PROP_SLICE_ORIENTATION; - MEDPresentationSlices(const MEDCALC::SlicesParameters& params, const MEDCALC::MEDPresentationViewMode viewMode); + MEDPresentationSlices(const MEDCALC::SlicesParameters& params, const MEDCALC::ViewModeType viewMode); virtual ~MEDPresentationSlices() {} void updatePipeline(const MEDCALC::SlicesParameters& params); @@ -40,7 +40,7 @@ public: protected: void updateNbSlices(const int nbSlices); - void updateOrientation(const MEDCALC::MEDPresentationSliceOrientation orientation); + void updateOrientation(const MEDCALC::SliceOrientationType orientation); virtual void internalGeneratePipeline(); std::string getNbSlicesCommand() const; diff --git a/src/MEDCalc/cmp/MEDPresentationVectorField.hxx b/src/MEDCalc/cmp/MEDPresentationVectorField.hxx index 3da740311..758cb152e 100644 --- a/src/MEDCalc/cmp/MEDPresentationVectorField.hxx +++ b/src/MEDCalc/cmp/MEDPresentationVectorField.hxx @@ -32,7 +32,7 @@ public: virtual ~MEDPresentationVectorField() {} void updatePipeline(const MEDCALC::VectorFieldParameters& params); - MEDCALC::MEDPresentationViewMode getViewMode() { return _params.viewMode; } + MEDCALC::ViewModeType getViewMode() { return _params.viewMode; } protected: virtual void internalGeneratePipeline(); diff --git a/src/MEDCalc/gui/MEDModule.cxx b/src/MEDCalc/gui/MEDModule.cxx index 8cef0f7d1..3a9cc15db 100644 --- a/src/MEDCalc/gui/MEDModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -360,19 +360,19 @@ MEDModule::addActionInPopupMenu(int actionId,const QString& menus,const QString& mgr->setRule( this->action( actionId ), rule, QtxPopupMgr::VisibleRule ); } -//MEDCALC::MEDPresentationViewMode +//MEDCALC::ViewModeType //MEDModule::getSelectedViewMode() const //{ // return _presentationController->getSelectedViewMode(); //} // -//MEDCALC::MEDPresentationColorMap +//MEDCALC::ColorMapType //MEDModule::getSelectedColorMap() const //{ // return _presentationController->getSelectedColorMap(); //} // -//MEDCALC::MEDPresentationScalarBarRange +//MEDCALC::ScalarBarRangeType //MEDModule::getSelectedScalarBarRange() const //{ // return _presentationController->getSelectedScalarBarRange(); diff --git a/src/MEDCalc/gui/MEDModule.hxx b/src/MEDCalc/gui/MEDModule.hxx index ed3cafce5..c53e6458a 100644 --- a/src/MEDCalc/gui/MEDModule.hxx +++ b/src/MEDCalc/gui/MEDModule.hxx @@ -80,9 +80,9 @@ public: const QString& menus="", const QString& rule="client='ObjectBrowser'"); -// MEDCALC::MEDPresentationViewMode getSelectedViewMode() const; -// MEDCALC::MEDPresentationColorMap getSelectedColorMap() const; -// MEDCALC::MEDPresentationScalarBarRange getSelectedScalarBarRange() const; +// MEDCALC::ViewModeType getSelectedViewMode() const; +// MEDCALC::ColorMapType getSelectedColorMap() const; +// MEDCALC::ScalarBarRangeType getSelectedScalarBarRange() const; inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; } void requestSALOMETermination() const; diff --git a/src/MEDCalc/gui/MEDWidgetHelper.cxx b/src/MEDCalc/gui/MEDWidgetHelper.cxx index 015bb8eaa..4451ca9ad 100644 --- a/src/MEDCalc/gui/MEDWidgetHelper.cxx +++ b/src/MEDCalc/gui/MEDWidgetHelper.cxx @@ -47,9 +47,9 @@ void MEDWidgetHelper::loadParametersFromEngine() oss << MEDPresentation::PROP_COMPONENT << i; _allCompos.push_back(_presManager->getPresentationStringProperty(_presId, oss.str().c_str())); } - _colorMap = static_cast( + _colorMap = static_cast( _presManager->getPresentationIntProperty(_presId, MEDPresentation::PROP_COLOR_MAP.c_str())); - _scalarBarRange = static_cast( + _scalarBarRange = static_cast( _presManager->getPresentationIntProperty(_presId, MEDPresentation::PROP_SCALAR_BAR_RANGE.c_str())); } diff --git a/src/MEDCalc/gui/MEDWidgetHelper.hxx b/src/MEDCalc/gui/MEDWidgetHelper.hxx index fa0e6a0c7..2fbeaadca 100644 --- a/src/MEDCalc/gui/MEDWidgetHelper.hxx +++ b/src/MEDCalc/gui/MEDWidgetHelper.hxx @@ -76,10 +76,10 @@ protected: std::vector _allCompos; // All available components // Color map - MEDCALC::MEDPresentationColorMap _colorMap; + MEDCALC::ColorMapType _colorMap; // Scalar bar range - MEDCALC::MEDPresentationScalarBarRange _scalarBarRange; + MEDCALC::ScalarBarRangeType _scalarBarRange; }; #endif diff --git a/src/MEDCalc/gui/MEDWidgetHelperMeshView.cxx b/src/MEDCalc/gui/MEDWidgetHelperMeshView.cxx index d927164b8..2ea424500 100644 --- a/src/MEDCalc/gui/MEDWidgetHelperMeshView.cxx +++ b/src/MEDCalc/gui/MEDWidgetHelperMeshView.cxx @@ -38,7 +38,7 @@ MEDWidgetHelperMeshView::~MEDWidgetHelperMeshView() void MEDWidgetHelperMeshView::loadParametersFromEngine() { MEDWidgetHelper::loadParametersFromEngine(); - _meshMode = static_cast( + _meshMode = static_cast( _presManager->getPresentationIntProperty(_presId, MEDPresentationMeshView::PROP_MESH_MODE.c_str())); } diff --git a/src/MEDCalc/gui/MEDWidgetHelperMeshView.hxx b/src/MEDCalc/gui/MEDWidgetHelperMeshView.hxx index 4a04c56fd..efbd56117 100644 --- a/src/MEDCalc/gui/MEDWidgetHelperMeshView.hxx +++ b/src/MEDCalc/gui/MEDWidgetHelperMeshView.hxx @@ -46,7 +46,7 @@ protected: virtual void loadParametersFromEngine(); private: - MEDCALC::MEDPresentationMeshMode _meshMode; + MEDCALC::MeshModeType _meshMode; }; #endif /* SRC_MEDCALC_GUI_MEDWIDGETHELPERMESHVIEW_HXX_ */ diff --git a/src/MEDCalc/gui/MEDWidgetHelperSlices.cxx b/src/MEDCalc/gui/MEDWidgetHelperSlices.cxx index f9cb1b7d8..b785cfab6 100644 --- a/src/MEDCalc/gui/MEDWidgetHelperSlices.cxx +++ b/src/MEDCalc/gui/MEDWidgetHelperSlices.cxx @@ -40,7 +40,7 @@ void MEDWidgetHelperSlices::loadParametersFromEngine() { MEDWidgetHelper::loadParametersFromEngine(); _nbSlices = _presManager->getPresentationIntProperty(_presId, MEDPresentationSlices::PROP_NB_SLICES.c_str()); - _sliceOrientation = static_cast( + _sliceOrientation = static_cast( _presManager->getPresentationIntProperty(_presId, MEDPresentationSlices::PROP_SLICE_ORIENTATION.c_str())); } diff --git a/src/MEDCalc/gui/MEDWidgetHelperSlices.hxx b/src/MEDCalc/gui/MEDWidgetHelperSlices.hxx index aace3b709..ddfcb2a84 100644 --- a/src/MEDCalc/gui/MEDWidgetHelperSlices.hxx +++ b/src/MEDCalc/gui/MEDWidgetHelperSlices.hxx @@ -48,7 +48,7 @@ protected: private: int _nbSlices; - MEDCALC::MEDPresentationSliceOrientation _sliceOrientation; + MEDCALC::SliceOrientationType _sliceOrientation; }; #endif /* SRC_MEDCALC_GUI_MEDWIDGETHELPERSLICES_HXX_ */ diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index d9ea2b2b9..ffd9bab25 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -254,7 +254,7 @@ PresentationController::createActions() } -MEDCALC::MEDPresentationViewMode +MEDCALC::ViewModeType PresentationController::getSelectedViewMode() const { if (_salomeModule->action(OPTIONS_VIEW_MODE_REPLACE_ID)->isChecked()) { @@ -274,13 +274,13 @@ PresentationController::getSelectedViewMode() const return MEDCALC::VIEW_MODE_REPLACE; } -MEDCALC::MEDPresentationColorMap +MEDCALC::ColorMapType PresentationController::getSelectedColorMap() const { return _widgetPresentationParameters->getColorMap(); } -MEDCALC::MEDPresentationScalarBarRange +MEDCALC::ScalarBarRangeType PresentationController::getSelectedScalarBarRange() const { return _widgetPresentationParameters->getScalarBarRange(); @@ -401,7 +401,7 @@ PresentationController::onDeletePresentation() QString PresentationController::getViewModePython() const { - MEDCALC::MEDPresentationViewMode viewMode = getSelectedViewMode(); + MEDCALC::ViewModeType viewMode = getSelectedViewMode(); switch(viewMode) { case MEDCALC::VIEW_MODE_REPLACE: return "MEDCALC.VIEW_MODE_REPLACE"; case MEDCALC::VIEW_MODE_OVERLAP: return "MEDCALC.VIEW_MODE_OVERLAP"; @@ -414,7 +414,7 @@ PresentationController::getViewModePython() const QString PresentationController::getColorMapPython() const { - MEDCALC::MEDPresentationColorMap colorMap = getSelectedColorMap(); + MEDCALC::ColorMapType colorMap = getSelectedColorMap(); switch(colorMap) { case MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW: return "MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW"; case MEDCALC::COLOR_MAP_COOL_TO_WARM: return "MEDCALC.COLOR_MAP_COOL_TO_WARM"; @@ -425,7 +425,7 @@ PresentationController::getColorMapPython() const QString PresentationController::getScalarBarRangePython() const { - MEDCALC::MEDPresentationScalarBarRange colorMap = getSelectedScalarBarRange(); + MEDCALC::ScalarBarRangeType colorMap = getSelectedScalarBarRange(); switch(colorMap) { case MEDCALC::SCALAR_BAR_ALL_TIMESTEPS: return "MEDCALC.SCALAR_BAR_ALL_TIMESTEPS"; case MEDCALC::SCALAR_BAR_CURRENT_TIMESTEP: return "MEDCALC.SCALAR_BAR_CURRENT_TIMESTEP"; @@ -436,7 +436,7 @@ PresentationController::getScalarBarRangePython() const QString PresentationController::getMeshModePython(const int mode) const { - MEDCALC::MEDPresentationMeshMode mod = static_cast(mode); + MEDCALC::MeshModeType mod = static_cast(mode); switch(mod) { case MEDCALC::MESH_MODE_WIREFRAME: return "MEDCALC.MESH_MODE_WIREFRAME"; case MEDCALC::MESH_MODE_SURFACE: return "MEDCALC.MESH_MODE_SURFACE"; @@ -448,7 +448,7 @@ PresentationController::getMeshModePython(const int mode) const QString PresentationController::getSliceOrientationPython(const int orientation) const { - MEDCALC::MEDPresentationSliceOrientation orient = static_cast(orientation); + MEDCALC::SliceOrientationType orient = static_cast(orientation); switch(orient) { case MEDCALC::SLICE_NORMAL_TO_X: return "MEDCALC.SLICE_NORMAL_TO_X"; case MEDCALC::SLICE_NORMAL_TO_Y: return "MEDCALC.SLICE_NORMAL_TO_Y"; @@ -663,7 +663,7 @@ PresentationController::updateTreeViewWithNewPresentation(long fieldId, long pre oss.str().c_str(), type.c_str(),ico.c_str(), presentationId); - // MEDCALC::MEDPresentationViewMode viewMode = MEDFactoryClient::getPresentationManager()->getPresentationViewMode(presentationId); + // MEDCALC::ViewModeType viewMode = MEDFactoryClient::getPresentationManager()->getPresentationViewMode(presentationId); // // // Remove sibling presentations if view mode is set to REPLACE // if (viewMode == MEDCALC::VIEW_MODE_REPLACE) { diff --git a/src/MEDCalc/gui/PresentationController.hxx b/src/MEDCalc/gui/PresentationController.hxx index 9d92c1b0a..39d58a3e7 100644 --- a/src/MEDCalc/gui/PresentationController.hxx +++ b/src/MEDCalc/gui/PresentationController.hxx @@ -48,9 +48,9 @@ public: void createActions(); - MEDCALC::MEDPresentationViewMode getSelectedViewMode() const; - MEDCALC::MEDPresentationColorMap getSelectedColorMap() const; - MEDCALC::MEDPresentationScalarBarRange getSelectedScalarBarRange() const; + MEDCALC::ViewModeType getSelectedViewMode() const; + MEDCALC::ColorMapType getSelectedColorMap() const; + MEDCALC::ScalarBarRangeType getSelectedScalarBarRange() const; void showDockWidgets(bool isVisible); diff --git a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx index 65238551d..8d7a3e1be 100644 --- a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx +++ b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx @@ -198,7 +198,7 @@ int WidgetPresentationParameters::getNbSlices() const void -WidgetPresentationParameters::setScalarBarRange(MEDCALC::MEDPresentationScalarBarRange sbrange) +WidgetPresentationParameters::setScalarBarRange(MEDCALC::ScalarBarRangeType sbrange) { int idx; if (sbrange == MEDCALC::SCALAR_BAR_ALL_TIMESTEPS) @@ -217,7 +217,7 @@ WidgetPresentationParameters::setScalarBarRange(MEDCALC::MEDPresentationScalarBa } void -WidgetPresentationParameters::setColorMap(MEDCALC::MEDPresentationColorMap colorMap) +WidgetPresentationParameters::setColorMap(MEDCALC::ColorMapType colorMap) { int idx = -1; if (colorMap == MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW) @@ -237,7 +237,7 @@ WidgetPresentationParameters::setColorMap(MEDCALC::MEDPresentationColorMap color } void -WidgetPresentationParameters::setMeshMode(MEDCALC::MEDPresentationMeshMode mode) +WidgetPresentationParameters::setMeshMode(MEDCALC::MeshModeType mode) { // Show the widget: _ui.labelMeshMode->show(); @@ -269,7 +269,7 @@ WidgetPresentationParameters::setMeshMode(MEDCALC::MEDPresentationMeshMode mode) } void -WidgetPresentationParameters::setSliceOrientation(MEDCALC::MEDPresentationSliceOrientation orient) +WidgetPresentationParameters::setSliceOrientation(MEDCALC::SliceOrientationType orient) { // Show the widget: _ui.labelSliceOrient->show(); @@ -313,7 +313,7 @@ WidgetPresentationParameters::setSliceOrientation(MEDCALC::MEDPresentationSliceO } -MEDCALC::MEDPresentationSliceOrientation +MEDCALC::SliceOrientationType WidgetPresentationParameters::getSliceOrientation() const { QString sbrange = _ui.comboBoxSliceOrient->currentText(); @@ -343,7 +343,7 @@ WidgetPresentationParameters::getSliceOrientation() const return MEDCALC::SLICE_NORMAL_TO_X; } -MEDCALC::MEDPresentationMeshMode +MEDCALC::MeshModeType WidgetPresentationParameters::getMeshMode() const { QString mesm = _ui.comboBoxMesh->currentText(); @@ -362,7 +362,7 @@ WidgetPresentationParameters::getMeshMode() const } -MEDCALC::MEDPresentationScalarBarRange +MEDCALC::ScalarBarRangeType WidgetPresentationParameters::getScalarBarRange() const { QString sbrange = _ui.comboBoxScalarBarRange->currentText(); @@ -395,7 +395,7 @@ WidgetPresentationParameters::getScalarBarRange() const // return _ui.doubleSpinBoxMaxVal->value(); //} -MEDCALC::MEDPresentationColorMap +MEDCALC::ColorMapType WidgetPresentationParameters::getColorMap() const { QString colorMap = _ui.comboBoxColorMap->currentText(); diff --git a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx index 530ca6478..b518e5605 100644 --- a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx +++ b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx @@ -42,17 +42,17 @@ public: std::string getComponent() const; void setComponents(std::vector compos, int selecIndex); - MEDCALC::MEDPresentationMeshMode getMeshMode() const; - void setMeshMode(MEDCALC::MEDPresentationMeshMode mode); + MEDCALC::MeshModeType getMeshMode() const; + void setMeshMode(MEDCALC::MeshModeType mode); - MEDCALC::MEDPresentationScalarBarRange getScalarBarRange() const; - void setScalarBarRange(MEDCALC::MEDPresentationScalarBarRange); + MEDCALC::ScalarBarRangeType getScalarBarRange() const; + void setScalarBarRange(MEDCALC::ScalarBarRangeType); // double getScalarBarTimestep() const; // double getScalarBarMinVal() const; // double getScalarBarMaxVal() const; - MEDCALC::MEDPresentationColorMap getColorMap() const; - void setColorMap(MEDCALC::MEDPresentationColorMap); + MEDCALC::ColorMapType getColorMap() const; + void setColorMap(MEDCALC::ColorMapType); void setPresName(const std::string& name); @@ -62,8 +62,8 @@ public: int getNbSlices() const; void setNbSlices(int nbSlices); - MEDCALC::MEDPresentationSliceOrientation getSliceOrientation() const; - void setSliceOrientation(MEDCALC::MEDPresentationSliceOrientation orient); + MEDCALC::SliceOrientationType getSliceOrientation() const; + void setSliceOrientation(MEDCALC::SliceOrientationType orient); void toggleWidget(bool show); bool isShown() const;