]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1834: Fix length of lines
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 7 Nov 2016 09:19:38 +0000 (12:19 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 7 Nov 2016 09:19:52 +0000 (12:19 +0300)
30 files changed:
src/ModelGeomAlgo/ModelGeomAlgo_Point2D.cpp
src/ModelGeomAlgo/ModelGeomAlgo_Point2D.h
src/ModelHighAPI/ModelHighAPI_Double.cpp
src/ModelHighAPI/ModelHighAPI_Double.h
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.h
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/ModelHighAPI/ModelHighAPI_Integer.cpp
src/ModelHighAPI/ModelHighAPI_Integer.h
src/ModelHighAPI/ModelHighAPI_Interface.cpp
src/ModelHighAPI/ModelHighAPI_Interface.h
src/ModelHighAPI/ModelHighAPI_Macro.h
src/ModelHighAPI/ModelHighAPI_RefAttr.cpp
src/ModelHighAPI/ModelHighAPI_RefAttr.h
src/ModelHighAPI/ModelHighAPI_Reference.h
src/ModelHighAPI/ModelHighAPI_Selection.cpp
src/ModelHighAPI/ModelHighAPI_Selection.h
src/ModelHighAPI/ModelHighAPI_Services.cpp
src/ModelHighAPI/ModelHighAPI_Services.h
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModelHighAPI/ModelHighAPI_Tools.h
src/ModuleBase/ModuleBase_DoubleSpinBox.cpp
src/ModuleBase/ModuleBase_FilterValidated.cpp
src/ModuleBase/ModuleBase_IModule.cpp
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_Tools.h
src/ModuleBase/ModuleBase_ViewerPrs.cpp
src/ModuleBase/ModuleBase_WidgetEditor.h
src/ModuleBase/ModuleBase_WidgetSelectorStore.h
src/ModuleBase/ModuleBase_WidgetValidator.cpp

index bcecd78f4ed0d54f54eea6ea4cb3a7d0ecd6b25b..2060572394512a05f00a6cc8bcf58e09b1790865 100755 (executable)
@@ -27,9 +27,9 @@
 
 namespace ModelGeomAlgo_Point2D {
   std::shared_ptr<GeomDataAPI_Point2D> getPointOfRefAttr(ModelAPI_Feature* theFeature,
-                                                         const std::string& theAttribute,
-                                                         const std::string& theObjectFeatureKind,
-                                                         const std::string& theObjectFeatureAttribute)
+                                                  const std::string& theAttribute,
+                                                  const std::string& theObjectFeatureKind,
+                                                  const std::string& theObjectFeatureAttribute)
   {
     std::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
 
@@ -176,7 +176,7 @@ namespace ModelGeomAlgo_Point2D {
   }
 
   std::string getPontAttributesInfo(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                    const std::set<std::shared_ptr<ModelAPI_Attribute> >& theAttributesOnly)
+                           const std::set<std::shared_ptr<ModelAPI_Attribute> >& theAttributesOnly)
   {
     std::string anInfo;
 
@@ -203,10 +203,11 @@ namespace ModelGeomAlgo_Point2D {
     std::string aValue = "not defined";
     std::string aType = theAttribute->attributeType();
     if (aType == GeomDataAPI_Point2D::typeId()) {
-      std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
-                                                                                      theAttribute);
+      std::shared_ptr<GeomDataAPI_Point2D> aPoint = 
+        std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
       if (aPoint.get() && aPoint->isInitialized()) {
-        aValue = std::string("(" + doubleToString(aPoint->x()) + ", "+ doubleToString(aPoint->y()) + ")");
+        aValue = std::string("(" + doubleToString(aPoint->x()) + ", "+ 
+                             doubleToString(aPoint->y()) + ")");
       }
     }
     anInfo.append(theAttribute->id() + ": " + aValue);
index 7f1e89bdf0c03e6266e41b1db7582667cac04e9a..ab445624beba7257442321ec6124312bb6ce80c8 100755 (executable)
@@ -42,7 +42,8 @@ namespace ModelGeomAlgo_Point2D {
   /// Fills container of point 2D attributes, which refer to the feature through the references
   /// features with the given kind
   /// \param theObject an object where references should be searched (e.g. a sketch line or result)
-  /// \param theReferenceFeatureKind a kind of the feature to be processed (e.g. coincidence constraint)
+  /// \param theReferenceFeatureKind a kind of the feature to be processed
+  ///                                (e.g. coincidence constraint)
   /// \param theAttributes a container of found point 2D attributes
   /// \param theObjectFeatureKind a feature kind in object of attribute that satisfies the search
   /// \param theObjectFeatureAttribute a feature attribute in object that satisfies the search
@@ -50,11 +51,11 @@ namespace ModelGeomAlgo_Point2D {
   /// should be skipped
   /// \returns found point attribute or NULL
   MODELGEOMALGO_EXPORT void getPointsOfReference(const std::shared_ptr<ModelAPI_Object>& theObject,
-                                          const std::string& theReferenceFeatureKind,
-                                          std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
-                                          const std::string& theObjectFeatureKind = "",
-                                          const std::string& theObjectFeatureAttribute = "",
-                                          const bool isSkipFeatureAttributes = true);
+                                  const std::string& theReferenceFeatureKind,
+                                  std::set<std::shared_ptr<GeomDataAPI_Point2D> >& theAttributes,
+                                  const std::string& theObjectFeatureKind = "",
+                                  const std::string& theObjectFeatureAttribute = "",
+                                  const bool isSkipFeatureAttributes = true);
 
   /// Removes attributes which points are out of the base shape
   /// \param theBaseShape a shape of check
index c62a0f678c5fa5a14cacabe6616402a56e710cea..aee0ec81176caa341681a879b1fcf057d47ec199 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Double.cpp
 // Purpose: 
 //
index fdab71d1e54696c9033a92f680d5a09b8c49c692..3e3b0fee5fdb1d7c9f7547253d8becdeb55a6cbe 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Double.h
 // Purpose: 
 //
index b43241e367a254033c4d852f3380cfe77b58e68c..2216f59f537b4cc0e4bf1650292e131140097308 100644 (file)
@@ -236,7 +236,8 @@ bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_Document>& theD
   return isOk;
 }
 
-bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, bool isForce)
+bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+                                  bool isForce)
 {
   // increase composite features stack
   ++gCompositeStackDepth;
@@ -279,8 +280,9 @@ bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_CompositeFeatur
   return isOk;
 }
 
-bool ModelHighAPI_Dumper::processSubs(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite,
-                                      bool theDumpModelDo)
+bool ModelHighAPI_Dumper::processSubs(
+  const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite,
+  bool theDumpModelDo)
 {
   bool isOk = true;
   // dump all sub-features;
@@ -424,7 +426,8 @@ void ModelHighAPI_Dumper::dumpEntitySetName()
     }
     // set result deflection
     if (!isDefaultDeflection(*aResIt)) {
-      AttributeDoublePtr aDeflectionAttr = (*aResIt)->data()->real(ModelAPI_Result::DEFLECTION_ID());
+      AttributeDoublePtr aDeflectionAttr = 
+        (*aResIt)->data()->real(ModelAPI_Result::DEFLECTION_ID());
       if(aDeflectionAttr.get() && aDeflectionAttr->isInitialized()) {
         *this << *aResIt;
         myDumpBuffer << ".setDeflection(" << aDeflectionAttr->value() << ")" << std::endl;
@@ -643,7 +646,8 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const ResultPtr& theResult)
   FeaturePtr aFeature = ModelAPI_Feature::feature(theResult);
   int anIndex = 0;
   std::list<ResultPtr> aResults = aFeature->results();
-  for(std::list<ResultPtr>::const_iterator anIt = aResults.cbegin(); anIt != aResults.cend(); ++anIt, ++anIndex) {
+  for(std::list<ResultPtr>::const_iterator 
+      anIt = aResults.cbegin(); anIt != aResults.cend(); ++anIt, ++anIndex) {
     if(theResult->isSame(*anIt)) {
       break;
     }
@@ -784,7 +788,8 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
     return *this;
   }
 
-  myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" << theAttrSelect->namingName() << "\")";
+  myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" << 
+    theAttrSelect->namingName() << "\")";
   return *this;
 }
 
@@ -814,7 +819,8 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
     } else {
       isAdded = true;
     }
-    myDumpBuffer << "model.selection(\"" << aShape->shapeTypeStr() << "\", \"" << anAttribute->namingName() << "\")";
+    myDumpBuffer << "model.selection(\"" << 
+      aShape->shapeTypeStr() << "\", \"" << anAttribute->namingName() << "\")";
   }
 
   myDumpBuffer << "]";
index 01d8667569980c58bddaf7382d2c61b79cd8556c..ace8be67aa5eef858e7157cf15a33445b96928dc 100644 (file)
@@ -76,18 +76,22 @@ public:
 
   /// Add module to list of imported modules
   /// \param theModuleName  name of the module to be imported
-  /// \param theObject      name of the entity to be imported from the module (if empty, while module will be imported)
+  /// \param theObject      name of the entity to be imported 
+  ///                       from the module (if empty, while module will be imported)
   MODELHIGHAPI_EXPORT
   void importModule(const std::string& theModuleName,
                     const std::string& theObject = std::string());
 
   /// Returns name of specified entity
   /// \param theEntity        [in] named entity
-  /// \param theSaveNotDumped [in] if \c true, the entity should be stored as not dumped (will be dumped automatically)
-  /// \param theUseEntityName [in] if \c true, the entity name should be used "as is" without changing default name
+  /// \param theSaveNotDumped [in] 
+  ///    if \c true, the entity should be stored as not dumped (will be dumped automatically)
+  /// \param theUseEntityName [in] 
+  ///    if \c true, the entity name should be used "as is" without changing default name
   /// \return name of the entity
   MODELHIGHAPI_EXPORT
-  const std::string& name(const EntityPtr& theEntity, bool theSaveNotDumped = true, bool theUseEntityName = false);
+  const std::string& name(const EntityPtr& theEntity, bool theSaveNotDumped = true, 
+                          bool theUseEntityName = false);
 
   /// Returns name of parent composite feature for specified entity
   MODELHIGHAPI_EXPORT
@@ -139,7 +143,7 @@ public:
   friend
   MODELHIGHAPI_EXPORT
   ModelHighAPI_Dumper& operator<<(ModelHighAPI_Dumper& theDumper,
-                                  std::basic_ostream<char>& (*theEndl)(std::basic_ostream<char>&));
+                                std::basic_ostream<char>& (*theEndl)(std::basic_ostream<char>&));
 
   /// Dump GeomAPI_Pnt in the following form:
   /// "GeomAPI_Pnt(X, Y, Z)"
@@ -184,32 +188,32 @@ public:
   ModelHighAPI_Dumper& operator<<(const ResultPtr& theResult);
 
   /// Dump Attribute
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_Attribute>& theAttr);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_Attribute>& theAttr);
   /// Dump Object
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_Object>& theObject);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_Object>& theObject);
 
   /// Dump AttributeRefAttr
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttr>& theRefAttr);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttr>& theRefAttr);
   /// Dump AttributeRefAttrList as follows:
   /// "[obj1, obj2, obj3, ...]"
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttrList>& theRefAttrList);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttrList>& theRefAttrList);
   /// Dump AttributeRefList as follows:
   /// "[obj1, obj2, obj3, ...]"
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeRefList>& theRefList);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_AttributeRefList>& theRefList);
   /// Dump AttributeSelection
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeSelection>& theAttrSelect);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_AttributeSelection>& theAttrSelect);
   /// Dump AttributeSelectionList
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeSelectionList>& theAttrSelList);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+    operator<<(const std::shared_ptr<ModelAPI_AttributeSelectionList>& theAttrSelList);
   /// Dump AttributeReference
