Salome HOME
Issue #1452 Fatal error when create Distance constraint on construction vertex
[modules/shaper.git] / src / ModuleBase / ModuleBase_Dialog.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #ifndef ModuleBase_Dialog_H
4 #define ModuleBase_Dialog_H
5
6 #include "ModuleBase.h"
7 #include <ModelAPI_Feature.h>
8
9 #include <QDialog>
10 #include <string>
11
12
13 class ModuleBase_IWorkshop;
14 class ModuleBase_ModelWidget;
15
16 /**
17  * \ingroup GUI
18  * A dialog box which is used for modal dialog box feature interface
19  */
20 class ModuleBase_Dialog : public QDialog
21 {
22   Q_OBJECT
23 public:
24   ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId, 
25                     const std::string& theDescription);
26
27   virtual void accept();
28
29 protected:
30   virtual void showEvent(QShowEvent* theEvent);
31
32
33 private:
34   void initializeWidget(ModuleBase_ModelWidget* theWidget);
35
36   QString myId;
37   std::string myDescription;
38   ModuleBase_IWorkshop* myWorkshop;
39   FeaturePtr myFeature;
40   QList<ModuleBase_ModelWidget*> myWidgets;
41   ModuleBase_ModelWidget* myActiveWidget;
42 };
43
44 #endif