20 #ifndef MODULEBASE_WIDGETVALIDATED_H_
21 #define MODULEBASE_WIDGETVALIDATED_H_
23 #include <ModuleBase.h>
24 #include <ModuleBase_ModelWidget.h>
26 #include <GeomAPI_Shape.h>
27 #include <GeomAPI_AISObject.h>
28 #include <ModelAPI_Object.h>
29 #include <ModelAPI_Attribute.h>
30 #include <ModelAPI_ResultBody.h>
32 #include <SelectMgr_ListOfFilter.hxx>
33 #include <NCollection_DataMap.hxx>
34 #include <TopoDS_Shape.hxx>
35 #include <AIS_NListOfEntityOwner.hxx>
72 virtual bool isValidSelection(
const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
75 ObjectPtr findPresentedObject(
const AISObjectPtr& theAIS)
const;
81 void clearValidatedCash();
85 bool isFilterActivated()
const;
91 SelectMgr_ListOfFilter& theSelectionFilters);
102 static void blockFeatureAttribute(
const AttributePtr& theAttribute,
103 const FeaturePtr& theFeature,
104 const bool& theToBlock,
105 bool& isFlushesActived,
106 bool& isAttributeSetInitializedBlocked,
107 bool& isAttributeSendUpdatedBlocked);
112 static bool isValidAttribute(
const AttributePtr& theAttribute);
118 virtual bool isValidInFilters(
const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
126 bool isValidSelectionForAttribute(
const std::shared_ptr<ModuleBase_ViewerPrs>& theValue,
127 const AttributePtr& theAttribute);
132 virtual AttributePtr attribute()
const;
138 virtual void storeAttributeValue(
const AttributePtr& theAttribute);
145 virtual void restoreAttributeValue(
const AttributePtr& theAttribute,
const bool theValid);
159 QList<std::shared_ptr<ModuleBase_ViewerPrs>> getFilteredSelected();
169 virtual void blockAttribute(
const AttributePtr& theAttribute,
const bool& theToBlock,
170 bool& isFlushesActived,
bool& isAttributeSetInitializedBlocked,
171 bool& isAttributeSendUpdatedBlocked);
178 bool getValidState(
const std::shared_ptr<ModuleBase_ViewerPrs>& theValue,
bool& theValid);
183 void storeValidState(
const std::shared_ptr<ModuleBase_ViewerPrs>& theValue,
const bool theValid);
189 void filterPresentations(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
193 void filterCompSolids(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
195 void collectSubBodies(
const ResultBodyPtr& theBody, AIS_NListOfEntityOwner& theList);
204 ObjectPtr myPresentedObject;
205 #ifdef LIST_OF_VALID_PRS
207 QList<std::shared_ptr<ModuleBase_ViewerPrs>> myValidPrs;
210 QList<std::shared_ptr<ModuleBase_ViewerPrs>> myInvalidPrs;
213 NCollection_DataMap<TopoDS_Shape, std::shared_ptr<ModuleBase_ViewerPrs> > myValidPrs;
214 NCollection_DataMap<TopoDS_Shape, std::shared_ptr<ModuleBase_ViewerPrs> > myInvalidPrs;
Allows to validate the attribute value of a feature or the whole feature.
Definition: ModelAPI_Validator.h:43
A class which provides access to selection.
Definition: ModuleBase_ISelection.h:44
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48