Salome HOME
ModelDocument test corrected to avoid SWIG/Python crash
[modules/shaper.git] / src / NewGeom / NewGeom_Module.h
index eab0275afc184cf369ae5b485ee49ee6274fd0d0..800d6b168957f26eaf83e805436f6a82598d469d 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 
 #ifndef NewGeom_Module_H
 #define NewGeom_Module_H
@@ -38,11 +40,14 @@ Q_OBJECT
                               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 QAction* addDesktopCommand(const QString& theId, const QString& theTitle,
+                                     const QString& theTip, const QIcon& theIcon,
+                                     const QKeySequence& theKeys, bool isCheckable,
+                                     const char* theMenuSourceText,
+                                     const int theMenuPosition = 10);
 
-  virtual void addEditMenuSeparator();
+  virtual void addDesktopMenuSeparator(const char* theMenuSourceText,
+                                       const int theMenuPosition = 10);
 
   virtual QMainWindow* desktop() const;
 
@@ -58,6 +63,14 @@ Q_OBJECT
   //! Returns list of nested actions according to the given command ID
   virtual QStringList nestedActions(const QString& theId) const;
 
+  //! Set the document kind of the action by the given command Id
+  //! \param theId - the command ID
+  //! \param theKind - the document kind
+  virtual void setDocumentKind(const QString& theId, const QString& theKind);
+
+  //! Returns the document kind of the action by the given command ID
+  virtual QString documentKind(const QString& theId) const;
+
   //! Returns interface to Salome viewer
   virtual ModuleBase_IViewer* viewer() const
   {
@@ -86,9 +99,12 @@ Q_OBJECT
  protected slots:
   virtual void onViewManagerAdded(SUIT_ViewManager* theMgr);
   void onDefaultPreferences();
+  // Obtains the current application and updates its actions
+  void onUpdateCommandStatus();
 
  protected:
   CAM_DataModel* createDataModel();
+  virtual QtxPopupMgr* popupMgr();
 
  private:
   NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr);
@@ -102,10 +118,14 @@ Q_OBJECT
   NewGeom_SalomeViewer* myProxyViewer;
 
   QMap<QString, QStringList> myNestedActions;
+  QMap<QString, QString> myDocumentType;
 
   bool myIsOpened;
-  bool myIsStorePositions;
+  // the next parameters should be restored after this module deactivation
+  bool myIsStorePositions; // the application value of the preferences parameter
+  bool myIsEditEnabled;    // the application value
 
+  QtxPopupMgr* myPopupMgr;
 };
 
 #endif