Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes
qSlicerCLIModuleWidget Class Reference

#include <Base/QTCLI/qSlicerCLIModuleWidget.h>

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

Public Types

typedef qSlicerAbstractModuleWidget Superclass
 
- Public Types inherited from qSlicerAbstractModuleRepresentation
typedef qSlicerObject Superclass
 

Public Slots

void apply (bool wait=false)
 
void cancel ()
 
void reset ()
 
void setAutoRun (bool enable)
 
void setAutoRunCancelsRunningProcess (bool enable)
 
void setAutoRunOnOtherInputEvents (bool enable)
 
void setAutoRunWhenInputModified (bool enable)
 
void setAutoRunWhenParameterChanged (bool enable)
 
void setCurrentCommandLineModuleNode (vtkMRMLNode *commandLineModuleNode)
 Set the current commandLineModuleNode. More...
 
- Public Slots inherited from qSlicerWidget
void setMRMLScene (vtkMRMLScene *scene) override
 

Public Member Functions

Q_INVOKABLE vtkMRMLCommandLineModuleNodecurrentCommandLineModuleNode () const
 Get the current commandLineModuleNode. More...
 
double nodeEditable (vtkMRMLNode *node) override
 
 qSlicerCLIModuleWidget (QWidget *parent=nullptr)
 
