Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / ModuleBase / ModuleBase_IErrorMgr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_IErrorMgr.h
4 // Created:     22 July 2015
5 // Author:      Sergey POKHODENKO
6
7 #ifndef ModuleBase_IErrorMgr_H
8 #define ModuleBase_IErrorMgr_H
9
10 #include "ModuleBase.h"
11
12 #include <QObject>
13
14 #include <memory>
15
16 class ModuleBase_IPropertyPanel;
17 class ModelAPI_Feature;
18
19 /**
20  * \class ModuleBase_IErrorMgr
21  * \ingroup GUI
22  * \brief An interface to Errors manager object
23  */
24 class MODULEBASE_EXPORT ModuleBase_IErrorMgr : public QObject
25 {
26   Q_OBJECT
27 public:
28   /// Default constructor
29   /// \param theParent a parent object
30   ModuleBase_IErrorMgr(QObject* theParent = 0);
31   /// Virtual destructor
32   virtual ~ModuleBase_IErrorMgr();
33
34   /// \brief Set property pane to the operation
35   /// \param theProp a property panel instance
36   virtual void setPropertyPanel(ModuleBase_IPropertyPanel* theProp);
37
38   /// \return Currently installed property panel
39   ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
40
41   /// Update actions for the given feature
42   /// \param theFeature a feature
43   virtual void updateActions(const std::shared_ptr<ModelAPI_Feature>& theFeature) = 0;
44
45 protected slots:
46   /// Process values changed event for processing feature attribute validation errors.
47   virtual void onWidgetChanged() = 0;
48
49 protected:
50   /// Access to property panel
51   ModuleBase_IPropertyPanel* myPropertyPanel;
52 };
53
54 #endif // ModuleBase_IErrorMgr_H