]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_ContextMenuMgr.cpp
Salome HOME
Issue #725 - Translation with parameters - wrong coordinates
[modules/shaper.git] / src / XGUI / XGUI_ContextMenuMgr.cpp
index c3ee64886b9fcb2b123362174f4d738d85009c67..dac0f4625ee444c6b1e152026576d778e892021c 100644 (file)
@@ -386,3 +386,24 @@ QMenu* XGUI_ContextMenuMgr::viewerMenu() const
   }
   return aMenu;
 }
+
+QStringList XGUI_ContextMenuMgr::actionObjectGroups(const QString& theName)
+{
+  QStringList aGroups;
+
+  QMap<std::string, QActionsList>::const_iterator anIt = myObjBrowserMenus.begin(),
+                                                  aLast = myObjBrowserMenus.end();
+  for (; anIt != aLast; anIt++) {
+    QString aGroupName(anIt.key().c_str());
+    if (aGroups.contains(aGroupName))
+      continue;
+    QActionsList anActions = anIt.value();
+    QActionsList::const_iterator anAIt = anActions.begin(), anALast = anActions.end();
+    bool aFound = false;
+    for (; anAIt != anALast && !aFound; anAIt++)
+      aFound = (*anAIt)->data().toString() == theName;
+    if (aFound)
+      aGroups.append(aGroupName);
+  }
+  return aGroups;
+}