bool setEditedNode (vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
 
 ~qSlicerCLIModuleWidget () override
 
- Public Member Functions inherited from qSlicerAbstractModuleWidget
virtual Q_INVOKABLE void exit ()
 
bool isEntered () const
 
Q_INVOKABLE double nodeEditable (vtkMRMLNode *node) override
 
 qSlicerAbstractModuleWidget (QWidget *parent=nullptr)
 
Q_INVOKABLE bool setEditedNode (vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
 Node editing. More...
 
 ~qSlicerAbstractModuleWidget () override
 
- Public Member Functions inherited from qSlicerWidget
vtkSlicerApplicationLogicappLogic () const
 
vtkMRMLAbstractLogicmoduleLogic (const QString &moduleName) const
 
 qSlicerWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
 ~qSlicerWidget () override
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScenemrmlScene () const
 Return a pointer on the MRML scene. More...
 
 qSlicerObject ()
 
virtual void setMRMLScene (vtkMRMLScene *)
 Set the current MRML scene to the widget. More...
 
virtual ~qSlicerObject ()
 
- Public Member Functions inherited from qSlicerAbstractModuleRepresentation
qSlicerAbstractCoreModulemodule () const
 
QString moduleName () const
 Set/Get module name. More...
 
 qSlicerAbstractModuleRepresentation ()
 
 ~qSlicerAbstractModuleRepresentation () override
 

Protected Member Functions

void cancel (vtkMRMLCommandLineModuleNode *node)
 Abort the execution of the module associated with node. More...
 
void enter () override
 Set up the GUI from mrml when entering. More...
 
void run (vtkMRMLCommandLineModuleNode *parameterNode, bool waitForCompletion=false)
 
void setup () override
 
- Protected Member Functions inherited from qSlicerAbstractModuleWidget
void setup () override
 
- Protected Member Functions inherited from qSlicerAbstractModuleRepresentation
vtkMRMLAbstractLogiclogic () const
 

Protected Attributes

QScopedPointer< qSlicerCLIModuleWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerAbstractModuleWidget
QScopedPointer< qSlicerAbstractModuleWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerWidget
QScopedPointer< qSlicerWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerAbstractModuleRepresentation
QScopedPointer< qSlicerAbstractModuleRepresentationPrivate > d_ptr
 

Additional Inherited Members

- Properties inherited from qSlicerAbstractModuleWidget
bool isEntered
 
- Signals inherited from qSlicerWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Detailed Description

Definition at line 38 of file qSlicerCLIModuleWidget.h.

Member Typedef Documentation

◆ Superclass

Definition at line 44 of file qSlicerCLIModuleWidget.h.

Constructor & Destructor Documentation

◆ qSlicerCLIModuleWidget()

qSlicerCLIModuleWidget::qSlicerCLIModuleWidget ( QWidget *  parent = nullptr)

◆ ~qSlicerCLIModuleWidget()

qSlicerCLIModuleWidget::~qSlicerCLIModuleWidget ( )
override

Member Function Documentation

◆ apply

void qSlicerCLIModuleWidget::apply ( bool  wait = false)
slot

◆ cancel [1/2]

void qSlicerCLIModuleWidget::cancel ( )
slot

◆ cancel() [2/2]

void qSlicerCLIModuleWidget::cancel ( vtkMRMLCommandLineModuleNode node)
protected

Abort the execution of the module associated with node.

◆ currentCommandLineModuleNode()

Q_INVOKABLE vtkMRMLCommandLineModuleNode* qSlicerCLIModuleWidget::currentCommandLineModuleNode ( ) const

Get the current commandLineModuleNode.

◆ enter()

void qSlicerCLIModuleWidget::enter ( )
overrideprotectedvirtual

Set up the GUI from mrml when entering.

Reimplemented from qSlicerAbstractModuleWidget.

◆ nodeEditable()

double qSlicerCLIModuleWidget::nodeEditable ( vtkMRMLNode node)
overridevirtual

Returns a confidence value (between 0.0 and 1.0) that defines how much this widget is suitable for editing the provided node. In general value of 0.5 should be used. If the returned value is 0 then it means the node should not be attempted to set as edited node. This node has to be overridden in child classes that want to use a non-default confidence value (for example, they look into the node contents and decide based on that if the node belongs to this module).

Reimplemented from qSlicerAbstractModuleRepresentation.

◆ reset

void qSlicerCLIModuleWidget::reset ( )
slot

◆ run()

void qSlicerCLIModuleWidget::run ( vtkMRMLCommandLineModuleNode parameterNode,
bool  waitForCompletion = false 
)
protected

Run a command line module given parameterNode If waitForCompletion is True, the call will return only upon completion of the module execution.

◆ setAutoRun

void qSlicerCLIModuleWidget::setAutoRun ( bool  enable)
slot

◆ setAutoRunCancelsRunningProcess

void qSlicerCLIModuleWidget::setAutoRunCancelsRunningProcess ( bool  enable)
slot

◆ setAutoRunOnOtherInputEvents

void qSlicerCLIModuleWidget::setAutoRunOnOtherInputEvents ( bool  enable)
slot

◆ setAutoRunWhenInputModified

void qSlicerCLIModuleWidget::setAutoRunWhenInputModified ( bool  enable)
slot

◆ setAutoRunWhenParameterChanged

void qSlicerCLIModuleWidget::setAutoRunWhenParameterChanged ( bool  enable)
slot

◆ setCurrentCommandLineModuleNode

void qSlicerCLIModuleWidget::setCurrentCommandLineModuleNode ( vtkMRMLNode commandLineModuleNode)
slot

Set the current commandLineModuleNode.

◆ setEditedNode()

bool qSlicerCLIModuleWidget::setEditedNode ( vtkMRMLNode node,
QString  role = QString(),
QString  context = QString() 
)
overridevirtual

Allows other modules to select input and output nodes in the module's GUI. There may be multiple node selectors in a module widget, you can select between them using the role argument. Context can be specified to make a selection within that node (for example, a markup list node may contain multiple markups; context can be used to select a specific item). Returns true if the selection was successful. This node has to be overridden in child classes that support editing certain node types. Preferably each module that defines a new MRML node class should also make sure there is a module widget that can edit that node. If setEditedNode method is overridden then nodeEditable method can be overridden to specify a non-default confidence value that the module can handle a specific node instance.

Reimplemented from qSlicerAbstractModuleRepresentation.

◆ setup()

void qSlicerCLIModuleWidget::setup ( )
overrideprotectedvirtual

All initialization code (typically setupUi()) must be done in setup() The module and the logic are accessible.

Implements qSlicerAbstractModuleRepresentation.

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerCLIModuleWidgetPrivate> qSlicerCLIModuleWidget::d_ptr
protected

Definition at line 83 of file qSlicerCLIModuleWidget.h.


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