#include <Config_WidgetAPI.h>
#include <Events_Loop.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
#include <QLabel>
ModuleBase_WidgetFeatureOrAttribute::ModuleBase_WidgetFeatureOrAttribute(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_WidgetFeature(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_WidgetFeature(theParent, theData, theParentId)
{
}
dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
if (aFeatureValue) {
boost::shared_ptr<GeomAPI_Pnt2d> aValuePoint = aFeatureValue->point();
- //TODO
-/* FeaturePtr aValueFeature = aFeatureValue->feature();
+ ObjectPtr aValueFeature = aFeatureValue->object();
if (aValueFeature) {
- isDone = setFeature(aValueFeature);
+ isDone = setObject(aValueFeature);
}
if (!isDone && aValuePoint) {
// find the given point in the feature attributes
}
if (aFPoint)
isDone = setAttribute(aFPoint);
- }*/
+ }
}
}
return isDone;
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
ModuleBase_WidgetFeatureOrAttribute* that = (ModuleBase_WidgetFeatureOrAttribute*) this;
- if (feature())
- aRef->setObject(feature());
+ if (object())
+ aRef->setObject(object());
else if (myAttribute)
aRef->setAttr(myAttribute);
FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aRef->object());
if (aFeature) {
- setFeature(aFeature);
+ setObject(aFeature);
myAttribute = aRef->attr();
std::string aText = "";