+bool NewGeom_Module::isFeatureOfNested(const QAction* theAction)
+{
+ return dynamic_cast<const NewGeom_NestedButton*>(theAction);
+}
+
+QAction* NewGeom_Module::addFeatureOfNested(const QString& theWBName,
+ const ActionInfo& theInfo,
+ const QList<QAction*>& theNestedActions)
+{
+ int aMenu = createMenu(theWBName, -1, -1, 50);
+ int aTool = createTool(theWBName, theWBName);
+
+ int aId = myActionsList.size();
+ myActionsList.append(theInfo.id);
+ SUIT_Desktop* aDesk = application()->desktop();
+ NewGeom_NestedButton* anAction = new NewGeom_NestedButton(aDesk, theNestedActions);
+ anAction->setData(theInfo.id);
+ anAction->setCheckable(theInfo.checkable);
+ anAction->setChecked(theInfo.checked);
+ anAction->setEnabled(theInfo.enabled);
+ anAction->setVisible(theInfo.visible);
+ anAction->setIcon(theInfo.icon);
+ anAction->setText(theInfo.text);
+ anAction->setToolTip(theInfo.toolTip);
+ anAction->setShortcut(theInfo.shortcut);
+ anAction->setFont(theInfo.font);
+
+ //int aItemId = createMenu(aId, aMenu, -1, 10);
+ int aToolId = createTool(anAction, aTool, aId);
+
+ return anAction;
+}
+
+