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
qSlicerCLIModule.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qSlicerCLIModule_h
22#define __qSlicerCLIModule_h
23
24// CTK includes
25#include <ctkPimpl.h>
26
27// Slicer includes
29
30// SlicerExecutionModel includes
31#include <ModuleDescription.h>
32
33#include "qSlicerBaseQTCLIExport.h"
34
35class ModuleLogo;
38
39class qSlicerCLIModulePrivate;
40class Q_SLICER_BASE_QTCLI_EXPORT qSlicerCLIModule : public qSlicerAbstractModule
41{
42 Q_OBJECT
43public:
44
46 qSlicerCLIModule(QWidget *parent=nullptr);
48
52 void setXmlModuleDescription(const QString& xmlModuleDescription);
53
55 int index() const override;
56
59 QString helpText() const override;
60 QString acknowledgementText() const override;
61
63 void setTempDirectory(const QString& tempDirectory);
64 QString tempDirectory() const;
65
68 void setEntryPoint(const QString& entryPoint);
69 QString entryPoint() const;
70
73 void setModuleType(const QString& type);
74 QString moduleType() const;
75
80
81 QString title() const override;
82
84 QStringList categories() const override;
85
87 QStringList contributors() const override;
88
90 QStringList associatedNodeTypes()const override;
91
92 QImage logo() const override;
93 void setLogo(const ModuleLogo& logo);
94
97 static QImage moduleLogoToImage(const ModuleLogo& logo);
98
101 ModuleDescription& moduleDescription();
102
104 QString translate(const std::string& sourceText)const;
105
106protected:
108 void setup() override;
109
113
117
118protected:
119 QScopedPointer<qSlicerCLIModulePrivate> d_ptr;
120
121private:
122 Q_DECLARE_PRIVATE(qSlicerCLIModule);
123 Q_DISABLE_COPY(qSlicerCLIModule);
124};
125
126#endif
qSlicerAbstractModule(QObject *parent=nullptr)
QStringList categories() const override
Extracted from the "category" field.
QString title() const override
int index() const override
Optionally set in the module XML description.
QString moduleType() const
qSlicerAbstractModule Superclass
vtkMRMLAbstractLogic * createLogic() override
Create and return the logic associated to this module.
QString entryPoint() const
QString helpText() const override
Return help/acknowledgement text.
ModuleDescription & moduleDescription()
QString translate(const std::string &sourceText) const
Translate string from source language to current application language.
static QImage moduleLogoToImage(const ModuleLogo &logo)
void setLogo(const ModuleLogo &logo)
void setXmlModuleDescription(const QString &xmlModuleDescription)
QScopedPointer< qSlicerCLIModulePrivate > d_ptr
~qSlicerCLIModule() override
QString acknowledgementText() const override
Q_INVOKABLE vtkSlicerCLIModuleLogic * cliModuleLogic()
void setModuleType(const QString &type)
qSlicerCLIModule(QWidget *parent=nullptr)
void setTempDirectory(const QString &tempDirectory)
Set temporary directory associated with the module.
qSlicerAbstractModuleRepresentation * createWidgetRepresentation() override
Create and return the widget representation associated to this module.
QString tempDirectory() const
QStringList associatedNodeTypes() const override
Specify editable node types.
QStringList contributors() const override
Extracted from the "contributor" field.
QImage logo() const override
The logo of the module, the credits given by the grants or institution.
void setEntryPoint(const QString &entryPoint)
void setup() override
All initialization code should be done in the setup.
Superclass for MRML logic classes.
MRML node for representing the parameters allowing to run a command line interface module (CLI)....