Salome HOME
f8f2cb5c07b9c3bb9e9b7205f119abb31ebebe1b
[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   //----- LightAPP_Module interface ---------------
27   virtual void initialize( CAM_Application* theApp);
28   virtual void windows( QMap<int, int>& theWndMap) const;
29   virtual void viewManagers( QStringList& theList) const;
30   virtual void selectionChanged();
31
32   //--- XGUI connector interface -----
33   virtual void addFeature(const QString& theWBName,
34                           const QString& theId, 
35                           const QString& theTitle, 
36                           const QString& theTip,
37                           const QIcon& theIcon, 
38                           bool isCheckable = false,
39                           QObject* reciever = 0,
40                           const char* member = 0,
41                           const QKeySequence& theKeys = QKeySequence());
42
43   virtual void addEditCommand(const QString& theId,
44                               const QString& theTitle,
45                               const QString& theTip,
46                               const QIcon& theIcon, 
47                               bool isCheckable,
48                               QObject* reciever,
49                               const char* member,
50                               const QKeySequence& theKeys);
51
52   virtual void addEditMenuSeparator();
53
54   virtual QMainWindow* desktop() const;
55
56   virtual QString commandId(const QAction* theCmd) const;
57
58   virtual QAction* command(const QString& theId) const;
59
60   //! Returns AIS_InteractiveContext from current OCCViewer
61   virtual Handle(AIS_InteractiveContext) AISContext() const;
62
63 public slots:
64   bool activateModule( SUIT_Study* theStudy);
65   bool deactivateModule( SUIT_Study* theStudy);
66
67 protected:
68   CAM_DataModel* createDataModel();
69
70
71 private:
72   QStringList myActionsList;
73
74   XGUI_Workshop* myWorkshop;
75 };
76
77 #endif