|
@@ -50,14 +50,14 @@ public:
|
|
|
/// \brief Start the workflow.
|
|
|
/// The workflow will always start in the initial step, even if it is stopped and restarted).
|
|
|
/// \note Calls onEntry() for the initial step.
|
|
|
- virtual void start();
|
|
|
+ Q_INVOKABLE virtual void start();
|
|
|
|
|
|
/// \brief Returns whether the workflow is currently running
|
|
|
bool isRunning()const;
|
|
|
|
|
|
/// \brief Stops the workflow.
|
|
|
/// \note Calls onExit() for the current step.
|
|
|
- virtual void stop();
|
|
|
+ Q_INVOKABLE virtual void stop();
|
|
|
|
|
|
/// \brief Transition directionalities.
|
|
|
///
|
|
@@ -110,11 +110,11 @@ public:
|
|
|
///
|
|
|
/// \note The initialStep() function *must* be called to set the state machine's initial state
|
|
|
/// correctly
|
|
|
- ctkWorkflowStep* initialStep()const;
|
|
|
- virtual void setInitialStep(ctkWorkflowStep* step);
|
|
|
+ Q_INVOKABLE ctkWorkflowStep* initialStep()const;
|
|
|
+ Q_INVOKABLE virtual void setInitialStep(ctkWorkflowStep* step);
|
|
|
|
|
|
/// Get the current step of the state machine
|
|
|
- ctkWorkflowStep* currentStep()const;
|
|
|
+ Q_INVOKABLE ctkWorkflowStep* currentStep()const;
|
|
|
|
|
|
/// Check to see if there is a step with a given id in the workflow.
|
|
|
Q_INVOKABLE bool hasStep(const QString& id)const;
|
|
@@ -123,13 +123,13 @@ public:
|
|
|
/// given step.
|
|
|
///
|
|
|
/// If no step is given, then the workflow's current step will be used.
|
|
|
- bool canGoForward(ctkWorkflowStep* step=0)const;
|
|
|
+ Q_INVOKABLE bool canGoForward(ctkWorkflowStep* step=0)const;
|
|
|
|
|
|
/// Returns whether or not we can go backward: i.e. there exists a step that directly preceeds the
|
|
|
/// given step.
|
|
|
///
|
|
|
/// If no step is given, then the workflow's current step will be used.
|
|
|
- bool canGoBackward(ctkWorkflowStep* step=0)const;
|
|
|
+ Q_INVOKABLE bool canGoBackward(ctkWorkflowStep* step=0)const;
|
|
|
|
|
|
/// Returns whether or not we can go to the goal step from the origin step: i.e. there is a path
|
|
|
/// in the workflow from the current step to the given step.
|
|
@@ -137,7 +137,7 @@ public:
|
|
|
/// If no step is designated as the 'origin', then the workflow's current step will be used
|
|
|
/// Note: does not currently work in branching workflows if the origin and target steps are not on
|
|
|
/// the same branch
|
|
|
- bool canGoToStep(const QString& targetId, ctkWorkflowStep* step=0)const;
|
|
|
+ Q_INVOKABLE bool canGoToStep(const QString& targetId, ctkWorkflowStep* step=0)const;
|
|
|
|
|
|
/// Get the steps that directly follow the given step.
|
|
|
///
|
|
@@ -146,7 +146,7 @@ public:
|
|
|
/// to ctkWorkflow::Bidirectional or ctkWorkflow::Forward.
|
|
|
///
|
|
|
/// If no step is given, then the workflow's current step will be used.
|
|
|
- QList<ctkWorkflowStep*> forwardSteps(ctkWorkflowStep* step=0)const;
|
|
|
+ Q_INVOKABLE QList<ctkWorkflowStep*> forwardSteps(ctkWorkflowStep* step=0)const;
|
|
|
|
|
|
/// Get the steps that directly preceed the given step.
|
|
|
///
|
|
@@ -155,10 +155,10 @@ public:
|
|
|
/// set to ctkWorkflow::Bidirectional or ctkWorkflow::Backward.
|
|
|
///
|
|
|
/// If no step is given, then the workflow's current step will be used.
|
|
|
- QList<ctkWorkflowStep*> backwardSteps(ctkWorkflowStep* step=0)const;
|
|
|
+ Q_INVOKABLE QList<ctkWorkflowStep*> backwardSteps(ctkWorkflowStep* step=0)const;
|
|
|
|
|
|
/// Get the steps that are 'finish' steps (i.e. have no step following them)
|
|
|
- QList<ctkWorkflowStep*> finishSteps()const;
|
|
|
+ Q_INVOKABLE QList<ctkWorkflowStep*> finishSteps()const;
|
|
|
|
|
|
public slots:
|
|
|
|