+ /// The methiod called when widget is deactivated
+ virtual void deactivate();
+
+ /// The method called if widget should be activated always
+ virtual bool needToBeActivated() { return true; }
+
+ /// Returns sketcher plane
+ std::shared_ptr<GeomAPI_Pln> plane() const;
+
+ /// This control accepts focus
+ virtual bool focusTo();
+ virtual void setHighlighted(bool) { /*do nothing*/ };
+ virtual void enableFocusProcessing();
+
+ /// Set current state of show free points
+ /// \param theState a state of the corresponded check box
+ void setShowPointsState(bool theState);
+
+ /// Returns True if the selected presentation can be used for plane definition
+ /// \param thePrs a presentation
+ static bool canFillSketch(const ModuleBase_ViewerPrsPtr& thePrs);
+
+ /// If widgets has several panels then this method has to show a page which contains information
+ /// for current feature. By default does nothing
+ virtual void showInformativePage() {
+ if (myStackWidget) myStackWidget->setCurrentIndex(1);
+ }
+
+signals:
+ /// Signal on plane selection
+ void planeSelected(const std::shared_ptr<GeomAPI_Pln>& thePln);
+
+ /// A show constraint toggled signal
+ /// \param theType a ConstraintVisibleState value
+ /// \param theState a state of the check box
+ void showConstraintToggled(int theType, bool theState);
+
+ /// The signal is emitted when user checks "Show free points" button
+ /// \param toShow a state of the check box
+ void showFreePoints(bool toShow);
+
+ /// The signal is emitted when user checks "Automatic constraints" button
+ /// \param isOn a state of the check box
+ void autoConstraints(bool isOn);
+
+protected:
+ /// 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 theAttribute an attribute to be stored
+ virtual void storeAttributeValue(const AttributePtr& theAttribute);
+
+ /// 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 theAttribute an attribute to be restored
+ /// \param theValid a boolean flag, if restore happens for valid parameters
+ virtual void restoreAttributeValue(const AttributePtr& theAttribute,
+ const bool theValid);
+
+ /// Fills the attribute with the value of the selected owner
+ /// \param thePrs a selected owner
+ virtual bool setSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs);
+
+ /// Saves the internal parameters to the given feature
+ /// \return True in success
+ virtual bool storeValueCustom()
+ {
+ return true;
+ }
+
+ virtual bool restoreValueCustom();