Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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:
45 qSlicerCLIModule(QWidget* parent = nullptr);
47
51 void setXmlModuleDescription(const QString& xmlModuleDescription);
52
54 int index() const override;
55
58 QString helpText() const override;
59 QString acknowledgementText() const override;
60
62 void setTempDirectory(const QString& tempDirectory);
63 QString tempDirectory() const;
64
67 void setEntryPoint(const QString& entryPoint);
68 QString entryPoint() const;
69
72 void setModuleType(const QString& type);
73 QString moduleType() const;
74
79
80 QString title() const override;
81
83 QStringList categories() const override;
84
86 QStringList contributors() const override;
87
89 QStringList associatedNodeTypes() const override;
90
91 QImage logo() const override;
92 void setLogo(const ModuleLogo& logo);
93
96 static QImage moduleLogoToImage(const ModuleLogo& logo);
97
100 ModuleDescription& moduleDescription();
101
103 QString translate(const std::string& sourceText) const;
104
105protected:
107 void setup() override;
108
112
116
117protected:
118 QScopedPointer<qSlicerCLIModulePrivate> d_ptr;
119
120private:
121 Q_DECLARE_PRIVATE(qSlicerCLIModule);
122 Q_DISABLE_COPY(qSlicerCLIModule);
123};
124
125#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)....