]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Interfaces.h
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / XGUI / XGUI_Interfaces.h
1
2 #ifndef XGUI_Interfaces_H
3 #define XGUI_Interfaces_H
4
5 #include <QString>
6 #include <QIcon>
7 #include <QKeySequence>
8
9
10 class IFeatureMenu
11 {
12 public:
13     virtual bool enabled() const = 0;
14     virtual void enable() = 0;
15     virtual void disable() = 0;
16     virtual QString getId() const = 0;
17     virtual void connectTo(const QObject* theResiver, const char* theSlot) = 0;
18 };
19
20
21 class IMenuGroup
22 {
23 public:
24     virtual IFeatureMenu* addFeature(const QString& theId, 
25                                      const QString& theTitle, 
26                                      const QString& theTip, 
27                                      const QIcon& theIcon, 
28                                      const QKeySequence& theKeys = QKeySequence()) = 0;
29 };
30
31
32 class IWorkbench
33 {
34 public:
35     virtual IMenuGroup* addGroup() = 0;
36 };
37
38
39 class IWorkshop
40 {
41 public:
42     virtual IWorkbench* addWorkbench(const QString& theName) = 0;
43 };
44
45
46 class IModule
47 {
48 public:
49     virtual void createFeatures() = 0;
50 };
51
52
53 //! This function must return a new module instance.
54 extern "C"
55 {
56    typedef IModule* (*CREATE_FUNC)(IWorkshop*);
57 }
58
59 #define CREATE_MODULE "createModule"
60
61
62 #endif