Salome HOME
Documentation update
[modules/shaper.git] / src / ModuleBase / ModuleBase_ModelDialogWidget.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_ModelDialogWidget.h
4 // Created:     01 June 2016
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef MODULEBASE_MODELDIALOGWIDGET_H
8 #define MODULEBASE_MODELDIALOGWIDGET_H
9
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
12
13 class QDialogButtonBox;
14
15 /// \class ModuleBase_ModelDialogWidget
16 /// \ingroup GUI
17 /// \brief Widget for dialog.
18 class MODULEBASE_EXPORT ModuleBase_ModelDialogWidget : public ModuleBase_ModelWidget
19 {
20 Q_OBJECT
21 public:
22   /// Constructor
23   /// \param theParent the parent object
24   /// \param theData the widget configuration. The attribute of the model widget is obtained from
25   /// a low-level API for reading xml definitions of widgets
26   ModuleBase_ModelDialogWidget(QWidget* theParent, const Config_WidgetAPI* theData) :
27                                 ModuleBase_ModelWidget(theParent, theData) {}
28
29   /// Set general buttons from dialog
30   /// \param theButtons the dialog buttons
31   void setDialogButtons(QDialogButtonBox* theButtons) { myOkCancelBtn = theButtons; }
32
33 protected:
34
35   /// Contains dialog buttons to enable/disable Ok and Cancel buttons
36   QDialogButtonBox* myOkCancelBtn;
37 };
38
39 #endif