Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / XGUI / XGUI_Workbench.cpp
index 996d5a7aeffe9df3245cb776321c6d244a430dd2..468d8d0ce1f1fdfa4732aedf1243355e605bcca2 100644 (file)
@@ -170,4 +170,24 @@ bool XGUI_Workbench::eventFilter(QObject *theObj, QEvent *theEvent)
     }
   }
   return QWidget::eventFilter(theObj, theEvent);
+}
+
+XGUI_Command* XGUI_Workbench::feature(const QString& theId) const
+{
+  QList<XGUI_MenuGroupPanel*>::const_iterator aIt;
+  for (aIt = myGroups.constBegin(); aIt != myGroups.constEnd(); ++aIt) {
+    XGUI_Command* aCmd = (*aIt)->feature(theId);
+    if (aCmd)
+      return aCmd;
+  }
+  return 0;
+}
+
+QList<XGUI_Command*> XGUI_Workbench::features() const
+{
+  QList<XGUI_Command*> aList;
+  QList<XGUI_MenuGroupPanel*>::const_iterator aIt;
+  for (aIt = myGroups.constBegin(); aIt != myGroups.constEnd(); ++aIt) 
+    aList.append((*aIt)->features());
+  return aList;
 }
\ No newline at end of file