1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetPoint2dFlyout.h
4 // Created: 14 Oct 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef PartSet_WidgetPoint2DFlyout_H
8 #define PartSet_WidgetPoint2DFlyout_H
11 #include <PartSet_WidgetPoint2d.h>
15 /**\class PartSet_WidgetPoint2DFlyout
17 * \brief Implementation of usual point 2d widget with a condition that it can not accept the focus
18 * when the AIS presentation is not visualized in the viewer.
20 class PARTSET_EXPORT PartSet_WidgetPoint2DFlyout : public PartSet_WidgetPoint2D
25 /// \param theParent the parent object
26 /// \param theWorkshop a current workshop
27 /// \param theData the widget configuation. The attribute of the model widget is obtained from
28 PartSet_WidgetPoint2DFlyout(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
29 const Config_WidgetAPI* theData);
31 virtual ~PartSet_WidgetPoint2DFlyout() {};
33 /// Set the given wrapped value to the current widget
34 /// This value should be processed in the widget according to the needs
35 /// \param theValues the wrapped widget values
36 /// \param theToValidate a validation flag
37 virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
38 const bool theToValidate);
40 /// Checks if the selection presentation is valid in widget
41 /// \param theValue a selected presentation in the view
42 /// \return a boolean value
43 virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
45 /// Activates the editor control only in case if the mouse over the OCC window, otherwise
46 /// set focus to the usual double value control
47 /// \return the state whether the widget can accept the focus
48 virtual bool focusTo();
50 /// Returns true if the attribute can be changed using the selected shapes in the viewer
51 /// and creating a coincidence constraint to them. This control does not use them.
52 virtual bool useSelectedShapes() const;
56 XGUI_Workshop* workshop() const;