+public:
+ /// Constructor
+ /// \param theParent the parent object
+ /// \param theWorkshop a reference to workshop
+ /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param toShowConstraints a current show constraints state
+ PartSet_WidgetSketchLabel(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
+ const Config_WidgetAPI* theData,
+ const QMap<PartSet_Tools::ConstraintVisibleState, bool>& toShowConstraints);
+
+ virtual ~PartSet_WidgetSketchLabel();
+
+ /// Set the given wrapped value to the current widget
+ /// 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 do nothing if the plane of the sketch has been already set.
+ /// \param theValues the wrapped selection values
+ /// \param theToValidate a validation flag
+ virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
+ const bool theToValidate);
+
+ /// Returns list of widget controls
+ /// \return a control list
+ virtual QList<QWidget*> getControls() const;
+
+ /// The methiod called when widget is deactivated
+ virtual void deactivate();
+
+ /// 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();
+
+ static bool canFillSketch(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
+
+ static bool fillSketchPlaneBySelection(const FeaturePtr& theFeature,
+ const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
+
+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);
+
+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 std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);