Salome HOME
#1071 - sketch validation problem
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.h
index aa22e46bac300a682abf97c41310fdc318ff72db..f78e9b7550a627306754dd9469fbf0aee16f67c5 100755 (executable)
 #include "ModuleBase.h"
 #include "ModuleBase_Definitions.h"
 
+#include <ModelAPI_Attribute.h>
 #include <ModelAPI_Feature.h>
+
 #include <TopAbs_ShapeEnum.hxx>
 #include <TopoDS_Shape.hxx>
 #include <Prs3d_Drawer.hxx>
 
+#include <Quantity_Color.hxx>
+
 #include <QPixmap>
 
 class QWidget;
@@ -108,6 +112,26 @@ It provides 1.e-4 for a shape withe Edge shape type
 */
 MODULEBASE_EXPORT void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape,
                                                       const Handle(Prs3d_Drawer)& theDrawer);
+
+/*! Obtains the color from the property manager and converts it to the OCCT color
+\param theSection a property section
+\param theName a property item name
+\param theDefault a default color value
+\return quantity color
+*/
+MODULEBASE_EXPORT Quantity_Color color(const std::string& theSection,
+                                       const std::string& theName,
+                                       const std::string& theDefault);
+
+
+// Returns the object from the attribute
+/// \param theObj an object
+MODULEBASE_EXPORT ObjectPtr getObject(const AttributePtr& theAttribute);
+
+// Returns the object from the attribute
+/// \param theObj an object
+MODULEBASE_EXPORT TopAbs_ShapeEnum getCompoundSubType(const TopoDS_Shape& theShape);
+
 }
 
 #endif