Salome HOME
Visualization preferences for sketcher are created
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.cpp
index 8c9de8767b5200a08ee51334b94b0baad7e5fd05..28c20ff4e1f686129567101fc00e25af74cc7e20 100644 (file)
@@ -15,6 +15,8 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Validator.h>
 
+#include <Config_PropManager.h>
+
 using namespace std;
 
 // the only created instance of this plugin
@@ -24,9 +26,27 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
 {
   PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+  aFactory->registerValidator("SketchPlugin_DistanceAttrValidator", new SketchPlugin_DistanceAttrValidator);
 
   // register this plugin
   ModelAPI_PluginManager::get()->registerPlugin(this);
+
+  // register sketcher properties
+  Config_PropManager::registerProp("Sketcher", "Visualization", 
+                                   "parallel_color", "Parallel constraint color",
+                                   Config_Prop::Color, PARALLEL_COLOR);
+  Config_PropManager::registerProp("Sketcher", "Visualization", 
+                                   "perpendicular_color", "Perpendicular constraint color",
+                                   Config_Prop::Color, PERPENDICULAR_COLOR);
+  Config_PropManager::registerProp("Sketcher", "Visualization", 
+                                   "distance_color", "Distance color",
+                                   Config_Prop::Color, DISTANCE_COLOR);
+  Config_PropManager::registerProp("Sketcher", "Visualization", 
+                                   "length_color", "Length color",
+                                   Config_Prop::Color, LENGTH_COLOR);
+  Config_PropManager::registerProp("Sketcher", "Visualization", 
+                                   "radius_color", "Radius color",
+                                   Config_Prop::Color, RADIUS_COLOR);
 }
 
 FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID)