Salome HOME
Merge branch 'Dev_1.2.0' of newgeom:newgeom into Dev_1.2.0
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetValidated.h
index 8c05cbb046a64055f2bf67cee0ec5aa0d22c5c2b..0ac6657e7d302fe66846362903933581a8412ec6 100644 (file)
@@ -19,6 +19,7 @@
 class QWidget;
 class ModuleBase_IWorkshop;
 class ModuleBase_ISelection;
+class ModelAPI_Validator;
 class Config_WidgetAPI;
 class Handle_SelectMgr_EntityOwner;
 
@@ -48,8 +49,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidated : public ModuleBase_ModelWidg
   /// This value should be processed in the widget according to the needs
   /// The method is called by the current operation to process the operation preselection.
   /// It is redefined to check the value validity and if it is, fill the attribute with by value
-  /// \param theValue the wrapped widget value
-  virtual bool setSelection(ModuleBase_ViewerPrs theValue);
+  /// \param theValues the wrapped selection values
+  /// \param thePosition an index in the list of values, the values should be get from the index
+  virtual bool setSelection(const QList<ModuleBase_ViewerPrs>& theValues, int& thePosition);
 
 protected:
   /// Creates a backup of the current values of the attribute
@@ -78,6 +80,12 @@ protected:
   /// \param toActivate a flag about activation or deactivation the filters
   virtual void activateFilters(ModuleBase_IWorkshop* theWorkshop, const bool toActivate) const;
 
+  /// Puts additional validators to the given list
+  /// \param theValidators a list of validators
+  /// \param theArguments a list of validators arguments
+  virtual void customValidators(std::list<ModelAPI_Validator*>& theValidators,
+                                std::list<std::list<std::string> >& theArguments) const;
+
   /// Returns a list of selected presentations. Firstly it is obtained from the viewer,
   /// if there are not selected objects in the viewer, it get the selection from the object browser.
   /// If the browser has selected objects, the viewer prs objects are created with only object