CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Member Functions | Protected Member Functions | Properties | Friends | List of all members
ctkWorkflowWidgetStep Class Reference

ctkWorkflowWidgetStep is a convienience class to quickly construct a ctkWorkflowStep with a user interface. More...

#include <Libs/Widgets/ctkWorkflowWidgetStep.h>

Inheritance diagram for ctkWorkflowWidgetStep:
Inheritance graph
[legend]
Collaboration diagram for ctkWorkflowWidgetStep:
Collaboration graph
[legend]

Public Types

enum  ButtonBoxHint {
  NoHints = 0x0 , BackButtonHidden = 0x1 , BackButtonDisabled = 0x2 , NextButtonHidden = 0x4 ,
  NextButtonDisabled = 0x8 , ButtonBoxHidden = 0x10
}
 

Public Member Functions

virtual QString backButtonText () const
 Override the back button text of any ctkWorkflowButtonBox when this step is the current step. More...
 
ButtonBoxHints buttonBoxHints () const
 
 ctkWorkflowWidgetStep (const QString &newId, QWidget *newParent=0)
 
 ctkWorkflowWidgetStep (QWidget *newParent=0)
 
virtual bool hasCreateUserInterfaceCommand () const
 
virtual bool hasShowUserInterfaceCommand () const
 
QIcon icon () const
 Associate an icon with this step (ex. used by ctkWorkflowButtonBox to display an icon on 'goTo' buttons). More...
 
virtual QString nextButtonText () const
 Override the next button text of any ctkWorkflowButtonBox when this step is the current step. More...
 
virtual void setBackButtonText (const QString &name)
 
void setButtonBoxHints (ButtonBoxHints buttonBoxHints)
 Override the button visibility of any ctkWorkflowButtonBox when this step is the current step. More...
 
virtual void setHasCreateUserInterfaceCommand (bool flag)
 
virtual void setHasShowUserInterfaceCommand (bool flag)
 
void setIcon (const QIcon &newIcon)
 
virtual void setNextButtonText (const QString &name)
 
virtual QWidget * stepArea ()
 Returns the QWidget onto which this step's user interface elements are placed. More...
 
virtual ~ctkWorkflowWidgetStep ()
 
- Public Member Functions inherited from ctkWorkflowStep
 ctkWorkflowStep ()
 
 ctkWorkflowStep (const QString &newId)
 
QObject * ctkWorkflowStepQObject ()
 Get QObject associated with this step, to connect signals/slots. More...
 
QString description () const
 Set/get description. More...
 
bool hasOnEntryCommand () const
 
bool hasOnExitCommand () const
 
bool hasValidateCommand () const
 
QString id () const
 Get id. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
QString name () const
 Set/get name. More...
 
void setDescription (const QString &newDescription)
 
void setHasOnEntryCommand (bool newHasOnEntryCommand)
 
void setHasOnExitCommand (bool newHasOnExitCommand)
 
void setHasValidateCommand (bool newHasValidateCommand)
 
void setId (const QString &newStepId)
 
void setName (const QString &newName)
 
QString statusText () const
 Get statusText. More...
 
ctkWorkflowworkflow () const
 Get the workflow associated with this step. More...
 
virtual ~ctkWorkflowStep ()
 

Protected Member Functions

virtual void createUserInterface ()
 Creates the user interface associated with this step. More...
 
void createUserInterfaceComplete () const
 Signal (emitted by the private implementation) indicating that the step's createUserInterface() method has completed. More...
 
void invokeCreateUserInterfaceCommand () const
 Signal (emitted by the private implementation) indicating that the step's createUserInterface() method should be called. More...
 
void invokeShowUserInterfaceCommand () const
 Signal (emitted by the private implementation) indicating that the step's 'showUserInterface() method should be called. More...
 
virtual void showUserInterface ()
 Prepares the step to be shown. More...
 
void showUserInterfaceComplete () const
 Signal (emitted by the private implementation) indicating that the step's showUserInterface() method has completed. More...
 
- Protected Member Functions inherited from ctkWorkflowStep
 ctkWorkflowStep (ctkWorkflowStepPrivate *pimpl, const QString &newId)
 
void invokeOnEntryCommand (const ctkWorkflowStep *comingFrom, const ctkWorkflowInterstepTransition::InterstepTransitionType transitionType) const
 Signal (emitted by the private implementation) indicating that the step's 'onEntry' processing should be performed. More...
 
