1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef ModuleBase_Dialog_H
22 #define ModuleBase_Dialog_H
24 #include "ModuleBase.h"
25 #include <ModelAPI_Feature.h>
31 class ModuleBase_IWorkshop;
32 class ModuleBase_ModelWidget;
33 class QDialogButtonBox;
38 * A dialog box which is used for modal dialog box feature interface
40 class ModuleBase_Dialog : public QDialog
45 /// \param theParent a workshop object instance
46 /// \param theId an Id of a feature
47 /// \param theDescription an XML description of the feature
48 ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId,
49 const std::string& theDescription);
51 /// Redefinition of virtual method
52 virtual void accept();
55 /// Redefinition of virtual method
56 virtual void showEvent(QShowEvent* theEvent);
59 /// Initialising of the widget
60 void initializeWidget(ModuleBase_ModelWidget* theWidget);
65 /// XML description of the feature
66 std::string myDescription;
68 /// An instance of workshop object
69 ModuleBase_IWorkshop* myWorkshop;
71 /// The feature instance
74 /// List of created widgets
75 QList<ModuleBase_ModelWidget*> myWidgets;
77 /// Pointer on active widget
78 ModuleBase_ModelWidget* myActiveWidget;
80 /// Buttons of the dialog
81 QDialogButtonBox* myButtonsBox;