#include <qSlicerAbstractModule.h>
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.
Reimplemented in qSlicerAbstractCoreModule, qSlicerAbstractLoadableModule, qSlicerCLILoadableModule, qSlicerCLIModule, qSlicerCamerasModule, qSlicerTransformsModule, qSlicerMeasurementsModule, qSlicermiAnnotationModule, qSlicerWelcomeModule, qSlicerTractographyFiducialSeedingModule, and qSlicerVolumesModule.
| qSlicerAbstractModule::qSlicerAbstractModule | ( | QObject * | parent = 0 |
) |
Constructor Warning: If there is no parent given, make sure you delete the object.
| 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] |
Create and return a widget representation for the module.
Implemented in qSlicerCLIModule, qSlicerCamerasModule, qSlicerTransformsModule, qSlicerMeasurementsModule, qSlicermiAnnotationModule, qSlicerWelcomeModule, qSlicerTractographyFiducialSeedingModule, and qSlicerVolumesModule.
Referenced by widgetRepresentation().
| 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] |
Set/Get the name of the module (must be unique)
Referenced by qSlicerModulePanel::addModule(), qSlicerMainWindowCorePrivate::onModuleLoaded(), qSlicerModulePanel::removeModule(), qSlicerModulePanel::setModule(), and widgetRepresentation().
| 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] |
Referenced by qSlicerModuleFactoryManagerPrivate::instantiateModule().
| 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] |
Convenient method to return slicer wiki URL
Referenced by qSlicerCamerasModule::acknowledgementText(), qSlicerTractographyFiducialSeedingModule::helpText(), and qSlicerTransformsModule::helpText().
| virtual QString qSlicerAbstractModule::title | ( | ) | const [pure virtual] |
Title of the module, (displayed to the user)
Implemented in qSlicerCLIModule, and qSlicerTractographyFiducialSeedingModule.
Referenced by qSlicerModuleFactoryManagerPrivate::instantiateModule(), qSlicerMainWindowCorePrivate::onModuleLoaded(), qSlicerModuleFactoryTest1(), and widgetRepresentation().
| qSlicerAbstractModuleWidget * qSlicerAbstractModule::widgetRepresentation | ( | ) |
This method allows to get a pointer to the WidgetRepresentation. If no WidgetRepresentation already exists, one will be created calling 'createWidgetRepresentation' method.
References createWidgetRepresentation(), autoSlicerTracto2regions::d, logic(), mrmlScene(), name(), QCTK_D, and title().
Referenced by qSlicerModulePanel::addModule(), qSlicerMainWindowCorePrivate::onModuleAboutToBeUnloaded(), qSlicerMainWindowCorePrivate::onModuleLoaded(), qSlicerTransformsModuleTest1(), qSlicerModulePanel::removeModule(), qSlicerModulePanel::setModule(), and qSlicerBaseQTBasePythonQtDecorators::widgetRepresentation().
bool qSlicerAbstractModule::Initialized [private] |
Indicate if the module has already been initialized
QString qSlicerAbstractModule::Category [read] |
QString qSlicerAbstractModule::Contributor [read] |
QString qSlicerAbstractModule::Name [read] |
QString qSlicerAbstractModule::Title [read] |
1.6.1