+ /// 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
+ /// \param theValid a boolean flag, if restore happens for valid parameters
+ virtual void restoreAttributeValue(const bool theValid);
+
+ /// Fills the attribute with the value of the selected owner
+ /// \param theOwner a selected owner
+ virtual bool setSelectionCustom(const ModuleBase_ViewerPrs& thePrs);
+
+ /// Saves the internal parameters to the given feature
+ /// \return True in success
+ virtual bool storeValueCustom() const
+ {
+ return true;
+ }
+
+ /// The methiod called when widget is activated
+ virtual void activateCustom();
+
+ private slots:
+ /// Slot on change selection
+ void onSelectionChanged();
+
+ /// Set sketch specific mode of selection
+ //void setSketchingMode();
+
+ private:
+ /// Create preview of planes for sketch plane selection
+ /// \param theOrigin an origin of the plane
+ /// \param theNorm a normal vector of the plane
+ /// \param theRGB a color of plane presentation [r, g, b] array
+ AISObjectPtr createPreviewPlane(std::shared_ptr<GeomAPI_Pnt> theOrigin,
+ std::shared_ptr<GeomAPI_Dir> theNorm,
+ const int theRGB[3]);
+
+ /// Set sketch plane by shape
+ /// \param theShape a planar face
+ std::shared_ptr<GeomAPI_Dir> setSketchPlane(const TopoDS_Shape& theShape);
+
+ /// Erase preview planes
+ void erasePreviewPlanes();
+
+ /// Show preview planes
+ void showPreviewPlanes();