3 #ifndef NewGeom_Module_H
4 #define NewGeom_Module_H
8 #include <LightApp_Module.h>
9 #include <XGUI_SalomeConnector.h>
11 #include <QStringList>
15 class NewGeom_OCCSelector;
16 class OCCViewer_Viewer;
18 * An implementation of SALOME connector class for implementation of
19 * XGUI functionality as a module of SALOME
21 class NewGeom_EXPORT NewGeom_Module: public LightApp_Module, public XGUI_SalomeConnector
26 virtual ~NewGeom_Module();
28 //----- LightAPP_Module interface ---------------
29 virtual void initialize( CAM_Application* theApp);
30 virtual void windows( QMap<int, int>& theWndMap) const;
31 virtual void viewManagers( QStringList& theList) const;
32 virtual void selectionChanged();
34 //--- XGUI connector interface -----
35 virtual void addFeature(const QString& theWBName,
37 const QString& theTitle,
38 const QString& theTip,
40 bool isCheckable = false,
41 QObject* reciever = 0,
42 const char* member = 0,
43 const QKeySequence& theKeys = QKeySequence());
45 virtual void addEditCommand(const QString& theId,
46 const QString& theTitle,
47 const QString& theTip,
52 const QKeySequence& theKeys);
54 virtual void addEditMenuSeparator();
56 virtual QMainWindow* desktop() const;
58 virtual QString commandId(const QAction* theCmd) const;
60 virtual QAction* command(const QString& theId) const;
62 //! Set nested actions dependent on command Id
63 //! \param theId - the command ID
64 //! \param theActions - the list of nested actions
65 virtual void setNestedActions(const QString& theId, const QStringList& theActions);
67 //! Returns list of nested actions according to the given command ID
68 virtual QStringList nestedActions(const QString& theId) const;
70 //! Returns AIS_InteractiveContext from current OCCViewer
71 virtual Handle(AIS_InteractiveContext) AISContext() const;
74 virtual bool activateModule( SUIT_Study* theStudy);
75 virtual bool deactivateModule( SUIT_Study* theStudy);
78 virtual void onViewManagerAdded( SUIT_ViewManager* theMgr );
81 CAM_DataModel* createDataModel();
85 NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr);
87 QStringList myActionsList;
89 XGUI_Workshop* myWorkshop;
91 NewGeom_OCCSelector* mySelector;
93 QMap<QString, QStringList> myNestedActions;