-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <XGUI_MenuMgr.h>
#endif
#include <ModuleBase_IModule.h>
+#include <ModuleBase_Tools.h>
#include <QObject>
#include <QAction>
#endif
return;
}
+ QString aWchName = ModuleBase_Tools::translate("workshop", theMessage->workbenchId());
+ theMessage->setToolBarId(ModuleBase_Tools::translate("workshop",
+ theMessage->workbenchId()).toStdString());
#ifdef HAVE_SALOME
- std::shared_ptr<XGUI_MenuWorkbench> aWorkbench = findWorkbench(theMessage->workbenchId());
+ std::string aWchNameString = aWchName.toStdString();
+ std::shared_ptr<XGUI_MenuWorkbench> aWorkbench = findWorkbench(aWchNameString);
std::shared_ptr<XGUI_MenuGroup> aGroup = aWorkbench->findGroup(theMessage->groupId());
aGroup->setFeatureInfo(theMessage);
#else
ActionInfo aFeatureInfo;
aFeatureInfo.initFrom(theMessage);
- QString aWchName = QString::fromStdString(theMessage->workbenchId());
QStringList aNestedFeatures =
QString::fromStdString(theMessage->nestedFeatures()).split(" ", QString::SkipEmptyParts);
QList<QAction*> aNestedActList;
}
if (aNestedActions.contains(FEATURE_WHEN_NESTED_ABORT)) {
QAction* anAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AbortAll);
- QObject::connect(anAction, SIGNAL(triggered()), anOperationMgr, SLOT(abortAllOperations()));
+ QObject::connect(anAction, SIGNAL(triggered()), anOperationMgr, SLOT(onAbortAllOperation()));
aNestedActList << anAction;
}
}
std::list<std::shared_ptr<Config_FeatureMessage> >::const_iterator aFIt =
aFeaturesInfo.begin(), aFLast = aFeaturesInfo.end();
size_t aFSize = aFeaturesInfo.size();
- for(int i = 0; aFIt != aFLast; aFIt++, i++) {
+ for(size_t i = 0; aFIt != aFLast; aFIt++, i++) {
std::shared_ptr<Config_FeatureMessage> aMessage = *aFIt;
bool aUseSeparator = i == aFSize-1;
QAction* aAction = buildAction(aMessage, aWchName, aUseSeparator);
XGUI_OperationMgr* anOperationMgr = myWorkshop->operationMgr();
XGUI_ActionsMgr* anActionsMgr = myWorkshop->actionsMgr();
if (aNestedActions.contains(FEATURE_WHEN_NESTED_ACCEPT)) {
- QAction* anAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
+ anAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
QObject::connect(anAction, SIGNAL(triggered()), anOperationMgr, SLOT(commitAllOperations()));
aNestedActList << anAction;
}
if (aNestedActions.contains(FEATURE_WHEN_NESTED_ABORT)) {
- QAction* anAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AbortAll);
- QObject::connect(anAction, SIGNAL(triggered()), anOperationMgr, SLOT(abortAllOperations()));
+ anAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AbortAll);
+ QObject::connect(anAction, SIGNAL(triggered()), anOperationMgr, SLOT(onAbortAllOperation()));
aNestedActList << anAction;
}
anAction = aSalomeConnector->addFeatureOfNested(theWchName.c_str(), aFeatureInfo,