Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qSlicerAbstractModuleRepresentation Class Referenceabstract

#include <Base/QTCore/qSlicerAbstractModuleRepresentation.h>

Inheritance diagram for qSlicerAbstractModuleRepresentation:
Collaboration diagram for qSlicerAbstractModuleRepresentation:

Public Types

typedef qSlicerObject Superclass
 

Public Member Functions

qSlicerAbstractCoreModulemodule () const
 
QString moduleName () const
 Set/Get module name.
 
virtual double nodeEditable (vtkMRMLNode *node)
 
 qSlicerAbstractModuleRepresentation ()
 
virtual bool setEditedNode (vtkMRMLNode *node, QString role=QString(), QString context=QString())
 Select input or output nodes in the module's GUI.
 
 ~qSlicerAbstractModuleRepresentation () override
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScenemrmlScene () const
 Return a pointer on the MRML scene.
 
 qSlicerObject ()
 
virtual void setMRMLScene (vtkMRMLScene *)
 Set the current MRML scene to the widget.
 
virtual ~qSlicerObject ()
 

Protected Member Functions

vtkMRMLAbstractLogiclogic () const
 
virtual void setup ()=0
 

Protected Attributes

QScopedPointer< qSlicerAbstractModuleRepresentationPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 

Friends

class qSlicerAbstractCoreModule
 

Detailed Description

Definition at line 42 of file qSlicerAbstractModuleRepresentation.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ qSlicerAbstractModuleRepresentation()

qSlicerAbstractModuleRepresentation::qSlicerAbstractModuleRepresentation ( )

◆ ~qSlicerAbstractModuleRepresentation()

qSlicerAbstractModuleRepresentation::~qSlicerAbstractModuleRepresentation ( )
override

Member Function Documentation

◆ logic()

vtkMRMLAbstractLogic * qSlicerAbstractModuleRepresentation::logic ( ) const
protected

Return the logic of the module The logic is available (not null) when setup() is called. So you can't access it in the constructor of your module widget.

◆ module()

qSlicerAbstractCoreModule * qSlicerAbstractModuleRepresentation::module ( ) const

Returns the module the representation belongs to. The module is set right before setup() is called.

◆ moduleName()

QString qSlicerAbstractModuleRepresentation::moduleName ( ) const

Set/Get module name.

◆ nodeEditable()

virtual double qSlicerAbstractModuleRepresentation::nodeEditable ( vtkMRMLNode * node)
virtual

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).

See also
setEditedNode

Reimplemented in qSlicerAbstractModuleWidget, qSlicerCLIModuleWidget, qSlicerMarkupsModuleWidget, qSlicerScriptedLoadableModuleWidget, and qSlicerVolumeRenderingModuleWidget.

◆ setEditedNode()

virtual bool qSlicerAbstractModuleRepresentation::setEditedNode ( vtkMRMLNode * node,
QString role = QString(),
QString context = QString() )
virtual

Select input or output nodes in the module's GUI.

Parameters
nodeThe node to be selected.
roleSpecifies the intended usage of the selected node.
contextcan 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 function is intended only for use in modules that support editing certain types of nodes. The available roles and associated context description are specific to each module.

To enable editing of specific node types, the module must override the qSlicerAbstractCoreModule::associatedNodeTypes() method and the module's widget class should override setEditedNode() method.

Optionally the nodeEditable() method can be overridden to specify a non-default confidence value. The confidence value should be specified as a decimal number between 0.0 and 1.0.

See also
nodeEditable, qSlicerAbstractCoreModule::associatedNodeTypes

Reimplemented in qSlicerAbstractModuleWidget, qSlicerCamerasModuleWidget, qSlicerCLIModuleWidget, qSlicerColorsModuleWidget, qSlicerCropVolumeModuleWidget, qSlicerMarkupsModuleWidget, qSlicerModelsModuleWidget, qSlicerPlotsModuleWidget, qSlicerReformatModuleWidget, qSlicerSceneViewsModuleWidget, qSlicerScriptedLoadableModuleWidget, qSlicerSegmentationsModuleWidget, qSlicerSequencesModuleWidget, qSlicerTablesModuleWidget, qSlicerTextsModuleWidget, qSlicerTransformsModuleWidget, qSlicerVolumeRenderingModuleWidget, and qSlicerVolumesModuleWidget.

◆ setup()

Friends And Related Symbol Documentation

◆ qSlicerAbstractCoreModule

friend class qSlicerAbstractCoreModule
friend

Give access to qSlicerAbstractModule to the method qSlicerAbstractModuleRepresentation::setModule

Definition at line 108 of file qSlicerAbstractModuleRepresentation.h.

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerAbstractModuleRepresentationPrivate> qSlicerAbstractModuleRepresentation::d_ptr
protected

Definition at line 100 of file qSlicerAbstractModuleRepresentation.h.


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