/// Returns number of operations in the stack
int operationsCount() const;
/// Returns list of all operations IDs
- QStringList operationList();
+ QStringList operationList() const;
+
+ /// Returns previous (parent) operation if given operation started.
+ /// else, or if there is no parent - returns NULL
+ ModuleBase_Operation* previousOperation(ModuleBase_Operation* theOperation) const;
virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
protected:
/// Commits the current operatin if it is valid
- void commitOperation();
+ bool commitOperation();
/// Sets the current operation or NULL
/// \param theOperation the started operation
/// \param isCheckBeforeStart the flag whether to check whether the operation can be started
/// Returns true if the operation can be aborted
bool canAbortOperation();
- protected slots:
- /// Slot that is called by an operation stop. Removes the stopped operation form the stack.
- /// If there is a suspended operation, restart it.
- void onOperationStopped();
-
+ public slots:
/// SLOT, that is called by the key in the property panel is clicked.
/// \param theName the attribute name
/// \param theEvent the mouse event
/// \param theWidget an activated widget
void onWidgetActivated(ModuleBase_ModelWidget* theWidget);
+ protected slots:
+ /// Slot that is called by an operation stop. Removes the stopped operation form the stack.
+ /// If there is a suspended operation, restart it.
+ void onOperationStopped();
+
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,