From: Vitaly SMETANNIKOV Date: Thu, 12 Jul 2018 11:53:21 +0000 (+0300) Subject: Issue #2566: Create toolbar for Boolean operations X-Git-Tag: SHAPER_V9_1_0RC1~126 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=730838e05c76b0842eb500eeb3c39030563734c7;p=modules%2Fshaper.git Issue #2566: Create toolbar for Boolean operations --- diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index d764e2753..ad2809535 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -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); diff --git a/src/SHAPERGUI/SHAPERGUI.h b/src/SHAPERGUI/SHAPERGUI.h index ffe975ca2..6d031e755 100644 --- a/src/SHAPERGUI/SHAPERGUI.h +++ b/src/SHAPERGUI/SHAPERGUI.h @@ -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); diff --git a/src/XGUI/XGUI_SalomeConnector.h b/src/XGUI/XGUI_SalomeConnector.h index 2c19972df..bca5d2b5b 100644 --- a/src/XGUI/XGUI_SalomeConnector.h +++ b/src/XGUI/XGUI_SalomeConnector.h @@ -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,