void invokeOnExitCommand (const ctkWorkflowStep *goingTo, const ctkWorkflowInterstepTransition::InterstepTransitionType transitionType) const
 Signal (emitted by the private implementation) indicating that the step's 'onExit' processing should be performed. More...
 
void invokeValidateCommand (const QString &desiredBranchId=QString()) const
 Signal (emitted by the private implementation) indicating that validation of this step's processing should be performed. More...
 
virtual void onEntry (const ctkWorkflowStep *comingFrom, const ctkWorkflowInterstepTransition::InterstepTransitionType transitionType)
 Reimplement this function for step-specific processing when entering a step. More...
 
void onEntryComplete () const
 Signal (emitted by the private implementation) indicating that the step's 'onEntry' processing has completed. More...
 
virtual void onExit (const ctkWorkflowStep *goingTo, const ctkWorkflowInterstepTransition::InterstepTransitionType transitionType)
 Reimplement this function for step-specific processing when exiting a step. More...
 
void onExitComplete () const
 Signal (emitted by the private implementation) indicating that the step's 'onExit' processing has completed. More...
 
QState * processingState () const
 Get the step's processing state. More...
 
void setStatusText (const QString &newText)
 
void setWorkflow (ctkWorkflow *newWorkflow)
 Set workflow. More...
 
virtual void validate (const QString &desiredBranchId=QString())
 Validates the computation performed in this step's processing state. More...
 
void validationComplete (bool validationSuceeded, const QString &branchId=QString()) const
 Signal (emitted by the private implementation) indicating that validation of this step's processing has completed. More...
 
ctkWorkflowIntrastepTransitionvalidationFailedTransition () const
 Get the step's validation failed transition. More...
 
QState * validationState () const
 Get the step's validation state. More...
 
ctkWorkflowIntrastepTransitionvalidationTransition () const
 Get the step's validation transition. More...
 

Properties

QString backButtonText
 
ButtonBoxHints buttonBoxHints
 
QString description
 
QIcon icon
 
QString name
 
QString nextButtonText
 
QString statusText
 
QString stepid
 

Friends

class ctkWorkflowGroupBox
 
class ctkWorkflowWidgetStepPrivate
 

Additional Inherited Members

- Protected Attributes inherited from ctkWorkflowStep
QScopedPointer< ctkWorkflowStepPrivate > d_ptr
 

Detailed Description

ctkWorkflowWidgetStep is a convienience class to quickly construct a ctkWorkflowStep with a user interface.

It embeds a QWidget* stepArea, onto which step-specific widgets can be placed. The showUserInterface() and hideUserInterface() commands of ctkWorkflowStep are written for you, and, if you desire, the step's "Next" and/or "Back" buttons are added with the appropriate signals and slots. To create a custom step, you can derive from this class and implement only two functions: 1) ctkWorkflowWidgetStep::populateStepWidgetsList(), to define the step-specific widgets; 2) ctkWorkflowWidgetStep::validate(const QString&), to validate the processing state associated with this step. For additional customization, you can reimplement showUserInterface() and hideUserInterface() in derived classes.

See also
showUserInterface() hideUserInterface()

Definition at line 59 of file ctkWorkflowWidgetStep.h.

Member Enumeration Documentation

◆ ButtonBoxHint

Enumerator
NoHints 
BackButtonHidden 
BackButtonDisabled 
NextButtonHidden 
NextButtonDisabled 
ButtonBoxHidden 

Definition at line 74 of file ctkWorkflowWidgetStep.h.

Constructor & Destructor Documentation

◆ ctkWorkflowWidgetStep() [1/2]

ctkWorkflowWidgetStep::ctkWorkflowWidgetStep ( QWidget *  newParent = 0)
explicit

◆ ctkWorkflowWidgetStep() [2/2]

ctkWorkflowWidgetStep::ctkWorkflowWidgetStep ( const QString &  newId,
QWidget *  newParent = 0 
)
explicit

◆ ~ctkWorkflowWidgetStep()

virtual ctkWorkflowWidgetStep::~ctkWorkflowWidgetStep ( )
virtual

Member Function Documentation

◆ backButtonText()

virtual QString ctkWorkflowWidgetStep::backButtonText ( ) const
virtual

Override the back button text of any ctkWorkflowButtonBox when this step is the current step.

◆ buttonBoxHints()

ButtonBoxHints ctkWorkflowWidgetStep::buttonBoxHints ( ) const

◆ createUserInterface()

virtual void ctkWorkflowWidgetStep::createUserInterface ( )
inlineprotectedvirtual

Creates the user interface associated with this step.

