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 QAction* addFeature(const QString& theWBName,
39 const QString& theTitle,
40 const QString& theTip,
42 const QKeySequence& theKeys = QKeySequence(),
43 bool isCheckable = false);
45 virtual QAction* addEditCommand(const QString& theId,
46 const QString& theTitle,
47 const QString& theTip,
49 const QKeySequence& theKeys,
52 virtual void addEditMenuSeparator();
54 virtual QMainWindow* desktop() const;
56 virtual QString commandId(const QAction* theCmd) const;
58 virtual QAction* command(const QString& theId) const;
60 //! Set nested actions dependent on command Id
61 //! \param theId - the command ID
62 //! \param theActions - the list of nested actions
63 virtual void setNestedActions(const QString& theId, const QStringList& theActions);
65 //! Returns list of nested actions according to the given command ID
66 virtual QStringList nestedActions(const QString& theId) const;
68 //! Returns interface to Salome viewer
69 virtual XGUI_SalomeViewer* viewer() const { return myProxyViewer; }
71 //! Returns list of defined actions (just by NewGeom module)
72 virtual QList<QAction*> commandList() const;
74 //! Returns list of Ids of defined actions (just by NewGeom module)
75 virtual QStringList commandIdList() const;
78 virtual bool activateModule( SUIT_Study* theStudy);
79 virtual bool deactivateModule( SUIT_Study* theStudy);
82 virtual void onViewManagerAdded( SUIT_ViewManager* theMgr );
85 CAM_DataModel* createDataModel();
89 NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr);
91 QStringList myActionsList;
93 XGUI_Workshop* myWorkshop;
95 NewGeom_OCCSelector* mySelector;
97 NewGeom_SalomeViewer* myProxyViewer;
99 QMap<QString, QStringList> myNestedActions;