+QStringList XGUI_OperationMgr::operationList()
+{
+ QStringList result;
+ foreach(ModuleBase_Operation* eachOperation, myOperations)
+ {
+ result << eachOperation->id();
+ }
+ return result;
+}
+
+void XGUI_OperationMgr::validateOperation(ModuleBase_Operation* theOperation)
+{
+ //Get operation Id and feature to validate
+ QString anOperationId = theOperation->id();
+ FeaturePtr aFeature = theOperation->feature();
+ //Get validators for the Id
+ PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+
+ bool isValid = aFactory->validate(aFeature);
+ emit operationValidated(isValid);
+}
+
+void XGUI_OperationMgr::validateCurrentOperation()
+{
+ if (!hasOperation())
+ return;
+ ModuleBase_Operation* anOperation = currentOperation();
+ validateOperation(currentOperation());
+}
+
+bool XGUI_OperationMgr::eventFilter(QObject *theObject, QEvent *theEvent)
+{
+ if (theEvent->type() == QEvent::KeyRelease) {
+ QKeyEvent* aKeyEvent = (QKeyEvent*) theEvent;
+ if (aKeyEvent && aKeyEvent->key() == Qt::Key_Escape) {
+ // TODO: this is Escape button processing when the property panel has empty content,
+ // but the operation should be stopped by the Enter has been clicked
+ onKeyReleased("", aKeyEvent);
+ return true;
+ }
+ }
+ return QObject::eventFilter(theObject, theEvent);
+}
+
+void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
+{
+ theOperation->resume();
+}
+