Salome HOME
2.17. Improved management of overconstraint situation: VPA correction in symbol prs...
[modules/shaper.git] / src / PartSet / PartSet_WidgetEditor.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetShapeSelector.h
4 // Created:     27 Nov 2014
5 // Author:      Vitaly Smetannikov
6
7
8 #ifndef PartSet_WidgetEditor_H
9 #define PartSet_WidgetEditor_H
10
11 #include "PartSet.h"
12
13 #include <ModuleBase_WidgetEditor.h>
14
15 class ModuleBase_IWorkshop;
16
17 /**
18 * \ingroup Modules
19 * Customization of ModuleBase_WidgetEditor in order to do not show the editor value if the mouse
20 * cursor is not over the OCC window
21 */
22 class PARTSET_EXPORT PartSet_WidgetEditor : public ModuleBase_WidgetEditor
23 {
24 Q_OBJECT
25  public:
26   /// Constructor
27   /// \param theParent the parent object
28   /// \param theWorkshop instance of workshop interface
29   /// \param theData the widget configuration. The attribute of the model widget is obtained from
30   /// \param theParentId is Id of a parent of the current attribute
31   PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
32                        const Config_WidgetAPI* theData, const std::string& theParentId);
33
34   virtual ~PartSet_WidgetEditor() {}
35
36   /// Activates the editor control only in case if the mouse over the OCC window, otherwise
37   /// set focus to the usual double value control
38   /// \return the state whether the widget can accept the focus
39   virtual bool focusTo();
40
41 private:
42   ModuleBase_IWorkshop* myWorkshop; // the current workshop
43 };
44
45 #endif