]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2566: Create toolbar for Boolean operations
authorVitaly SMETANNIKOV <vsv@fedora26-02.nnov.opencascade.com>
Thu, 12 Jul 2018 11:53:21 +0000 (14:53 +0300)
committerVitaly SMETANNIKOV <vsv@fedora26-02.nnov.opencascade.com>
Thu, 12 Jul 2018 11:53:21 +0000 (14:53 +0300)
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI.h
src/XGUI/XGUI_SalomeConnector.h

index d764e275396b0d26d473e15d812fed3d7d85c6dd..ad28095355ccf4fd4e67b5d96671acc01da4364a 100644 (file)
@@ -471,6 +471,7 @@ QAction* SHAPERGUI::addFeature(const QString& theWBName, const ActionInfo& theIn
                                const bool isAddSeparator)
 {
   return addFeature(theWBName,
+                    theInfo.toolBar,
                     theInfo.id,
                     theInfo.text,
                     //Issue #650: in the SALOME mode the tooltip should be same as text
@@ -483,8 +484,8 @@ QAction* SHAPERGUI::addFeature(const QString& theWBName, const ActionInfo& theIn
 }
 
 //******************************************************
-QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theId,
-                               const QString& theTitle, const QString& theTip,
+QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theTBName,
+                               const QString& theId, const QString& theTitle, const QString& theTip,
                                const QIcon& theIcon, const QKeySequence& theKeys,
                                bool isCheckable, const bool isAddSeparator,
                                const QString& theStatusTip)
@@ -519,7 +520,7 @@ QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theId,
   if (isAddSeparator)
     createMenu(separator(), aWBMenu);
 
-  int aWBTool = createTool(theWBName, theWBName);
+  int aWBTool = createTool(theTBName, theTBName);
   int aToolId = createTool(aId, aWBTool);
   if (isAddSeparator)
     createTool(separator(), aWBTool);
index ffe975ca2813e5b5b0633bf423ae6ad28b958ee9..6d031e755d4377845b1227e559788d77b5e42a70 100644 (file)
@@ -66,8 +66,9 @@ Q_OBJECT
 
   //--- XGUI connector interface -----
 
-  virtual QAction* addFeature(const QString& theWBName, const QString& theId,
-                              const QString& theTitle, const QString& theTip, const QIcon& theIcon,
+  virtual QAction* addFeature(const QString& theWBName, const QString& theTBName,
+                              const QString& theId, const QString& theTitle,
+                              const QString& theTip, const QIcon& theIcon,
                               const QKeySequence& theKeys/* = QKeySequence()*/,
                               bool isCheckable /*= false*/, const bool isAddSeparator/* = false*/,
                               const QString& theStatusTip);
index 2c19972df35c8f35748590a260dcbd041cad4db7..bca5d2b5b366b745599747ae6464547443559f9e 100644 (file)
@@ -47,6 +47,7 @@ class XGUI_EXPORT XGUI_SalomeConnector
 
   //! Creates a feature (command) in SALOME desktop
   //! \param theWBName - a workbench name
+  //! \param theTBName - a toolbar name
   //! \param theId - an id of the feature
   //! \param theTitle - a menu item string
   //! \param theTip - a tooltip string (help)
@@ -55,7 +56,8 @@ class XGUI_EXPORT XGUI_SalomeConnector
   //! \param theKeys - hot keys
   //! \param isAddSeparator boolean flag about adding separator after the action
   //! returns created action
-  virtual QAction* addFeature(const QString& theWBName, const QString& theId,
+  virtual QAction* addFeature(const QString& theWBName, const QString& theTBName,
+                              const QString& theId,
                               const QString& theTitle, const QString& theTip,
                               const QIcon& theIcon,
                               const QKeySequence& theKeys, bool isCheckable,