SHAPER
9.13.0
|
Implementation of widget with validators and filters processing. More...
Public Member Functions | |
ModuleBase_WidgetValidator (ModuleBase_ModelWidget *theModelWidget, ModuleBase_IWorkshop *theWorkshop) | |
Constructor. More... | |
virtual void | selectionModes (int &, QIntList &) |
Fills given container with selection modes if the widget has it. More... | |
virtual void | selectionFilters (QIntList &theModuleSelectionFilters, SelectMgr_ListOfFilter &theSelectionFilters) |
Appends into container of workshop selection filters. More... | |
bool | isInValidate () const |
Returns true if the validation is activated. More... | |
virtual bool | isValidSelection (const std::shared_ptr< ModuleBase_ViewerPrs > &theValue) |
Checks all widget validator if the owner is valid. More... | |
virtual void | storeAttributeValue (const std::shared_ptr< ModelAPI_Attribute > &theAttribute) |
Creates a backup of the current values of the attribute. More... | |
virtual void | restoreAttributeValue (const std::shared_ptr< ModelAPI_Attribute > &theAttribute, const bool theValid) |
Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute. More... | |
bool | isValidAttribute (const std::shared_ptr< ModelAPI_Attribute > &theAttribute) const |
Checks the current attibute in all attribute validators. More... | |
void | clearValidatedCash () |
Clear all validated cash in the widget. More... | |
Protected Attributes | |
bool | myIsInValidate |
cashed if the value is processed in validation More... | |
ModuleBase_ModelWidget * | myModelWidget |
Reference to workshop. More... | |
ModuleBase_IWorkshop * | myWorkshop |
the active workshop More... | |
ModuleBase_WidgetSelectorStore * | myAttributeStore |
store/restore attribute values More... | |
QList< std::shared_ptr< ModuleBase_ViewerPrs > > | myValidPrs |
cash of valid selection presentations More... | |
QList< std::shared_ptr< ModuleBase_ViewerPrs > > | myInvalidPrs |
cash of invalid selection presentations More... | |
Implementation of widget with validators and filters processing.
ModuleBase_WidgetValidator::ModuleBase_WidgetValidator | ( | ModuleBase_ModelWidget * | theModelWidget, |
ModuleBase_IWorkshop * | theWorkshop | ||
) |
Constructor.
theModelWidget | the model widget to be validated |
theWorkshop | the current workshop |
|
inlinevirtual |
Fills given container with selection modes if the widget has it.
[out] | theModuleSelectionModes | module additional modes, -1 means all default modes |
theModes | [out] a container of modes |
|
virtual |
Appends into container of workshop selection filters.
[out] | theModuleSelectionFilters | module additional modes, -1 means all default modes |
[out] | selection | filters |
|
inline |
Returns true if the validation is activated.
|
virtual |
Checks all widget validator if the owner is valid.
Firstly it checks custom widget validating, next, the attribute's validating. It trying on the give selection to current attribute by setting the value inside and calling validators. After this, the previous attribute value is restored.The valid/invalid value is cashed.
theValue | a selected presentation in the view |
|
virtual |
Creates a backup of the current values of the attribute.
It should be realized in the specific widget because of different parameters of the current attribute
theAttribute | an attribute to be stored |
|
virtual |
Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute.
theAttribute | an attribute to be restored |
theValid | a boolean flag, if restore happens for valid parameters |
bool ModuleBase_WidgetValidator::isValidAttribute | ( | const std::shared_ptr< ModelAPI_Attribute > & | theAttribute | ) | const |
Checks the current attibute in all attribute validators.
theAttribute | an attribute to be validated |
void ModuleBase_WidgetValidator::clearValidatedCash | ( | ) |
Clear all validated cash in the widget.
|
protected |
cashed if the value is processed in validation
|
protected |
Reference to workshop.
the current widget to be validated
|
protected |
the active workshop
|
protected |
store/restore attribute values
|
protected |
cash of valid selection presentations
|
protected |
cash of invalid selection presentations