#include "ModuleBase_Operation.h"
+#include "ModuleBase_WidgetCustom.h"
+
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_Document.h>
#include <ModelAPI_Feature.h>
emit started();
}
+/*!
+ * \brief Resumes operation
+ *
+ * Public slot. Verifies whether operation can be started and starts operation.
+ * This slot is not virtual and cannot be redefined. Redefine startOperation method
+ * to change behavior of operation. There is no point in using this method. It would
+ * be better to inherit own operator from base one and redefine startOperation method
+ * instead.
+ */
+void ModuleBase_Operation::resume()
+{
+}
+
/*!
* \brief Aborts operation
*
aReal->setValue(theValue);
}
+/*!
+ * \brief Stores a real value in model.
+ * \param theValue - to store
+ *
+ * Public slot. Passes theValue into the model.
+ */
+void ModuleBase_Operation::storeCustomValue()
+{
+ if(!myFeature){
+ #ifdef _DEBUG
+ qDebug() << "ModuleBase_Operation::storeCustom: " <<
+ "trying to store value without opening a transaction.";
+ #endif
+ return;
+ }
+
+ ModuleBase_WidgetCustom* aCustom = dynamic_cast<ModuleBase_WidgetCustom*>(sender());
+ if (aCustom)
+ aCustom->store(myFeature);
+}
+
/*!
* \brief Verifies whether operator is ready to start.
* \return TRUE if operation is ready to start