connect(theOperation, SIGNAL(stopped()), this, SLOT(onOperationStopped()));
connect(theOperation, SIGNAL(started()), this, SIGNAL(operationStarted()));
+ connect(theOperation, SIGNAL(resumed()), this, SIGNAL(operationResumed()));
theOperation->start();
return true;
void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
{
- connect(theOperation, SIGNAL(stopped()), this, SLOT(onOperationStopped()));
- connect(theOperation, SIGNAL(started()), this, SIGNAL(operationStarted()));
-
theOperation->resume();
}
{
bool aCanStart = true;
ModuleBase_Operation* aCurrentOp = currentOperation();
- if (aCurrentOp && !theOperation->isGranted())
+ if (aCurrentOp && !theOperation->isGranted(aCurrentOp))
{
if (canStopOperation()) {
aCurrentOp->abort();
return anAnswer == QMessageBox::Ok;
}
+void XGUI_OperationMgr::onCommitOperation()
+{
+ ModuleBase_Operation* anOperation = currentOperation();
+ if (anOperation)
+ anOperation->commit();
+}
+
+void XGUI_OperationMgr::onAbortOperation()
+{
+ ModuleBase_Operation* anOperation = currentOperation();
+ if (anOperation)
+ anOperation->abort();
+}
+
void XGUI_OperationMgr::onOperationStopped()
{
ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());