Salome HOME
It provides error messages for validators.
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.cpp
index 6ee563fc72214f1f39e9033cc1abd2cdd4a342c2..d2009ac41fc63f31006a51439d9916eb51e71362 100755 (executable)
@@ -18,6 +18,8 @@
 #include <GeomDataAPI_Point2D.h>
 #include <Events_Error.h>
 
+#include <Config_PropManager.h>
+
 #include <QWidget>
 #include <QLayout>
 #include <QPainter>
@@ -256,6 +258,14 @@ void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape,
     theDrawer->SetDeviationCoefficient(1.e-4);
 }
 
+Quantity_Color color(const std::string& theSection,
+                     const std::string& theName,
+                     const std::string& theDefault)
+{
+  std::vector<int> aColor = Config_PropManager::color(theSection, theName, theDefault);
+  return Quantity_Color(aColor[0] / 255., aColor[1] / 255., aColor[2] / 255., Quantity_TOC_RGB);
+}
+
 }