class QWidget;
class ModuleBase_IWorkshop;
+class ModuleBase_ISelection;
class Config_WidgetAPI;
class Handle_SelectMgr_EntityOwner;
/// Checks all widget validator if the owner is valid
/// \param theOwner a selected owner in the view
/// \return a boolean value
- bool isValid(const Handle_SelectMgr_EntityOwner& theOwner);
+ bool isValidSelection(const ModuleBase_ViewerPrs& theValue);
/// Set the given wrapped value to the current widget
/// This value should be processed in the widget according to the needs
/// Fills the attribute with the value of the selected owner
/// \param theOwner a selected owner
- virtual bool setSelection(const Handle_SelectMgr_EntityOwner& theOwner) = 0;
+ virtual bool setSelectionCustom(const ModuleBase_ViewerPrs& thePrs) = 0;
virtual void removePresentations() {};
/// \param theWorkshop an active workshop
/// \param toActivate a flag about activation or deactivation the filters
virtual void activateFilters(ModuleBase_IWorkshop* theWorkshop, const bool toActivate) 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
+ /// field of the presentation initialized. The widget should accept the selection in the object
+ /// browser at the same way as in the viewer.
+ /// \param theSelection a selection, where the selected objects and presentations are found
+ /// \return a list of presentations
+ QList<ModuleBase_ViewerPrs> getSelectedEntitiesOrObjects(ModuleBase_ISelection* theSelection) const;
+
};
#endif /* MODULEBASE_WIDGETVALIDATED_H_ */