+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::acceptSubShape(boost::shared_ptr<GeomAPI_Shape> theShape) const
+{
+ TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+ foreach (QString aType, myShapeTypes) {
+ if (aShape.ShapeType() == shapeType(aType))
+ return true;
+ }
+ return false;
+}
+
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::acceptObjectType(const ObjectPtr theObject) const
+{
+ // Definition of types is not obligatory. If types are not defined then
+ // it means that accepted any type
+ if (myObjectTypes.isEmpty())
+ return true;
+
+ foreach (QString aType, myObjectTypes) {
+ if (aType.toLower() == "construction") {
+ ResultConstructionPtr aConstr =
+ boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
+ return (aConstr != NULL);
+ } // ToDo: Process other types of objects
+ }
+ // Object type is defined but not found
+ return false;
+}
+
+