Definition at line 126 of file ctkWorkflowWidgetStep.h.

◆ createUserInterfaceComplete()

void ctkWorkflowWidgetStep::createUserInterfaceComplete ( ) const
protected

Signal (emitted by the private implementation) indicating that the step's createUserInterface() method has completed.

See also
createUserInterface()

◆ hasCreateUserInterfaceCommand()

virtual bool ctkWorkflowWidgetStep::hasCreateUserInterfaceCommand ( ) const
virtual

Set/get whether a createUserInterfaceCommand has been provided in a separate QObject (see method 2 described for createUserInterface())

◆ hasShowUserInterfaceCommand()

virtual bool ctkWorkflowWidgetStep::hasShowUserInterfaceCommand ( ) const
virtual

Set/get whether a showUserInterfaceCommand has been provided in a separate QObject (see method 2 described for showUserInterface())

◆ icon()

QIcon ctkWorkflowWidgetStep::icon ( ) const

Associate an icon with this step (ex. used by ctkWorkflowButtonBox to display an icon on 'goTo' buttons).

◆ invokeCreateUserInterfaceCommand()

void ctkWorkflowWidgetStep::invokeCreateUserInterfaceCommand ( ) const
protected

Signal (emitted by the private implementation) indicating that the step's createUserInterface() method should be called.

See also
createUserInterface()

◆ invokeShowUserInterfaceCommand()

void ctkWorkflowWidgetStep::invokeShowUserInterfaceCommand ( ) const
protected

Signal (emitted by the private implementation) indicating that the step's 'showUserInterface() method should be called.

See also
showUserInterface()

◆ nextButtonText()

virtual QString ctkWorkflowWidgetStep::nextButtonText ( ) const
virtual

Override the next button text of any ctkWorkflowButtonBox when this step is the current step.

◆ setBackButtonText()

virtual void ctkWorkflowWidgetStep::setBackButtonText ( const QString &  name)
virtual

◆ setButtonBoxHints()

void ctkWorkflowWidgetStep::setButtonBoxHints ( ButtonBoxHints  buttonBoxHints)

Override the button visibility of any ctkWorkflowButtonBox when this step is the current step.

◆ setHasCreateUserInterfaceCommand()

virtual void ctkWorkflowWidgetStep::setHasCreateUserInterfaceCommand ( bool  flag)
virtual

◆ setHasShowUserInterfaceCommand()

virtual void ctkWorkflowWidgetStep::setHasShowUserInterfaceCommand ( bool  flag)
virtual

◆ setIcon()

void ctkWorkflowWidgetStep::setIcon ( const QIcon &  newIcon)

◆ setNextButtonText()

virtual void ctkWorkflowWidgetStep::setNextButtonText ( const QString &  name)
virtual

◆ showUserInterface()

virtual void ctkWorkflowWidgetStep::showUserInterface ( )
protectedvirtual

Prepares the step to be shown.

◆ showUserInterfaceComplete()

void ctkWorkflowWidgetStep::showUserInterfaceComplete ( ) const
protected

Signal (emitted by the private implementation) indicating that the step's showUserInterface() method has completed.

See also
showUserInterface()

◆ stepArea()

virtual QWidget* ctkWorkflowWidgetStep::stepArea ( )
virtual

Returns the QWidget onto which this step's user interface elements are placed.

Friends And Related Function Documentation

◆ ctkWorkflowGroupBox

friend class ctkWorkflowGroupBox
friend

Definition at line 161 of file ctkWorkflowWidgetStep.h.

◆ ctkWorkflowWidgetStepPrivate

friend class ctkWorkflowWidgetStepPrivate
friend

Definition at line 158 of file ctkWorkflowWidgetStep.h.

Property Documentation

◆ backButtonText

QString ctkWorkflowWidgetStep::backButtonText
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ buttonBoxHints

ButtonBoxHints ctkWorkflowWidgetStep::buttonBoxHints
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ description

QString ctkWorkflowWidgetStep::description
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ icon

QIcon ctkWorkflowWidgetStep::icon
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ name

QString ctkWorkflowWidgetStep::name
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ nextButtonText

QString ctkWorkflowWidgetStep::nextButtonText
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ statusText

QString ctkWorkflowWidgetStep::statusText
read

Definition at line 1 of file ctkWorkflowWidgetStep.h.

◆ stepid

QString ctkWorkflowWidgetStep::stepid
readwrite

Definition at line 1 of file ctkWorkflowWidgetStep.h.


The documentation for this class was generated from the following file: