Salome HOME
Edit extrusion object
[modules/shaper.git] / src / NewGeom / NewGeom_Module.h
index be58a360224af956e984836c986e300de5c4b421..ef0b4eb4ad28d8f2596b7155a7bc70c35c3f0142 100644 (file)
@@ -4,15 +4,18 @@
 #define NewGeom_Module_H
 
 #include "NewGeom.h"
+#include "NewGeom_SalomeViewer.h"
 
 #include <LightApp_Module.h>
 #include <XGUI_SalomeConnector.h>
 
 #include <QStringList>
+#include <QMap>
 
 class XGUI_Workshop; 
 class NewGeom_OCCSelector;
 class OCCViewer_Viewer;
+
 /** 
 * An implementation of SALOME connector class for implementation of
 * XGUI functionality as a module of SALOME
@@ -31,24 +34,20 @@ public:
   virtual void selectionChanged();
 
   //--- XGUI connector interface -----
-  virtual void addFeature(const QString& theWBName,
-                          const QString& theId, 
-                          const QString& theTitle, 
-                          const QString& theTip,
-                          const QIcon& theIcon, 
-                          bool isCheckable = false,
-                          QObject* reciever = 0,
-                          const char* member = 0,
-                          const QKeySequence& theKeys = QKeySequence());
-
-  virtual void addEditCommand(const QString& theId,
-                              const QString& theTitle,
+  virtual QAction* addFeature(const QString& theWBName,
+                              const QString& theId, 
+                              const QString& theTitle, 
                               const QString& theTip,
                               const QIcon& theIcon, 
-                              bool isCheckable,
-                              QObject* reciever,
-                              const char* member,
-                              const QKeySequence& theKeys);
+                              const QKeySequence& theKeys = QKeySequence(),
+                              bool isCheckable = false);
+
+  virtual QAction* addEditCommand(const QString& theId,
+                                  const QString& theTitle,
+                                  const QString& theTip,
+                                  const QIcon& theIcon, 
+                                  const QKeySequence& theKeys,
+                                  bool isCheckable);
 
   virtual void addEditMenuSeparator();
 
@@ -58,8 +57,22 @@ public:
 
   virtual QAction* command(const QString& theId) const;
 
-  //! Returns AIS_InteractiveContext from current OCCViewer
-  virtual Handle(AIS_InteractiveContext) AISContext() const;
+  //! Set nested actions dependent on command Id
+  //! \param theId - the command ID
+  //! \param theActions - the list of nested actions
+  virtual void setNestedActions(const QString& theId, const QStringList& theActions);
+
+  //! Returns list of nested actions according to the given command ID
+  virtual QStringList nestedActions(const QString& theId) const;
+
+  //! Returns interface to Salome viewer
+  virtual XGUI_SalomeViewer* viewer() const { return myProxyViewer; }
+
+  //! Returns list of defined actions (just by NewGeom module)
+  virtual QList<QAction*> commandList() const;
+
+  //! Returns list of Ids of defined actions (just by NewGeom module)
+  virtual QStringList commandIdList() const;
 
 public slots:
   virtual bool activateModule( SUIT_Study* theStudy);
@@ -80,6 +93,10 @@ private:
   XGUI_Workshop* myWorkshop;
 
   NewGeom_OCCSelector* mySelector;
+
+  NewGeom_SalomeViewer* myProxyViewer;
+
+  QMap<QString, QStringList> myNestedActions;
 };
 
 #endif