X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetValidator.h;h=8c7c927a9362e4ce3deaf512171bf929af8033be;hb=2e60d80d7d0b998fded953311cc8d2931ef5bb4b;hp=97e852d59ca2c106c50b25ee4b95bce1a687b470;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetValidator.h b/src/ModuleBase/ModuleBase_WidgetValidator.h index 97e852d59..8c7c927a9 100755 --- a/src/ModuleBase/ModuleBase_WidgetValidator.h +++ b/src/ModuleBase/ModuleBase_WidgetValidator.h @@ -21,7 +21,11 @@ #ifndef ModuleBase_WidgetValidator_H_ #define ModuleBase_WidgetValidator_H_ -#include +#include "ModuleBase.h" + +#include "ModuleBase_Definitions.h" + +#include #include #include @@ -47,6 +51,17 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidator ModuleBase_IWorkshop* theWorkshop); virtual ~ModuleBase_WidgetValidator(); + /// Fills given container with selection modes if the widget has it + /// \param [out] theModuleSelectionModes module additional modes, -1 means all default modes + /// \param theModes [out] a container of modes + virtual void selectionModes(int& theModuleSelectionModes, QIntList& theModes) {} + + /// Appends into container of workshop selection filters + /// \param [out] theModuleSelectionFilters module additional modes, -1 means all default modes + /// \param [out] selection filters + virtual void selectionFilters(QIntList& theModuleSelectionFilters, + SelectMgr_ListOfFilter& theSelectionFilters); + /// Returns true if the validation is activated bool isInValidate() const { return myIsInValidate; } @@ -58,11 +73,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidator /// \return a boolean value virtual bool isValidSelection(const std::shared_ptr& theValue); - /// It obtains selection filters from the workshop and activates them in the active viewer - /// \param toActivate a flag about activation or deactivation the filters - /// \return true if the selection filter of the widget is activated in viewer context - bool activateFilters(const bool toActivate); - /// 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 @@ -82,14 +92,14 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidator /// \return true if all validators return that the attribute is valid bool isValidAttribute(const std::shared_ptr& theAttribute) const; + //! Clear all validated cash in the widget + void clearValidatedCash(); + private: /// Returns true if the workshop validator filter has been already activated /// \return boolean value bool isFilterActivated() const; - //! Clear all validated cash in the widget - void clearValidatedCash(); - /// Gets the validity state of the presentation in an internal map. /// Returns true if the valid state of value is stored /// \param theValue a viewer presentation @@ -106,7 +116,7 @@ protected: /// Reference to workshop ModuleBase_ModelWidget* myModelWidget; ///< the current widget to be validated ModuleBase_IWorkshop* myWorkshop; ///< the active workshop - ModuleBase_WidgetSelectorStore* myAttributeStore; //< store/restore attribute values + ModuleBase_WidgetSelectorStore* myAttributeStore; ///< store/restore attribute values /// cash of valid selection presentations QList> myValidPrs;