ctkWorkflowStep is the basis for a workflow step.
More...
#include <Libs/Core/ctkWorkflowStep.h>
|
QScopedPointer< ctkWorkflowStepPrivate > | d_ptr |
|
ctkWorkflowStep is the basis for a workflow step.
A workflow step is a placeholder for various states and transitions that are used in a typical workflow. Such steps can be added to instances of the ctkWorkflow class.
Definition at line 45 of file ctkWorkflowStep.h.
◆ ctkWorkflowStep() [1/3]
ctkWorkflowStep::ctkWorkflowStep |
( |
| ) |
|
|
explicit |
◆ ctkWorkflowStep() [2/3]
ctkWorkflowStep::ctkWorkflowStep |
( |
const QString & |
newId | ) |
|
|
explicit |
◆ ~ctkWorkflowStep()
virtual ctkWorkflowStep::~ctkWorkflowStep |
( |
| ) |
|
|
virtual |
◆ ctkWorkflowStep() [3/3]
ctkWorkflowStep::ctkWorkflowStep |
( |
ctkWorkflowStepPrivate * |
pimpl, |
|
|
const QString & |
newId |
|
) |
| |
|
explicitprotected |
◆ ctkWorkflowStepQObject()
QObject* ctkWorkflowStep::ctkWorkflowStepQObject |
( |
| ) |
|
Get QObject associated with this step, to connect signals/slots.
◆ description()
QString ctkWorkflowStep::description |
( |
| ) |
const |
◆ hasOnEntryCommand()
bool ctkWorkflowStep::hasOnEntryCommand |
( |
| ) |
const |
Set/get whether an onEntryCommand has been provided in a separate QObject
- Note
- See method2 in onEntry()
- See also
- onEntry()
◆ hasOnExitCommand()
bool ctkWorkflowStep::hasOnExitCommand |
( |
| ) |
const |
Set/get whether an onExitCommand has been provided in a separate QObject
- Note
- See method2 in onExit()
- See also
- onExit()
◆ hasValidateCommand()
bool ctkWorkflowStep::hasValidateCommand |
( |
| ) |
const |
Set/get whether a validationCommand has been provided in a separate QObject
- Note
- see method 2 described for validation()
- See also
- validation()
◆ id()
QString ctkWorkflowStep::id |
( |
| ) |
const |
◆ invokeOnEntryCommand()
Signal (emitted by the private implementation) indicating that the step's 'onEntry' processing should be performed.
- See also
- onEntry()
◆ invokeOnExitCommand()
Signal (emitted by the private implementation) indicating that the step's 'onExit' processing should be performed.
- See also
- onExit()
◆ invokeValidateCommand()
void ctkWorkflowStep::invokeValidateCommand |
( |
const QString & |
desiredBranchId = QString() | ) |
const |
|
protected |
Signal (emitted by the private implementation) indicating that validation of this step's processing should be performed.
- See also
- validation()
◆ isWidgetType()
bool ctkWorkflowStep::isWidgetType |
( |
| ) |
const |
Returns true if the object is a widget; otherwise returns false.
◆ name()
QString ctkWorkflowStep::name |
( |
| ) |
const |
◆ onEntry()
Reimplement this function for step-specific processing when entering a step.
To define a custom step, developers can either reimplement the onEntry() method in a subclass of ctkWorkflowStep, or create a ctkWorkflowStep instance and use signals and slots, as similarly as described for validate().
Each step should be self-contained, comingFrom and transitionType may be used only to decide on how processing should be done for the current step.
- Parameters
-
comingFrom | gives the step that the state machine was in before transitioning to this step. |
transitionType | gives the type of the transition used to get to this step. |
◆ onEntryComplete()
void ctkWorkflowStep::onEntryComplete |
( |
| ) |
const |
|
protected |
Signal (emitted by the private implementation) indicating that the step's 'onEntry' processing has completed.
- See also
- onEntry()
◆ onExit()
Reimplement this function for step-specific processing when exiting a step.
To define a custom step, developers can either reimplement the onExit() method in a subclass of ctkWorkflowStep, or create a ctkWorkflowStep instance and use signals and slots, similarly as described for validate().
Each step should be self-contained, goingTo and transitionType may be used only to decide on how processing should be done for the current step.
- Parameters
-
goingTo | gives the step that the state machine will go to after transitioning from this step. |
transitionType | gives the type of the transition used to get to this step. |
◆ onExitComplete()
void ctkWorkflowStep::onExitComplete |
( |
| ) |
const |
|
protected |
Signal (emitted by the private implementation) indicating that the step's 'onExit' processing has completed.
- See also
- onExit()
◆ processingState()
QState* ctkWorkflowStep::processingState |
( |
| ) |
const |
|
protected |
Get the step's processing state.
This state is used to perform the processing associated with this step.
◆ setDescription()
void ctkWorkflowStep::setDescription |
( |
const QString & |
newDescription | ) |
|
◆ setHasOnEntryCommand()
void ctkWorkflowStep::setHasOnEntryCommand |
( |
bool |
newHasOnEntryCommand | ) |
|
◆ setHasOnExitCommand()
void ctkWorkflowStep::setHasOnExitCommand |
( |
bool |
newHasOnExitCommand | ) |
|
◆ setHasValidateCommand()
void ctkWorkflowStep::setHasValidateCommand |
( |
bool |
newHasValidateCommand | ) |
|
◆ setId()
void ctkWorkflowStep::setId |
( |
const QString & |
newStepId | ) |
|
Set step Id
- Note
- Setting the Id after the step had been added to a workflow is a no-op
◆ setName()
void ctkWorkflowStep::setName |
( |
const QString & |
newName | ) |
|
◆ setStatusText()
void ctkWorkflowStep::setStatusText |
( |
const QString & |
newText | ) |
|
|
protected |
◆ setWorkflow()
void ctkWorkflowStep::setWorkflow |
( |
ctkWorkflow * |
newWorkflow | ) |
|
|
protected |
◆ statusText()
QString ctkWorkflowStep::statusText |
( |
| ) |
const |
◆ validate()
virtual void ctkWorkflowStep::validate |
( |
const QString & |
desiredBranchId = QString() | ) |
|
|
protectedvirtual |
Validates the computation performed in this step's processing state.
When creating a custom step, developers can create a validate(const QString&) method is one of two ways: 1) Reimplement the validate(const QString&) method in a subclass of ctkWorkflowStep, following these instructions:
-
invoke the superclass method ctkWorkflowStep::validateComplete(bool, const QString&) (true on successful validation, false on failure; the QString is the desired branchId to use with branching workflows)
OR:
2) Create an instance of a ctkWorkflowStep then:
-
Call setHasValidateCommand(1) on the step
-
Create a slot foo() associated with any QObject*, following these instructions:
-
Set the following connection:
-
QObject::connect(step, SIGNAL(invokeValidateCommand(const QString&)), object, SLOT(foo(const QString&)))
◆ validationComplete()
void ctkWorkflowStep::validationComplete |
( |
bool |
validationSuceeded, |
|
|
const QString & |
branchId = QString() |
|
) |
| const |
|
protected |
Signal (emitted by the private implementation) indicating that validation of this step's processing has completed.
- See also
- validation()
◆ validationFailedTransition()
Get the step's validation failed transition.
The validationFailed transition is used to bring the state machine from the step's validationState state back to its processingState, when validation of the processing step fails (i.e. validate(const QString&) returns false).
More specifically:
-
its origin state is the validatationState state
-
its destination state is the processingState state
The transition is of type ctkWorkflowTransition with the value ctkWorkflowTransitionType::ValidationFailedTransition.
◆ validationState()
QState* ctkWorkflowStep::validationState |
( |
| ) |
const |
|
protected |
Get the step's validation state.
This state is used to validate the processing associated with this step.
◆ validationTransition()
Get the step's validation transition.
The validation transition is used to bring the state machine from the step's processingState to its validationState. More specifically:
-
its origin state is the processingState state
-
its destination state is the validationState state
The transition is of type ctkWorkflowTransition with the value ctkWorkflowTransitionType::ValidationTransition.
◆ workflow()
Get the workflow associated with this step.
◆ ctkWorkflow
◆ ctkWorkflowPrivate
friend class ctkWorkflowPrivate |
|
friend |
◆ d_ptr
QScopedPointer<ctkWorkflowStepPrivate> ctkWorkflowStep::d_ptr |
|
protected |
The documentation for this class was generated from the following file: