]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Union of validator and filter functionalities.
authornds <natalia.donis@opencascade.com>
Thu, 26 Mar 2015 05:03:17 +0000 (08:03 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 26 Mar 2015 05:03:17 +0000 (08:03 +0300)
Code improvement, it renames storeAttributeValues to setObject.

src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/PartSet/PartSet_WidgetConstraintShapeSelector.cpp
src/PartSet/PartSet_WidgetConstraintShapeSelector.h
src/PartSet/PartSet_WidgetShapeSelector.cpp
src/PartSet/PartSet_WidgetShapeSelector.h

index b981a9064f1c92dd6544abec6ab6582be780e4e0..ef46fa06220feb56ad5b131594aab1b1d19ae299 100644 (file)
@@ -132,8 +132,8 @@ bool ModuleBase_WidgetShapeSelector::storeValueCustom() const
 }
 
 //********************************************************************
-bool ModuleBase_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject,
-                                                          GeomShapePtr theShape)
+bool ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject,
+                                               GeomShapePtr theShape)
 {
   bool isChanged = false;
   FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(theSelectedObject);
@@ -392,7 +392,7 @@ void ModuleBase_WidgetShapeSelector::restoreAttributeValue(bool theValid)
   DataPtr aData = myFeature->data();
   AttributePtr anAttribute = myFeature->attribute(attributeID());
 
-  storeAttributeValues(myObject, myShape);
+  setObject(myObject, myShape);
   AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
   if (aRefAttr) {
     if (!myIsObject)
@@ -446,7 +446,7 @@ bool ModuleBase_WidgetShapeSelector::setSelection(const Handle_SelectMgr_EntityO
   if (!acceptSubShape(aShape))
     return false;
 
-  storeAttributeValues(aObject, aShape);
+  setObject(aObject, aShape);
   return true;
 }
 
index ea5ef10a702b2f4664ba1d8da8bdff2c5e019bc4..fe28323b13cfcfbeaed6176775a83eb165da0c86 100644 (file)
@@ -138,7 +138,8 @@ Q_OBJECT
   /// the specific type and set the given values
   /// \param theSelectedObject an object
   /// \param theShape a selected shape, which is used in the selection attribute
-  virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+  /// \return true if it is succeed
+  virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
 
   //----------- Class members -------------
   protected:
index ca6f8837af133539eea5461489f6ebb84a86b29d..5c5700b99f3e31663fc58d885ada99cd311bfa54 100644 (file)
@@ -12,7 +12,7 @@
 #include <PartSet_Tools.h>
 #include <SketchPlugin_Feature.h>
 
-bool PartSet_WidgetConstraintShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape)
+bool PartSet_WidgetConstraintShapeSelector::setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape)
 {
   ObjectPtr aSelectedObject = theSelectedObject;
 
@@ -29,5 +29,5 @@ bool PartSet_WidgetConstraintShapeSelector::storeAttributeValues(ObjectPtr theSe
         return false;
     }
   }
-  return ModuleBase_WidgetShapeSelector::storeAttributeValues(aSelectedObject, theShape);
+  return ModuleBase_WidgetShapeSelector::setObject(aSelectedObject, theShape);
 }
index c20eee6f35b79139a57a4a874d03020f4bd7cfbe..9a69e438400cbd51e78d3baf25e78c78b6e1b15a 100644 (file)
@@ -47,7 +47,7 @@ protected:
   /// the specific type and set the given values
   /// \param theSelectedObject an object
   /// \param theShape a selected shape, which is used in the selection attribute
-  virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+  virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
 
 //private:
   /// Pointer to a sketch 
index 6dd500d4a9dba30825d4c589fb6a0fd0ab940d2e..578e1cdf9b7a7e7bc38d7919e96ce9d038635bd2 100644 (file)
@@ -18,7 +18,7 @@
 #include <XGUI_Workshop.h>
 #include <XGUI_Displayer.h>
 
-bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape)
+bool PartSet_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape)
 {
   ObjectPtr aSelectedObject = theSelectedObject;
   GeomShapePtr aShape = theShape;
@@ -73,7 +73,7 @@ bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObje
       }
     }
   }
-  return ModuleBase_WidgetShapeSelector::storeAttributeValues(aSelectedObject, aShape);
+  return ModuleBase_WidgetShapeSelector::setObject(aSelectedObject, aShape);
 }
 
 //********************************************************************
index c342e07014ccaf0f14ea7e9d45c7f3624e86258f..b47c59ebf2395270e16e5e35ae005d2d87f6d4ac 100644 (file)
@@ -47,7 +47,7 @@ protected:
   /// the specific type and set the given values
   /// \param theSelectedObject an object
   /// \param theShape a selected shape, which is used in the selection attribute
-  virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+  virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
 
   /// Creates a backup of the current values of the attribute
   /// It should be realized in the specific widget because of different