connect(getApp()->action(LightApp_Application::FileSaveAsId), SIGNAL(triggered(bool)),
this, SLOT(onSaveAsDocByShaper()));
+ //connect(myWorkshop->operationMgr(), SIGNAL(operationResumed(ModuleBase_Operation*)),
+ // this, SLOT(onOperationResumed(ModuleBase_Operation*)));
+ //connect(myWorkshop->operationMgr(), SIGNAL(operationStopped(ModuleBase_Operation*)),
+ // this, SLOT(onOperationStopped(ModuleBase_Operation*)));
+ connect(myWorkshop->operationMgr(), SIGNAL(operationCommitted(ModuleBase_Operation*)),
+ this, SLOT(onOperationCommitted(ModuleBase_Operation*)));
+ connect(myWorkshop->operationMgr(), SIGNAL(operationAborted(ModuleBase_Operation*)),
+ this, SLOT(onOperationAborted(ModuleBase_Operation*)));
+
return isDone;
}
return LightApp_Module::deactivateModule(theStudy);
}
+//******************************************************
+void SHAPERGUI::logShaperGUIEvent()
+{
+ QAction* anAction = static_cast<QAction*>(sender());
+ QString anId = anAction->data().toString();
+ QString anEventDescription ("SHAPER");
+ if (anId.contains("Sketch"))
+ anEventDescription += " sketcher";
+ anEventDescription += ": ";
+ anEventDescription += anAction->text();
+ anEventDescription += " has been started";
+ CAM_Application::logUserEvent(anEventDescription);
+}
+
+//******************************************************
+void SHAPERGUI::onOperationCommitted(ModuleBase_Operation* theOperation)
+{
+ //QString anEventDescription ("SHAPER operation has been committed");
+ QString anEventDescription ("SHAPER operation ");
+ anEventDescription += theOperation->id();
+ anEventDescription += " has been committed";
+ CAM_Application::logUserEvent(anEventDescription);
+}
+
+//******************************************************
+void SHAPERGUI::onOperationAborted(ModuleBase_Operation* theOperation)
+{
+ QString anEventDescription ("SHAPER operation ");
+ anEventDescription += theOperation->id();
+ anEventDescription += " has been aborted";
+ CAM_Application::logUserEvent(anEventDescription);
+}
+
//******************************************************
void SHAPERGUI::onViewManagerAdded(SUIT_ViewManager* theMgr)
{
createTool(separator(), aWBTool);
registerCommandToolbar(theTBName, -1);
}
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(logShaperGUIEvent()));
return aAction;
}
class SHAPERGUI_OCCSelector;
class OCCViewer_Viewer;
class CAM_Study;
+class ModuleBase_Operation;
/**
* \ingroup Salome
/// Obtains the current application and updates its actions
void onUpdateCommandStatus();
+ /// \brief The method is called on any GUI action
+ virtual void logShaperGUIEvent();
+
protected:
/// Create data model
CAM_DataModel* createDataModel();
void onEditToolbars();
+ void onOperationCommitted(ModuleBase_Operation*);
+ void onOperationAborted(ModuleBase_Operation*);
+
private:
/// Create selector for OCC Viewer
/// \param theMgr view manager