1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetSketchCreator.h
4 // Created: 08 June 2015
5 // Author: Vitaly SMETANNIKOV
7 #ifndef PartSet_WidgetSketchCreator_H
8 #define PartSet_WidgetSketchCreator_H
12 #include <ModuleBase_ModelWidget.h>
17 class ModuleBase_Operation;
19 class PARTSET_EXPORT PartSet_WidgetSketchCreator : public ModuleBase_ModelWidget
24 /// \param theParent the parent object
25 /// \param theData the widget configuation. The attribute of the model widget is obtained from
26 /// \param theParentId is Id of a parent of the current attribute
27 PartSet_WidgetSketchCreator(QWidget* theParent, PartSet_Module* theModule,
28 const Config_WidgetAPI* theData, const std::string& theParentId);
30 virtual ~PartSet_WidgetSketchCreator();
32 virtual bool restoreValue();
34 /// Returns list of widget controls
35 /// \return a control list
36 virtual QList<QWidget*> getControls() const;
38 /// Set focus to the first control of the current widget. The focus policy of the control is checked.
39 /// If the widget has the NonFocus focus policy, it is skipped.
40 /// \return the state whether the widget can accept the focus
41 virtual bool focusTo();
44 /// Saves the internal parameters to the given feature
45 /// \return True in success
46 virtual bool storeValueCustom() const;
48 /// The methiod called when widget is activated
49 virtual void activateCustom();
54 void onResumed(ModuleBase_Operation* theOp);
58 PartSet_Module* myModule;
60 /// Label of the widget
63 /// Input control of the widget
64 QLineEdit* myTextLine;