Salome HOME
#1371 Using auxilliary Sketch elements in any Feature: code improvement to separate...
[modules/shaper.git] / src / PartSet / PartSet_WidgetMultiSelectorComposite.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetMultiSelectorComposite.h
4 // Created:     17 Mar 2016
5 // Author:      Natalia Ermolaeva
6
7 #ifndef PartSet_WidgetMultiSelectorComposite_H
8 #define PartSet_WidgetMultiSelectorComposite_H
9
10 #include "PartSet.h"
11
12 #include <ModuleBase_WidgetMultiSelector.h>
13
14 #include <ModelAPI_CompositeFeature.h>
15
16 /**
17 * \ingroup Modules
18 * Customosation of ModuleBase_WidgetMultiSelector in order to provide 
19 * working with sketch specific objects and creation of external objects.
20 */
21 class PARTSET_EXPORT PartSet_WidgetMultiSelectorComposite: public ModuleBase_WidgetMultiSelector
22 {
23 Q_OBJECT
24  public:
25   /// Constructor
26   /// \param theParent the parent object
27   /// \param theWorkshop instance of workshop interface
28   /// \param theData the widget configuation. The attribute of the model widget is obtained from
29   PartSet_WidgetMultiSelectorComposite(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
30                               const Config_WidgetAPI* theData);
31
32   virtual ~PartSet_WidgetMultiSelectorComposite();
33
34   /// Set focus to the first control of the current widget. The focus policy of the control is checked.
35   /// If the widget has the NonFocus focus policy, it is skipped.
36   /// \return the state whether the widget can accept the focus
37   virtual bool focusTo();
38
39   /// Editing mode depends on mode of current operation. This value is defined by it.
40   virtual void setEditingMode(bool isEditing);
41
42 private:
43   /// Returns true if the current composite feature contains at least one sub-object
44   /// \return boolean value
45   bool hasSubObjects() const;
46
47   /// Disable controls by setting them focus policy NoFocus and disabling them
48   void disableControls();
49 };
50
51 #endif