+void XGUI_ActionsMgr::addCommand(QAction* theCmd)
+{
+ QString aId = theCmd->data().toString();
+ if (aId.isEmpty()) {
+ return;
+ }
+ myActions.insert(aId, theCmd);
+ XGUI_Command* aXCmd = dynamic_cast<XGUI_Command*>(theCmd);
+ if (aXCmd) {
+ myNestedActions[aId] = aXCmd->nestedCommands();
+ } else {
+ XGUI_Workshop* aWorkshop = static_cast<XGUI_Workshop*>(parent());
+ myNestedActions[aId] = aWorkshop->salomeConnector()->nestedActions(aId);
+ }
+}
+
+void XGUI_ActionsMgr::addNestedCommands(const QString& theId, const QStringList& theCommands)
+{
+ myNestedActions[theId] = theCommands;
+}