Salome HOME
#1150 Tab buttons problems
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2DFlyout.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetPoint2dFlyout.h
4 // Created:     14 Oct 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef PartSet_WidgetPoint2DFlyout_H
8 #define PartSet_WidgetPoint2DFlyout_H
9
10 #include "PartSet.h"
11 #include <PartSet_WidgetPoint2d.h>
12
13 class XGUI_Workshop;
14
15 /**\class PartSet_WidgetPoint2DFlyout
16  * \ingroup Modules
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.
19  */
20 class PARTSET_EXPORT PartSet_WidgetPoint2DFlyout : public PartSet_WidgetPoint2D
21 {
22   Q_OBJECT
23 public:
24   /// Constructor
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   /// \param theParentId is Id of a parent of the current attribute
29   PartSet_WidgetPoint2DFlyout(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
30                         const Config_WidgetAPI* theData, 
31                         const std::string& theParentId);
32   /// Destructor
33   virtual ~PartSet_WidgetPoint2DFlyout() {};
34
35   /// Activates the editor control only in case if the mouse over the OCC window, otherwise
36   /// set focus to the usual double value control
37   /// \return the state whether the widget can accept the focus
38   virtual bool focusTo();
39
40 private:
41   //! Returns workshop
42   XGUI_Workshop* workshop() const;
43 };
44
45 #endif