]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetMultiSelector.h
Salome HOME
Mirror for external objects.
[modules/shaper.git] / src / PartSet / PartSet_WidgetMultiSelector.h
index db5d4085957e64d7632dbefe7da55b039690d247..0bb999f082cc898c886a3b5c49a069adb761838a 100644 (file)
@@ -10,7 +10,8 @@
 
 #include "PartSet.h"
 
-#include <ModuleBase_WidgetShapeSelector.h>
+#include <ModuleBase_WidgetMultiSelector.h>
+#include <ModuleBase_ViewerPrs.h>
 
 #include <ModelAPI_CompositeFeature.h>
 
@@ -18,10 +19,10 @@ class PartSet_ExternalObjectsMgr;
 
 /**
 * \ingroup Modules
-* Customosation of ModuleBase_WidgetShapeSelector in order to provide 
-* working with sketch specific objects.
+* Customosation of ModuleBase_WidgetMultiSelector in order to provide 
+* working with sketch specific objects and creation of external objects.
 */
-class PARTSET_EXPORT PartSet_WidgetMultiSelector: public ModuleBase_WidgetShapeSelector
+class PARTSET_EXPORT PartSet_WidgetMultiSelector: public ModuleBase_WidgetMultiSelector
 {
 Q_OBJECT
  public:
@@ -42,6 +43,10 @@ Q_OBJECT
   /// Retrurns installed sketcher
   CompositeFeaturePtr sketch() const { return mySketch; }
 
+  /// Fills the attribute with the value of the selected owner
+  /// \param theOwner a selected owner
+  virtual bool setSelectionCustom(const ModuleBase_ViewerPrs& thePrs);
+
 protected:
   /// Creates a backup of the current values of the attribute
   /// It should be realized in the specific widget because of different
@@ -49,6 +54,13 @@ protected:
   /// \param theValid a boolean flag, if restore happens for valid parameters
   void restoreAttributeValue(const bool theValid);
 
+  /// Store the values to the model attribute of the widget. It casts this attribute to
+  /// the specific type and set the given values
+  /// \param theSelectedObject an object
+  /// \param theShape a selected shape, which is used in the selection attribute
+  /// \return true if it is succeed
+  bool setObject(const ObjectPtr& theSelectedObject, const GeomShapePtr& theShape);
+
 protected:
   PartSet_ExternalObjectsMgr* myExternalObjectMgr;
   /// Pointer to a sketch