]> SALOME platform Git repositories - modules/shaper.git/blob - src/NewGeom/NewGeom_Module.h
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / NewGeom / NewGeom_Module.h
1
2
3 #ifndef NewGeom_Module_H
4 #define NewGeom_Module_H
5
6 #include "NewGeom.h"
7
8 #include <LightApp_Module.h>
9 #include <XGUI_SalomeConnector.h>
10
11 #include <QStringList>
12
13 class XGUI_Workshop;
14
15 /** 
16 * An implementation of SALOME connector class for implementation of
17 * XGUI functionality as a module of SALOME
18 */
19 class NewGeom_EXPORT NewGeom_Module: public LightApp_Module, public XGUI_SalomeConnector
20 {
21   Q_OBJECT
22 public:
23   NewGeom_Module();
24   virtual ~NewGeom_Module();
25
26   virtual void initialize( CAM_Application* theApp);
27   virtual void windows( QMap<int, int>& theWndMap) const;
28   virtual void viewManagers( QStringList& theList) const;
29
30   //--- XGUI connector interface -----
31   virtual void addFeature(const QString& theWBName,
32                           const QString& theId, 
33                           const QString& theTitle, 
34                           const QString& theTip,
35                           const QIcon& theIcon, 
36                           bool isCheckable = false,
37                           QObject* reciever = 0,
38                           const char* member = 0,
39                           const QKeySequence& theKeys = QKeySequence());
40
41   virtual void addEditCommand(const QString& theId,
42                               const QString& theTitle,
43                               const QString& theTip,
44                               const QIcon& theIcon, 
45                               bool isCheckable,
46                               QObject* reciever,
47                               const char* member,
48                               const QKeySequence& theKeys);
49
50   virtual void addEditMenuSeparator();
51
52   virtual QMainWindow* desktop() const;
53
54   virtual QString commandId(const QAction* theCmd) const;
55
56   virtual QAction* command(const QString& theId) const;
57
58   //! Returns AIS_InteractiveContext from current OCCViewer
59   virtual Handle(AIS_InteractiveContext) AISContext() const;
60
61 public slots:
62   bool activateModule( SUIT_Study* theStudy);
63   bool deactivateModule( SUIT_Study* theStudy);
64
65 protected:
66   CAM_DataModel* createDataModel();
67
68
69 private:
70   QStringList myActionsList;
71
72   XGUI_Workshop* myWorkshop;
73 };
74
75 #endif