qSlicerAbstractModule Class Reference

#include <qSlicerAbstractModule.h>

Inheritance diagram for qSlicerAbstractModule:
QObject qSlicerAbstractCoreModule qSlicerAbstractLoadableModule qSlicerCLIModule qSlicerCamerasModule qSlicerTransformsModule qSlicerMeasurementsModule qSlicermiAnnotationModule qSlicerTractographyFiducialSeedingModule qSlicerVolumesModule qSlicerWelcomeModule qSlicerCLILoadableModule

List of all members.

Public Types

typedef QObject Superclass

Public Slots

virtual void setEnabled (bool enabled)
virtual void setMRMLScene (vtkMRMLScene *)

Public Member Functions

virtual QString acknowledgementText () const
vtkSlicerApplicationLogicappLogic () const
virtual QString category () const
virtual QString contributor () const
virtual QString helpText () const
void initialize (vtkSlicerApplicationLogic *appLogic)
bool initialized ()
bool isEnabled () const
vtkSlicerLogiclogic ()
vtkMRMLScenemrmlScene () const
virtual QString name () const
virtual void printAdditionalInfo ()
 qSlicerAbstractModule (QObject *parent=0)
void setAppLogic (vtkSlicerApplicationLogic *appLogic)
virtual void setName (const QString &name)
QString slicerWikiUrl () const
virtual QString title () const =0
qSlicerAbstractModuleWidgetwidgetRepresentation ()

Protected Member Functions

virtual vtkSlicerLogiccreateLogic ()=0
virtual
qSlicerAbstractModuleWidget
createWidgetRepresentation ()=0
virtual void setup ()=0

Properties

QString Category
QString Contributor
QString Name
QString Title

Private Member Functions

 QCTK_DECLARE_PRIVATE (qSlicerAbstractModule)

Private Attributes

bool Initialized

Detailed Description

qSlicerAbstractModule is the base class of any module in Slicer. Core modules, Loadable modules, CLI modules derive from it. It is responsible to create the UI and the Logic: createWidgetRepresentation() and createLogic() must be reimplemented in derived classes. A Slicer module has a name and a title: The name is its UID, the title displayed to the user. When a MRML scene is set to the module, the module set the scene to the UI widget and the logic.


Member Typedef Documentation


Constructor & Destructor Documentation

qSlicerAbstractModule::qSlicerAbstractModule ( QObject parent = 0  ) 

Constructor Warning: If there is no parent given, make sure you delete the object.


Member Function Documentation

QString qSlicerAbstractModule::acknowledgementText (  )  const [virtual]
vtkSlicerApplicationLogic* qSlicerAbstractModule::appLogic (  )  const
QString qSlicerAbstractModule::category (  )  const [virtual]

Reimplemented in qSlicerCLIModule.

QString qSlicerAbstractModule::contributor (  )  const [virtual]

Reimplemented in qSlicerCLIModule.

virtual vtkSlicerLogic* qSlicerAbstractModule::createLogic (  )  [protected, pure virtual]

Create and return the module logic Note: Only one instance of the logic will exist per module

Implemented in qSlicerCLIModule, qSlicerCamerasModule, qSlicerTransformsModule, qSlicerMeasurementsModule, qSlicermiAnnotationModule, qSlicerWelcomeModule, qSlicerTractographyFiducialSeedingModule, and qSlicerVolumesModule.

Referenced by logic().

virtual qSlicerAbstractModuleWidget* qSlicerAbstractModule::createWidgetRepresentation (  )  [protected, pure virtual]
QString qSlicerAbstractModule::helpText (  )  const [virtual]

Return help/acknowledgement text These functions must be reimplemented in the derived classes

Reimplemented in qSlicerAbstractLoadableModule, qSlicerCLIModule, qSlicerCamerasModule, qSlicerTransformsModule, and qSlicerTractographyFiducialSeedingModule.

Referenced by qSlicerModulePanel::addModule().

void qSlicerAbstractModule::initialize ( vtkSlicerApplicationLogic appLogic  ) 

Initialize the module, an appLogic must be given to initialize the module

References logic(), setAppLogic(), and setup().

Referenced by qSlicerModuleManager::loadModule(), and qSlicerTransformsModuleTest1().

bool qSlicerAbstractModule::initialized (  )  [inline]
bool qSlicerAbstractModule::isEnabled (  )  const

Returns true if the module is enabled. By default, a module is disabled

vtkSlicerLogic * qSlicerAbstractModule::logic (  ) 

This method allows to get a pointer to the ModuleLogic. If no moduleLogic already exists, one will be created calling 'createLogic' method.

References createLogic(), autoSlicerTracto2regions::d, mrmlScene(), and QCTK_D.

Referenced by initialize(), qSlicerTransformsModuleTest1(), setAppLogic(), qSlicerCLIModule::setup(), and widgetRepresentation().

vtkMRMLScene* qSlicerAbstractModule::mrmlScene (  )  const

Return a pointer on the MRML scene

Referenced by logic(), and widgetRepresentation().

QString qSlicerAbstractModule::name (  )  const [virtual]
void qSlicerAbstractModule::printAdditionalInfo (  )  [virtual]
qSlicerAbstractModule::QCTK_DECLARE_PRIVATE ( qSlicerAbstractModule   )  [private]
void qSlicerAbstractModule::setAppLogic ( vtkSlicerApplicationLogic appLogic  ) 

Get/Set the application logic. It must be set.

References autoSlicerTracto2regions::d, logic(), and QCTK_D.

Referenced by initialize().

virtual void qSlicerAbstractModule::setEnabled ( bool  enabled  )  [virtual, slot]

Enable/Disable the module

void qSlicerAbstractModule::setMRMLScene ( vtkMRMLScene _mrmlScene  )  [virtual, slot]

Set the current MRML scene to the widget

References autoSlicerTracto2regions::d, and QCTK_D.

Referenced by qSlicerModuleManager::loadModule().

void qSlicerAbstractModule::setName ( const QString name  )  [virtual]
virtual void qSlicerAbstractModule::setup (  )  [protected, pure virtual]

All initialization code should be done in the setup

Implemented in qSlicerAbstractCoreModule, qSlicerAbstractLoadableModule, qSlicerCLILoadableModule, and qSlicerCLIModule.

Referenced by initialize().

QString qSlicerAbstractModule::slicerWikiUrl (  )  const [inline]
virtual QString qSlicerAbstractModule::title (  )  const [pure virtual]
qSlicerAbstractModuleWidget * qSlicerAbstractModule::widgetRepresentation (  ) 

Member Data Documentation

Indicate if the module has already been initialized


Property Documentation

QString qSlicerAbstractModule::Category [read]
QString qSlicerAbstractModule::Contributor [read]
QString qSlicerAbstractModule::Name [read]

Any object deriving from QObject must have the Q_OBJECT macro in order to have the signal/slots working and the meta-class name valid. The following property will be added to the meta-class and will also be available through PythonQt

QString qSlicerAbstractModule::Title [read]

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1