Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetBoolValue.cpp
index a34a73d6f02bedf6c2250345486d16cff2c3dff3..1c3b68d1d9bcbb87029802de5b55f24aefb53eba 100644 (file)
 #include <Config_WidgetAPI.h>
 
 #include <Events_Loop.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
 
 #include <QWidget>
 #include <QLayout>
 #include <QCheckBox>
 
-ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData)
-  : ModuleBase_ModelWidget(theParent, theData)
+ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent, 
+  const Config_WidgetAPI* theData, 
+  const std::string& theParentId)
+  : ModuleBase_ModelWidget(theParent, theData, theParentId)
 {
   QString aText = QString::fromStdString(theData->widgetLabel());
   QString aToolTip = QString::fromStdString(theData->widgetTooltip());
@@ -40,21 +42,21 @@ QWidget* ModuleBase_WidgetBoolValue::getControl() const
   return myCheckBox; 
 }
 
-bool ModuleBase_WidgetBoolValue::storeValue(FeaturePtr theFeature) const
+bool ModuleBase_WidgetBoolValue::storeValue(ObjectPtr theObject) const
 {
-  DataPtr aData = theFeature->data();
+  DataPtr aData = theObject->data();
   boost::shared_ptr<ModelAPI_AttributeBoolean> aBool = aData->boolean(attributeID());
 
   if (aBool->value() != myCheckBox->isChecked()) {
     aBool->setValue(myCheckBox->isChecked());
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED));
+    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
   }
   return true;
 }
 
-bool ModuleBase_WidgetBoolValue::restoreValue(FeaturePtr theFeature)
+bool ModuleBase_WidgetBoolValue::restoreValue(ObjectPtr theObject)
 {
-  DataPtr aData = theFeature->data();
+  DataPtr aData = theObject->data();
   boost::shared_ptr<ModelAPI_AttributeBoolean> aRef = aData->boolean(attributeID());
 
   bool isBlocked = myCheckBox->blockSignals(true);