-  MODELHIGHAPI_EXPORT
-  ModelHighAPI_Dumper& operator<<(const std::shared_ptr<ModelAPI_AttributeReference>& theReference);
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  operator<<(const std::shared_ptr<ModelAPI_AttributeReference>& theReference);
 
   /// Clear dump buffer
   MODELHIGHAPI_EXPORT
@@ -229,13 +233,15 @@ private:
   bool process(const std::shared_ptr<ModelAPI_Document>& theDoc);
 
   /// Dump composite feature and all it sub-features
-  bool process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, bool isForce = false);
+  bool process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+               bool isForce = false);
 
   /// Iterate all features in composite feature and dump them into intermediate buffer
   /// \param theComposite   [in] parent composite feature
   /// \param theDumpModelDo [in] shows that command "model.do()" should be written at the end
   MODELHIGHAPI_EXPORT
-  bool processSubs(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, bool theDumpModelDo = false);
+  bool processSubs(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+                   bool theDumpModelDo = false);
 
   /// Check the entity is already dumped
   bool isDumped(const EntityPtr& theEntity) const;
@@ -269,9 +275,11 @@ private:
   struct LastDumpedEntity {
     EntityPtr            myEntity;   ///< last dumped entity
     bool                 myUserName; ///< the entity hase user-defined name
-    std::list<ResultPtr> myResults;  ///< results of this entity, which has user-defined names or specific colors
+    /// results of this entity, which has user-defined names or specific colors
+    std::list<ResultPtr> myResults;  
 
-    LastDumpedEntity(EntityPtr theEntity, bool theUserName, const std::list<ResultPtr>& theResults)
+    LastDumpedEntity(EntityPtr theEntity, bool theUserName, 
+      const std::list<ResultPtr>& theResults)
       : myEntity(theEntity), myUserName(theUserName), myResults(theResults)
     {}
   };
@@ -289,7 +297,8 @@ private:
   NbFeaturesMap       myFeatureCount;       ///< number of features of each kind
 
 protected:
-  std::set<EntityPtr> myNotDumpedEntities;  ///< list of entities, used by other features but not dumped yet
+   /// list of entities, used by other features but not dumped yet
+  std::set<EntityPtr> myNotDumpedEntities; 
 
   friend class SketchAPI_Sketch;
 };
index bf32bdbbd7b50d68d4341300beadd07261baff7b..6417e52413adaaba5e0a8716cf63384a6082a657 100644 (file)
@@ -79,7 +79,8 @@ std::string ModelHighAPI_FeatureStore::compare(FeaturePtr theFeature) {
 void ModelHighAPI_FeatureStore::storeData(std::shared_ptr<ModelAPI_Data> theData, 
   std::map<std::string, std::string>& theAttrs)
 {
-  theAttrs["__name__"] = theData->name(); // store name to keep also this information and output if needed
+  // store name to keep also this information and output if needed
+  theAttrs["__name__"] = theData->name(); 
   std::list<std::shared_ptr<ModelAPI_Attribute> > allAttrs = theData->attributes("");
   std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = allAttrs.begin();
   for(; anAttr != allAttrs.end(); anAttr++) {
@@ -117,7 +118,8 @@ std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data
   return "";
 }
 
-static void dumpArray(std::ostringstream& theOutput, const double theArray[], int theSize, int thePrecision = PRECISION)
+static void dumpArray(std::ostringstream& theOutput, const double theArray[], 
+                      int theSize, int thePrecision = PRECISION)
 {
   for (int i = 0; i < theSize; ++i) {
     if (i > 0)
@@ -302,7 +304,8 @@ std::string ModelHighAPI_FeatureStore::dumpShape(std::shared_ptr<GeomAPI_Shape>&
   }
   // output the main characteristics
   if (GeomAlgoAPI_ShapeTools::volume(theShape) > 1.e-7) {
-    aResult<<"Volume: "<<std::fixed<<setprecision(3)<<GeomAlgoAPI_ShapeTools::volume(theShape)<<std::endl;
+    aResult<<"Volume: "<<
+      std::fixed<<setprecision(3)<<GeomAlgoAPI_ShapeTools::volume(theShape)<<std::endl;
   }
   std::shared_ptr<GeomAPI_Pnt> aCenter = GeomAlgoAPI_ShapeTools::centreOfMass(theShape);
   aResult<<"Center of mass: ";
index e59f605f13bdbb420e7df0fac6d0b31c707e64f7..047b31abb1e7502fa51bd72dce071ed076454e33 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Integer.cpp
 // Purpose: 
 //
index 9d7758fbd26e9029229dd707a19706a02f153865..36be4ca20b705f5fea5acaa7d629ef45535eea4e 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Integer.h
 // Purpose: 
 //
index cfea20834ff7b433975d54317d79da7f3c02b9ee..4cb6f5293edc191247df1179cf2a90a0fdb54a4c 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Interface.cpp
 // Purpose: 
 //
@@ -17,7 +18,8 @@
 
 #include "ModelHighAPI_Selection.h"
 //--------------------------------------------------------------------------------------
-ModelHighAPI_Interface::ModelHighAPI_Interface(const std::shared_ptr<ModelAPI_Feature> & theFeature)
+ModelHighAPI_Interface::ModelHighAPI_Interface(
+  const std::shared_ptr<ModelAPI_Feature> & theFeature)
 : myFeature(theFeature)
 {
 
@@ -36,7 +38,8 @@ std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Interface::feature() const
 
 std::shared_ptr<ModelHighAPI_Interface> ModelHighAPI_Interface::subFeature(const int theIndex) const
 {
-  CompositeFeaturePtr aCompositeFeature = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myFeature);
+  CompositeFeaturePtr aCompositeFeature =
+    std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myFeature);
   if(!aCompositeFeature.get()) {
     return InterfacePtr();
   }
index c6fa134bce7986496e598761607983ee0c90e760..9cf22791e697fa53bf29e0b066cbcbb60366de91 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Interface.h
 // Purpose: 
 //
index f6bfc6cee8272650c71c1930d19c73dd69dcb97a..2b9297018607325021b0cc25d7c050b1906a99c6 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Macro.h
 // Purpose:
 //
@@ -43,7 +44,8 @@
   public:
 
 //--------------------------------------------------------------------------------------
-// Used in INTERFACE_N inside START_INIT/END_INIT for set variable with attribute received from feature
+// Used in INTERFACE_N inside START_INIT/END_INIT for 
+// set variable with attribute received from feature
 #define SET_ATTRIBUTE(NAME, TYPE, ATT_NAME) \
   VAR_NAME(NAME) = std::dynamic_pointer_cast<TYPE>(feature()->attribute(ATT_NAME)); \
   if (!VAR_NAME(NAME)) \
index 6bb6aeb3b2597aedc5ccd7e8e52c48dd9582e94e..6d76c152b69ddb6105c4cc70ebd7ee9dfd1dfa68 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_RefAttr.cpp
 // Purpose: 
 //
index 816e5f59a6fa7e0cb5fbd0702ff67fc7b5338255..3d48f9f5dc04cba03dcbb28959668cfd0cdd8469 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_RefAttr.h
 // Purpose: 
 //
@@ -43,12 +44,12 @@ public:
   virtual ~ModelHighAPI_RefAttr();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT
-  virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
+  MODELHIGHAPI_EXPORT virtual 
+    void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
 
   /// Append to list attribute
-  MODELHIGHAPI_EXPORT
-  virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
+  MODELHIGHAPI_EXPORT virtual 
+    void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
 
   /// Check the object is empty
   MODELHIGHAPI_EXPORT
index f960791ce14b8b8e6db7fd64de81e75a1218ec4b..e25d33d4d33965d804f4ed259ae20e1c03441648 100644 (file)
@@ -41,8 +41,8 @@ public:
   virtual ~ModelHighAPI_Reference();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT
-  virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
+  MODELHIGHAPI_EXPORT virtual 
+    void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
 
   /// Append to list attribute
   MODELHIGHAPI_EXPORT
index e66fdb5945d41c744a54586400d615a18a4240ff..72bfdff590b80ac694a7cf688e70d0ac2142610a 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Selection.cpp
 // Purpose: 
 //
@@ -43,8 +44,12 @@ void ModelHighAPI_Selection::fillAttribute(
 {
   switch(myVariantType) {
     case VT_Empty: return;
-    case VT_ResultSubShapePair: theAttribute->setValue(myResultSubShapePair.first, myResultSubShapePair.second); return;
-    case VT_TypeSubShapeNamePair: theAttribute->selectSubShape(myTypeSubShapeNamePair.first, myTypeSubShapeNamePair.second); return;
+    case VT_ResultSubShapePair: 
+      theAttribute->setValue(myResultSubShapePair.first, myResultSubShapePair.second); 
+      return;
+    case VT_TypeSubShapeNamePair: 
+      theAttribute->selectSubShape(myTypeSubShapeNamePair.first, myTypeSubShapeNamePair.second);
+      return;
   }
 }
 
@@ -54,7 +59,9 @@ void ModelHighAPI_Selection::appendToList(
 {
   switch(myVariantType) {
     case VT_Empty: return;
-    case VT_ResultSubShapePair: theAttribute->append(myResultSubShapePair.first, myResultSubShapePair.second); return;
+    case VT_ResultSubShapePair: 
+      theAttribute->append(myResultSubShapePair.first, myResultSubShapePair.second); 
+      return;
     case VT_TypeSubShapeNamePair:
       // Note: the reverse order (first - type, second - sub-shape name)
       theAttribute->append(myTypeSubShapeNamePair.second, myTypeSubShapeNamePair.first);
@@ -118,7 +125,8 @@ void ModelHighAPI_Selection::setDeflection(double theValue)
   if (myVariantType != VT_ResultSubShapePair)
     return;
 
-  AttributeDoublePtr aDeflectionAttr = myResultSubShapePair.first->data()->real(ModelAPI_Result::DEFLECTION_ID());
+  AttributeDoublePtr aDeflectionAttr = 
+    myResultSubShapePair.first->data()->real(ModelAPI_Result::DEFLECTION_ID());
 
   aDeflectionAttr->setValue(theValue);
 }
index 782edec4b2f060e3d042596b93d7f8b94640c13e..c0c65f26e80f442e93424f89f6bd620e956bffdd 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Selection.h
 // Purpose: 
 //
@@ -19,7 +20,8 @@ class ModelAPI_AttributeSelection;
 class ModelAPI_AttributeSelectionList;
 class ModelAPI_Result;
 //--------------------------------------------------------------------------------------
-typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> > ResultSubShapePair;
+typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> > 
+  ResultSubShapePair;
 typedef std::pair<std::string, std::string> TypeSubShapeNamePair;
 //--------------------------------------------------------------------------------------
 /**\class ModelHighAPI_Selection
@@ -43,7 +45,8 @@ public:
   /// Constructor for result and sub-shape
   MODELHIGHAPI_EXPORT
   ModelHighAPI_Selection(const std::shared_ptr<ModelAPI_Result>& theContext,
-                         const std::shared_ptr<GeomAPI_Shape>& theSubShape = std::shared_ptr<GeomAPI_Shape>());
+                         const std::shared_ptr<GeomAPI_Shape>& theSubShape = 
+                         std::shared_ptr<GeomAPI_Shape>());
   /// Constructor for sub-shape by the textual Name
   MODELHIGHAPI_EXPORT
   ModelHighAPI_Selection(const std::string& theType,
@@ -53,12 +56,12 @@ public:
   virtual ~ModelHighAPI_Selection();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT
-  virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
+  MODELHIGHAPI_EXPORT virtual 
+    void fillAttribute(const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
 
   /// Append to list attribute
-  MODELHIGHAPI_EXPORT
-  virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute) const;
+  MODELHIGHAPI_EXPORT virtual 
+    void appendToList(const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute) const;
 
   /// \return variant type.
   MODELHIGHAPI_EXPORT
index 4b40b09e1d32f9ea251a93656d2c660137431d15..47f432041cb026bf1944ad9e3749c70699c0ba14 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Services.cpp
 // Purpose: 
 //
@@ -66,8 +67,10 @@ std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
       return std::string("XOZ");
   }
   // YOZ
-  else if (fabs(theNormal->x() - 1.0) < aTol && fabs(theNormal->y()) < aTol && fabs(theNormal->z()) < aTol &&
-           fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol && fabs(theDirX->z()) < aTol)
+  else if (fabs(theNormal->x() - 1.0) < aTol && 
+           fabs(theNormal->y()) < aTol && fabs(theNormal->z()) < aTol &&
+           fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol && 
+           fabs(theDirX->z()) < aTol)
     return std::string("YOZ");
 
   return std::string();
index 4e719429dc984aa4c72ce4c5153062d709a089d1..b02e778e9b9c9d9a8fa02fd6107537f3b134392e 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Services.h
 // Purpose:
 //
index 23f65ebc61497dc1e3c0066451243f2feb610068..abb75c38bb4ba6086c27985a56d5db18f005b569 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Tools.cpp
 // Purpose: 
 //
@@ -204,7 +205,8 @@ GeomAPI_Shape::ShapeType shapeTypeByStr(std::string theShapeTypeStr)
 {
   GeomAPI_Shape::ShapeType aShapeType = GeomAPI_Shape::SHAPE;
 
-  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(), theShapeTypeStr.begin(), ::tolower);
+  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(), 
+                 theShapeTypeStr.begin(), ::tolower);
 
   if(theShapeTypeStr == "compound") {
     aShapeType = GeomAPI_Shape::COMPOUND;
@@ -297,7 +299,8 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
     ModelAPI_Tools::allResults(aFeat, allResults);
     std::list<ResultPtr>::iterator aRes = allResults.begin();
     for(; aRes != allResults.end(); aRes++) {
-      if ((*aRes)->groupName() == ModelAPI_ResultPart::group()) { // recoursively store features of sub-documents
+      // recoursively store features of sub-documents
+      if ((*aRes)->groupName() == ModelAPI_ResultPart::group()) { 
         DocumentPtr aDoc = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aRes)->partDoc();
         if (aDoc.get()) {
           std::string anError = storeFeatures((*aRes)->data()->name(), aDoc, theStore, theCompare);
index 5db774d70d2bbe974d5003172a9ec49fce21b5c1..e999efdfcfb6037b7b42f3c35f2cddc1de9389df 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Tools.h
 // Purpose: 
 //
index 856c5d1937188755d8ee1070c2859c6f82278465..89b15fa1402f7e902bf899673188ca019ef4cf57 100644 (file)
@@ -64,10 +64,13 @@ ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* theParent, int thePr
   // VSR 01/07/2010: Disable thousands separator for spin box
   // (to avoid inconsistency of double-2-string and string-2-double conversion)
   QLocale loc;
-  loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
+  loc.setNumberOptions(loc.numberOptions() | 
+                       QLocale::OmitGroupSeparator | 
+                       QLocale::RejectGroupSeparator);
   setLocale(loc);
 
-  // MPV 15/09/2014: this must be set before setDecimals; otherwise in release mode setDecimals may crash
+  // MPV 15/09/2014: this must be set before setDecimals; 
+  // otherwise in release mode setDecimals may crash
   myPrecision = thePrecision;
 
   // Use precision equal to default Qt decimals
@@ -290,7 +293,9 @@ QValidator::State ModuleBase_DoubleSpinBox::validate(QString& str, int& pos) con
   if (overhead == 0)
     state = v.validate(str, pos);
   else {
-    if ((uint)(str.length()) >= overhead && str.startsWith(pref) && str.right(suff.length()) == suff) {
+    if ((uint)(str.length()) >= overhead && 
+         str.startsWith(pref) && 
+         str.right(suff.length()) == suff) {
       QString core = str.mid(pref.length(), str.length() - overhead);
       int corePos = pos - pref.length();
       state = v.validate(core, corePos);
index 097eb60cb82d4e7dc7acd52169c3ade72c17f5bd..21fe81e3a746e803c41ab3a546310c81d02b0332 100644 (file)
@@ -20,7 +20,8 @@
 IMPLEMENT_STANDARD_HANDLE(ModuleBase_FilterValidated, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter);
 
-Standard_Boolean ModuleBase_FilterValidated::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const
+Standard_Boolean ModuleBase_FilterValidated::
+  IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const
 {
   bool aValid = true;
   ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation();
index 73ab7d3105b7002112fd784f543509a4a3fbbf9e..6327f8c100843697de958302c04cd0596f2d66e0 100644 (file)
@@ -72,10 +72,12 @@ void ModuleBase_IModule::launchModal(const QString& theCmdId)
 void ModuleBase_IModule::launchOperation(const QString& theCmdId)
 {
   /// selection should be obtained from workshop before ask if the operation can be started as
-  /// the canStartOperation method performs commit/abort of previous operation. Sometimes commit/abort
-  /// may cause selection clear(Sketch operation) as a result it will be lost and is not used for preselection.
+  /// the canStartOperation method performs commit/abort of previous operation. 
+  /// Sometimes commit/abort may cause selection clear(Sketch operation) as a result
+  /// it will be lost and is not used for preselection.
   ModuleBase_ISelection* aSelection = myWorkshop->selection();
-  QList<ModuleBase_ViewerPrsPtr> aPreSelected = aSelection->getSelected(ModuleBase_ISelection::AllControls);
+  QList<ModuleBase_ViewerPrsPtr> aPreSelected = 
+    aSelection->getSelected(ModuleBase_ISelection::AllControls);
 
   if (!myWorkshop->canStartOperation(theCmdId))
     return;
@@ -118,8 +120,8 @@ ModuleBase_Operation* ModuleBase_IModule::getNewOperation(const std::string& the
 }
 
 bool ModuleBase_IModule::customizeObject(ObjectPtr theObject,
-                                         const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
-                                         const bool theUpdateViewer)
+                              const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
+                              const bool theUpdateViewer)
 {
   return false;
 }
index 1a436ee441c14f07cba7742da52a8e253dd963a3..ae98b8a18d4f8d79798063e20a8c77c72cb6c098 100755 (executable)
@@ -317,9 +317,10 @@ QString objectInfo(const ObjectPtr& theObj, const bool isUseAttributesInfo)
     if (isUseAttributesInfo) {
       std::set<std::shared_ptr<ModelAPI_Attribute> > anAttributes;
       std::string aPointsInfo = ModelGeomAlgo_Point2D::getPontAttributesInfo(aFeature,
-                                                                             anAttributes).c_str();
+                                                                          anAttributes).c_str();
       if (!aPointsInfo.empty())
-        aFeatureStr.append(QString(", attributes: %1").arg(aPointsInfo.c_str()).toStdString().c_str());
+        aFeatureStr.append(QString(", attributes: %1")
+          .arg(aPointsInfo.c_str()).toStdString().c_str());
     }
   }
 
@@ -468,7 +469,8 @@ QString activeOwners(Handle(AIS_InteractiveContext)& theContext, const bool theS
   return aValue;
 }
 
-QString selectedOwners(Handle(AIS_InteractiveContext)& theContext, const bool theShapeInfoOnly = true)
+QString selectedOwners(Handle(AIS_InteractiveContext)& theContext, 
+                              const bool theShapeInfoOnly = true)
 {
   QStringList anObjects;
   if (theContext.IsNull())
@@ -637,17 +639,20 @@ ObjectPtr getObject(const AttributePtr& theAttribute)
   ObjectPtr anObject;
   std::string anAttrType = theAttribute->attributeType();
   if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr anAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+    AttributeRefAttrPtr anAttr =
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     if (anAttr != NULL && anAttr->isObject())
       anObject = anAttr->object();
   }
   if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr anAttr = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+    AttributeSelectionPtr anAttr =
+      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     if (anAttr != NULL)
       anObject = anAttr->context();
   }
   if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr anAttr = std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
+    AttributeReferencePtr anAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     if (anAttr.get() != NULL)
       anObject = anAttr->value();
   }
@@ -704,7 +709,8 @@ void getParameters(QStringList& theParameters)
   }
 }
 
-std::string findGreedAttribute(ModuleBase_IWorkshop* theWorkshop, const FeaturePtr& theFeature)
+std::string findGreedAttribute(ModuleBase_IWorkshop* theWorkshop, 
+                               const FeaturePtr& theFeature)
 {
   std::string anAttributeId;
 
@@ -729,14 +735,16 @@ bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
 
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr aRef = std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
+    AttributeReferencePtr aRef = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr aObject = aRef->value();
     aHasObject = aObject && aObject->isSame(theObject);
     //if (!(aObject && aObject->isSame(theObject))) {
     //  aRef->setValue(theObject);
     //}
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+    AttributeRefAttrPtr aRefAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
     if (anAttribute.get()) {
@@ -762,17 +770,17 @@ bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
                          std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     aHasObject = aSelectionListAttr->isInList(aResult, theShape, theTemporarily);
-    //if (!theCheckIfAttributeHasObject || !aSelectionListAttr->isInList(aResult, theShape, theTemporarily))
-    //  aSelectionListAttr->append(aResult, theShape, theTemporarily);
   }
   else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr aRefListAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
+    AttributeRefListPtr aRefListAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
     aHasObject = aRefListAttr->isInList(theObject);
     //if (!theCheckIfAttributeHasObject || !aRefListAttr->isInList(theObject))
     //  aRefListAttr->append(theObject);
   }
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
-    AttributeRefAttrListPtr aRefAttrListAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
+    AttributeRefAttrListPtr aRefAttrListAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
 
     if (anAttribute.get()) {
@@ -799,13 +807,15 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
   bool isDone = true;
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr aRef = std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
+    AttributeReferencePtr aRef = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr aObject = aRef->value();
     if (!(aObject && aObject->isSame(theObject))) {
       aRef->setValue(theObject);
     }
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+    AttributeRefAttrPtr aRefAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
     if (anAttribute.get())
@@ -828,11 +838,13 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     AttributeSelectionListPtr aSelectionListAttr =
                          std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
-    if (!theCheckIfAttributeHasObject || !aSelectionListAttr->isInList(aResult, theShape, theTemporarily))
+    if (!theCheckIfAttributeHasObject || 
+        !aSelectionListAttr->isInList(aResult, theShape, theTemporarily))
       aSelectionListAttr->append(aResult, theShape, theTemporarily);
   }
   else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr aRefListAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
+    AttributeRefListPtr aRefListAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
     if (!theCheckIfAttributeHasObject || !aRefListAttr->isInList(theObject)) {
       if (theObject.get())
         aRefListAttr->append(theObject);
@@ -841,7 +853,8 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     }
   }
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
-    AttributeRefAttrListPtr aRefAttrListAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
+    AttributeRefAttrListPtr aRefAttrListAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
 
     if (anAttribute.get()) {
@@ -869,7 +882,8 @@ GeomShapePtr getShape(const AttributePtr& theAttribute, ModuleBase_IWorkshop* th
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+    AttributeRefAttrPtr aRefAttr = 
+      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     if (aRefAttr.get() && !aRefAttr->isObject()) {
       AttributePtr anAttribute = aRefAttr->attr();
       aShape = theWorkshop->module()->findShape(anAttribute);
@@ -952,7 +966,8 @@ QString wrapTextByWords(const QString& theValue, QWidget* theWidget,
 }
 
 //**************************************************************
-void refsToFeatureInFeatureDocument(const ObjectPtr& theObject, std::set<FeaturePtr>& theRefFeatures)
+void refsToFeatureInFeatureDocument(const ObjectPtr& theObject, 
+                                    std::set<FeaturePtr>& theRefFeatures)
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
   if (aFeature.get()) {
@@ -1052,7 +1067,8 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
   std::string aNotActivatedNames;
   if (!ModelAPI_Tools::allDocumentsActivated(aNotActivatedNames)) {
     if (ModuleBase_Tools::hasModuleDocumentFeature(theFeatures))
-      aNotActivatedDocWrn = QObject::tr("Selected objects can be used in Part documents which are not loaded:%1.\n")
+      aNotActivatedDocWrn = 
+        QObject::tr("Selected objects can be used in Part documents which are not loaded:%1.\n")
                             .arg(aNotActivatedNames.c_str());
   }
   
@@ -1128,17 +1144,25 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
   if (!thePrefixInfo.empty())
     aText = thePrefixInfo.c_str();
   QString aSep = ", ";
-  if (!aPartFeatureNames.empty())
-    aText += QString(QObject::tr("The following parts will be deleted: %1.\n")).arg(aPartFeatureNames.join(aSep));
+  if (!aPartFeatureNames.empty()) {
+    aText += QString(QObject::tr("The following parts will be deleted: %1.\n"))
+             .arg(aPartFeatureNames.join(aSep));
+  }
   if (!aNotActivatedDocWrn.isEmpty())
     aText += aNotActivatedDocWrn;
-  if (!anOtherFeatureNames.empty())
-    aText += QString(QObject::tr("Features are used in the following features: %1.\nThese features will be deleted.\n"))
+  if (!anOtherFeatureNames.empty()) {
+    const char* aMsg = "Features are used in the following features: %1.\nThese \
+ features will be deleted.\n";
+    aText += QString(QObject::tr(aMsg))
                      .arg(anOtherFeatureNames.join(aSep));
+  }
   if (!aParamFeatureNames.empty()) {
-    aText += QString(QObject::tr("Parameters are used in the following features: %1.\nThese features will be deleted.\nOr parameters could be replaced by their values.\n"))
+    const char* aMsg = "Parameters are used in the following features: %1.\nThese features will \
+ be deleted.\nOr parameters could be replaced by their values.\n";
+    aText += QString(QObject::tr(aMsg))
                      .arg(aParamFeatureNames.join(aSep));
-    QPushButton *aReplaceButton = aMessageBox.addButton(QObject::tr("Replace"), QMessageBox::ActionRole);
+    QPushButton *aReplaceButton = 
+      aMessageBox.addButton(QObject::tr("Replace"), QMessageBox::ActionRole);
   }
 
   if (!aText.isEmpty()) {
@@ -1155,7 +1179,8 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
         ModelAPI_ReplaceParameterMessage::send(aObj, 0);
     }
     else
-      theReferencesToDelete.insert(aFeaturesRefsToParameterOnly.begin(), aFeaturesRefsToParameterOnly.end());
+      theReferencesToDelete.insert(aFeaturesRefsToParameterOnly.begin(), 
+                                   aFeaturesRefsToParameterOnly.end());
   }
   return true;
 }
@@ -1208,7 +1233,8 @@ void setPointBallHighlighting(AIS_Shape* theAIS)
     aPixMap = new Image_AlienPixMap();
     if(!aPixMap->Load(aFile.c_str())) {
       // The icon for constraint is not found
-      static const std::string aMsg = "Error: Point market not found by path: \"" + aFile + "\". Falling back.";
+      static const std::string aMsg = 
+        "Error: Point market not found by path: \"" + aFile + "\". Falling back.";
       //Events_InfoMessage("ModuleBase_Tools::setPointBallHighlighting", aMsg).send();
     }
   }
index 9c529b341eec68aa704990a7d0f5d79567c73ea4..6e4e89b416d43c14259290bd6f00efaa94832aa6 100755 (executable)
@@ -82,7 +82,8 @@ MODULEBASE_EXPORT QPixmap composite(const QString& theAdditionalIcon, const QStr
 /// Generates the pixmap lighter than the resources pixmap. 
 /// Pixmap \a theIcon is lighted according to the given value.
 /// If the lighter value is greater than 100, this functions returns a lighter pixmap.
-/// Setting lighter value to 150 returns a color that is 50% brighter. If the factor is less than 100,
+/// Setting lighter value to 150 returns a color that is 50% brighter. 
+/// If the factor is less than 100,
 /// the return pixmap is darker. If the factor is 0 or negative, the return pixmap is unspecified.
 
 /// \param resource text of the pixmap
@@ -133,7 +134,8 @@ MODULEBASE_EXPORT QAction* createAction(const QIcon& theIcon, const QString& the
 /// \param theObj an object
 /// \param isUseAttributesInfo a flag whether the attribute values information is used
 /// \return a string
-MODULEBASE_EXPORT QString objectInfo(const ObjectPtr& theObj, const bool isUseAttributesInfo = false);
+MODULEBASE_EXPORT QString objectInfo(const ObjectPtr& theObj, 
+                                     const bool isUseAttributesInfo = false);
 
 /// Converts the AIS context information in a string information.
 /// \param theContext a viewer context
index f7ad01c50dbfc057460480de68aaab5145c54ffd..38e4c71a3d7f274a74451544d89e25e9b344e7f1 100644 (file)
@@ -52,7 +52,8 @@ bool ModuleBase_ViewerPrs::isEqual(ModuleBase_ViewerPrs* thePrs) const
     // and set in the sub-solid AIS. ViewerPrs of these fictive owners are accepted as equal
     // as they use the same shape and result(of compsolid)
     Handle(StdSelect_BRepOwner) aCSolidOwner1 = Handle(StdSelect_BRepOwner)::DownCast(myOwner);
-    Handle(StdSelect_BRepOwner) aCSolidOwner2 = Handle(StdSelect_BRepOwner)::DownCast(thePrs->owner());
+    Handle(StdSelect_BRepOwner) aCSolidOwner2 = 
+      Handle(StdSelect_BRepOwner)::DownCast(thePrs->owner());
     isEqualIO = !aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull();
     if (!aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull())
       isEqualOwner = (aCSolidOwner1->Shape().IsNull() && aCSolidOwner2->Shape().IsNull()) ||
@@ -93,7 +94,8 @@ bool ModuleBase_ViewerPrs::operator==(const ModuleBase_ViewerPrs& thePrs)
     // and set in the sub-solid AIS. ViewerPrs of these fictive owners are accepted as equal
     // as they use the same shape and result(of compsolid)
     Handle(StdSelect_BRepOwner) aCSolidOwner1 = Handle(StdSelect_BRepOwner)::DownCast(myOwner);
-    Handle(StdSelect_BRepOwner) aCSolidOwner2 = Handle(StdSelect_BRepOwner)::DownCast(thePrs.owner());
+    Handle(StdSelect_BRepOwner) aCSolidOwner2 = 
+      Handle(StdSelect_BRepOwner)::DownCast(thePrs.owner());
     isEqualIO = !aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull();
     if (!aCSolidOwner1.IsNull() && !aCSolidOwner1.IsNull())
       isEqualOwner = (aCSolidOwner1->Shape().IsNull() && aCSolidOwner2->Shape().IsNull()) ||
index d9c0671f7e3087e55ccd48cd0c29bb669faf5148..97a01ac3b5417b2337adc6d68182779138718fba 100644 (file)
@@ -36,7 +36,8 @@ Q_OBJECT
   /// Destructor
   virtual ~ModuleBase_WidgetEditor();
 
-  /// Set focus to the first control of the current widget. The focus policy of the control is checked.
+  /// Set focus to the first control of the current widget. 
+  /// The focus policy of the control is checked.
   /// If the widget has the NonFocus focus policy, it is skipped.
   /// \return the state whether the widget can accept the focus
   virtual bool focusTo();
index ed727db8c02fedcea12a8b50790adda52a278049..91a77ba94abf48e94bead31f3082490452e98a68 100755 (executable)
@@ -17,7 +17,8 @@ class ModuleBase_IWorkshop;
 
 /**
 * \ingroup GUI
-  Provides for an attribute backup of values. It is possible to store/ restore the attribute values.
+  Provides for an attribute backup of values. 
+  It is possible to store/ restore the attribute values.
 */
 class ModuleBase_WidgetSelectorStore
 {
@@ -42,7 +43,8 @@ class ModuleBase_WidgetSelectorStore
 
 private:
   /// backup parameters of the model attribute. The class processes three types of attribute:
-  /// Reference, RefAttr and Selection. Depending on the attribute type, only the attribute parameter
+  /// Reference, RefAttr and Selection. 
+  /// Depending on the attribute type, only the attribute parameter
   /// values are reserved in the backup
   /// An attribute object
   ObjectPtr myObject;
index 191a277ee8f41f0ff91273ed12200cc89fcb07fb..e4b1a4fdd04950e4bf6c1633abf0e23a387ec1c2 100755 (executable)
@@ -63,7 +63,8 @@ void ModuleBase_WidgetValidator::clearValidatedCash()
   myInvalidPrs.clear();
 }
 
-bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& theValue, bool& theValid)
+bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+                                               bool& theValid)
 {
   bool aValidPrs = myValidPrs.contains(theValue);
   bool anInvalidPrs = myInvalidPrs.contains(theValue);
@@ -77,7 +78,8 @@ bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& th
 }
 
 //********************************************************************
-void ModuleBase_WidgetValidator::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, const bool theValid)
+void ModuleBase_WidgetValidator::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+                                                 const bool theValid)
 {
   bool aValidPrs = myInvalidPrs.contains(theValue);
   bool anInvalidPrs = myInvalidPrs.contains(theValue);
@@ -97,7 +99,8 @@ void ModuleBase_WidgetValidator::storeValidState(const ModuleBase_ViewerPrsPtr&
     //  myValidPrs.removeOne(theValue);
   }
 #ifdef DEBUG_VALID_STATE
-  qDebug(QString("storeValidState: myValidPrs.size() = %1, myInvalidPrs.size() = %2").arg(myValidPrs.count())
+  qDebug(QString("storeValidState: myValidPrs.size() = %1, myInvalidPrs.size() = %2")
+                 .arg(myValidPrs.count())
                  .arg(myInvalidPrs.count()).toStdString().c_str());
 #endif
 }