+//******************************************************
+void NewGeom_Module::addEditCommand(const QString& theId,
+ const QString& theTitle,
+ const QString& theTip,
+ const QIcon& theIcon,
+ bool isCheckable,
+ QObject* theReciever,
+ const char* theMember,
+ const QKeySequence& theKeys)
+{
+ int aMenu = createMenu(tr( "MEN_DESK_EDIT" ), -1, -1);
+
+ int aId = myActionsList.size();
+ myActionsList.append(theId);
+ SUIT_Desktop* aDesk = application()->desktop();
+ int aKeys = 0;
+ for (int i = 0; i < theKeys.count(); i++)
+ aKeys += theKeys[i];
+ createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
+ isCheckable, theReciever, theMember);
+ createMenu( aId, aMenu, 10 );
+}
+
+//******************************************************
+void NewGeom_Module::addEditMenuSeparator()
+{
+ int aMenu = createMenu(tr( "MEN_DESK_EDIT" ), -1, -1);
+ createMenu( separator(), aMenu, -1, 10 );
+}
+
+//******************************************************
+QMainWindow* NewGeom_Module::desktop() const
+{
+ return application()->desktop();
+}
+
+//******************************************************
+QString NewGeom_Module::commandId(const QAction* theCmd) const
+{
+ int aId = actionId(theCmd);
+ if (aId < myActionsList.size())
+ return myActionsList[aId];
+ return QString();
+}
+
+//******************************************************
+QAction* NewGeom_Module::command(const QString& theId) const
+{
+ int aId = myActionsList.indexOf(theId);
+ if ((aId != -1) && (aId < myActionsList.size())) {
+ return action(aId);
+ }
+ return 0;
+}
+
+//******************************************************
+void NewGeom_Module::setNestedActions(const QString& theId, const QStringList& theActions)
+{
+ myNestedActions[theId] = theActions;
+}
+
+//******************************************************
+QStringList NewGeom_Module::nestedActions(const QString& theId) const
+{
+ if (myNestedActions.contains(theId))
+ return myNestedActions[theId];
+ return QStringList();
+}
+
+//******************************************************
+Handle(AIS_InteractiveContext) NewGeom_Module::AISContext() const
+{
+ Handle(AIS_InteractiveContext) aContext;
+ OCCViewer_Viewer* aViewer = mySelector->viewer();
+ if (aViewer) {
+ aContext = aViewer->getAISContext();
+ }
+ return aContext;
+}
+
+//******************************************************
+void NewGeom_Module::selectionChanged()
+{
+ LightApp_Module::selectionChanged();
+ myWorkshop->salomeViewerSelectionChanged();
+}