/**\class XGUI_OperationMgr
* \ingroup GUI
* \brief Operation manager. Servers to manipulate to the workshop operations. Contains a stack
/**\class XGUI_OperationMgr
* \ingroup GUI
* \brief Operation manager. Servers to manipulate to the workshop operations. Contains a stack
/// Returns the current operation or NULL
/// \return the current operation
ModuleBase_Operation* currentOperation() const;
/// Returns the current operation or NULL
/// \return the current operation
ModuleBase_Operation* currentOperation() const;
/// Returns true is operation manager has an operation with given Id.
bool hasOperation(const QString& theId) const;
/// Returns true is operation manager has an operation with given Id.
bool hasOperation(const QString& theId) const;
/// Find and return operation by its Id.
ModuleBase_Operation* findOperation(const QString& theId) const;
/// Find and return operation by its Id.
ModuleBase_Operation* findOperation(const QString& theId) const;
/// \return the state whether the current operation is started
bool startOperation(ModuleBase_Operation* theOperation);
/// \return the state whether the current operation is started
bool startOperation(ModuleBase_Operation* theOperation);
/// Returns whether the operation can be started. Check if there is already started operation and
/// the granted parameter of the launched operation
/// \param theId id of the operation which is going to start
/// Returns whether the operation can be started. Check if there is already started operation and
/// the granted parameter of the launched operation
/// \param theId id of the operation which is going to start
/// Blocking/unblocking enabling of Ok button in property panel.
/// It is used when operation can not be validated even all attributes are valid
/// Blocking/unblocking enabling of Ok button in property panel.
/// It is used when operation can not be validated even all attributes are valid
/// Returns state of validation locking
bool isValidationLocked() const { return myIsValidationLock; }
/// Returns state of validation locking
bool isValidationLocked() const { return myIsValidationLock; }
/// Returns enable apply state
/// \return theEnabled a boolean value
bool isApplyEnabled() const;
/// Returns enable apply state
/// \return theEnabled a boolean value
bool isApplyEnabled() const;
+ /// Returns valid state of the parent operation. If the current operation is the last one
+ /// it returns the valid state of the operation
+ /// \return boolean value
+ bool isParentOperationValid() const;
+
+public slots:
/// Slot that commits the current operation.
void onCommitOperation();
/// Slot that aborts the current operation.
void onAbortOperation();
/// Slot that validates the current operation using the validateOperation method.
void onValidateOperation();
/// Slot that commits the current operation.
void onCommitOperation();
/// Slot that aborts the current operation.
void onAbortOperation();
/// Slot that validates the current operation using the validateOperation method.
void onValidateOperation();
void operationAborted(ModuleBase_Operation* theOperation);
/// Signal is emitted after the apply enable state changed.
void operationAborted(ModuleBase_Operation* theOperation);
/// Signal is emitted after the apply enable state changed.
/// Signal is emitted after the current operation is filled with existing preselection.
void operationActivatedByPreselection();
/// Signal is emitted after the current operation is filled with existing preselection.
void operationActivatedByPreselection();
- /// Returns true if the operation can be aborted
- bool canStopOperation();
+ /// Sets apply state to the value and emit signal about this state is changed
+ /// \param theEnabled the state value
+ void setApplyEnabled(const bool theEnabled);
private:
typedef QList<ModuleBase_Operation*> Operations; ///< definition for a list of operations
Operations myOperations; ///< a stack of started operations. The active operation is on top,
// others are suspended and started by the active is finished
private:
typedef QList<ModuleBase_Operation*> Operations; ///< definition for a list of operations
Operations myOperations; ///< a stack of started operations. The active operation is on top,
// others are suspended and started by the active is finished
/// Lock/Unlock access to Ok button in property panel
bool myIsValidationLock;
/// Lock/Unlock access to Ok button in property panel
/// Lock/Unlock access to Ok button in property panel
bool myIsValidationLock;
/// Lock/Unlock access to Ok button in property panel