3 #ifndef NewGeom_Module_H
4 #define NewGeom_Module_H
7 #include "NewGeom_SalomeViewer.h"
9 #include <LightApp_Module.h>
10 #include <XGUI_SalomeConnector.h>
12 #include <QStringList>
16 class NewGeom_OCCSelector;
17 class OCCViewer_Viewer;
20 * An implementation of SALOME connector class for implementation of
21 * XGUI functionality as a module of SALOME
23 class NewGeom_EXPORT NewGeom_Module: public LightApp_Module, public XGUI_SalomeConnector
28 virtual ~NewGeom_Module();
30 //----- LightAPP_Module interface ---------------
31 virtual void initialize( CAM_Application* theApp);
32 virtual void windows( QMap<int, int>& theWndMap) const;
33 virtual void viewManagers( QStringList& theList) const;
34 virtual void selectionChanged();
36 //--- XGUI connector interface -----
37 virtual void addFeature(const QString& theWBName,
39 const QString& theTitle,
40 const QString& theTip,
42 bool isCheckable = false,
43 QObject* reciever = 0,
44 const char* member = 0,
45 const QKeySequence& theKeys = QKeySequence());
47 virtual void addEditCommand(const QString& theId,
48 const QString& theTitle,
49 const QString& theTip,
54 const QKeySequence& theKeys);
56 virtual void addEditMenuSeparator();
58 virtual QMainWindow* desktop() const;
60 virtual QString commandId(const QAction* theCmd) const;
62 virtual QAction* command(const QString& theId) const;
64 //! Set nested actions dependent on command Id
65 //! \param theId - the command ID
66 //! \param theActions - the list of nested actions
67 virtual void setNestedActions(const QString& theId, const QStringList& theActions);
69 //! Returns list of nested actions according to the given command ID
70 virtual QStringList nestedActions(const QString& theId) const;
72 //! Returns interface to Salome viewer
73 virtual XGUI_SalomeViewer* viewer() const { return myProxyViewer; }
76 virtual bool activateModule( SUIT_Study* theStudy);
77 virtual bool deactivateModule( SUIT_Study* theStudy);
80 virtual void onViewManagerAdded( SUIT_ViewManager* theMgr );
83 CAM_DataModel* createDataModel();
87 NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr);
89 QStringList myActionsList;
91 XGUI_Workshop* myWorkshop;
93 NewGeom_OCCSelector* mySelector;
95 NewGeom_SalomeViewer* myProxyViewer;
97 QMap<QString, QStringList> myNestedActions;