Salome HOME
Issue #862: new implementation of operations abort on save
[modules/shaper.git] / src / NewGeom / NewGeom_Module.h
index 3482c12e8ad90e3d830d4325727574957cd99bcc..6024fa843ee9d90fa7bfb5b8c700ec25bc9e0c44 100644 (file)
@@ -10,6 +10,8 @@
 #include <LightApp_Module.h>
 #include <XGUI_SalomeConnector.h>
 
+#include <ModuleBase_ActionInfo.h>
+
 #include <QStringList>
 #include <QMap>
 
@@ -51,6 +53,20 @@ Q_OBJECT
                               const QKeySequence& theKeys = QKeySequence(),
                               bool isCheckable = false);
 
+  //! Add feature (QAction) in the \a theWBName toolbar with given \a theInfo about action
+  virtual QAction* addFeature(const QString& theWBName,
+                              const ActionInfo& theInfo);
+
+  virtual QAction* addNestedFeature(const QString& theWBName,
+                                    const ActionInfo& theInfo,
+                                    const QList<QAction*>& theNestedActions);
+
+  //! Returns true if the feature action is a nested action, in other words,
+  //! it is created by addNestedFeature().
+  //! \param theId - an action of a feature
+  //! returns boolean result
+  virtual bool isNestedFeature(const QAction* theAction);
+
   virtual QAction* addDesktopCommand(const QString& theId, const QString& theTitle,
                                      const QString& theTip, const QIcon& theIcon,
                                      const QKeySequence& theKeys, bool isCheckable,
@@ -60,6 +76,8 @@ Q_OBJECT
   virtual void addDesktopMenuSeparator(const char* theMenuSourceText,
                                        const int theMenuPosition = 10);
 
+  virtual bool addActionInToolbar( QAction* theAction, const QString& theToolBarTitle );
+    
   virtual QMainWindow* desktop() const;
 
   virtual QString commandId(const QAction* theCmd) const;
@@ -146,6 +164,8 @@ Q_OBJECT
   /// Create popup menu manager
   virtual QtxPopupMgr* popupMgr();
 
+  virtual bool abortAllOperations();
+
  private:
    /// Create selector for OCC Viewer
    /// \param theMgr view manager