1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #ifndef ModuleBase_Dialog_H
4 #define ModuleBase_Dialog_H
6 #include "ModuleBase.h"
7 #include <ModelAPI_Feature.h>
13 class ModuleBase_IWorkshop;
14 class ModuleBase_ModelWidget;
15 class QDialogButtonBox;
20 * A dialog box which is used for modal dialog box feature interface
22 class ModuleBase_Dialog : public QDialog
27 /// \param theParent a workshop object instance
28 /// \param theId an Id of a feature
29 /// \param theDescription an XML description of the feature
30 ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId,
31 const std::string& theDescription);
33 /// Redefinition of virtual method
34 virtual void accept();
37 /// Redefinition of virtual method
38 virtual void showEvent(QShowEvent* theEvent);
41 /// Initialising of the widget
42 void initializeWidget(ModuleBase_ModelWidget* theWidget);
47 /// XML description of the feature
48 std::string myDescription;
50 /// An instance of workshop object
51 ModuleBase_IWorkshop* myWorkshop;
53 /// The feature instance
56 /// List of created widgets
57 QList<ModuleBase_ModelWidget*> myWidgets;
59 /// Pointer on active widget
60 ModuleBase_ModelWidget* myActiveWidget;
62 /// Buttons of the dialog
63 QDialogButtonBox* myButtonsBox;