+
+QStringList XGUI_ActionsMgr::nestedCommands(const QString& theId) const
+{
+ if (myNestedActions.contains(theId))
+ return myNestedActions[theId];
+ return QStringList();
+}
+
+bool XGUI_ActionsMgr::isNested(const QString& theId) const
+{
+ foreach(QString aId, myNestedActions.keys()) {
+ QStringList aList = myNestedActions[aId];
+ if (aList.contains(theId))
+ return true;
+ }
+ return false;
+}
+
+QKeySequence XGUI_ActionsMgr::registerShortcut(const QString& theKeySequence)
+{
+ if(theKeySequence.isEmpty()) {
+ return QKeySequence();
+ }
+ QKeySequence aResult(theKeySequence);
+ if(myShortcuts.contains(aResult)) {
+ QString aMessage = tr("Shortcut %1 is already defined. Ignore.").arg(theKeySequence);
+ Events_Error::send(aMessage.toStdString());
+ return QKeySequence();
+ }
+ myShortcuts.append(aResult);
+ return aResult;
+}