CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Loading...
Searching...
No Matches
ctkCmdLineModuleDescription.h
Go to the documentation of this file.
1/*=============================================================================
2
3 Library: CTK
4
5 Copyright (c) 2010 Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=============================================================================*/
20
21#ifndef __ctkCmdLineModuleDescription_h
22#define __ctkCmdLineModuleDescription_h
23
24#include <ctkCommandLineModulesCoreExport.h>
25
26#include <QList>
27#include <QSharedDataPointer>
28
29class QIcon;
30class QIODevice;
31class QTextStream;
32
33struct ctkCmdLineModuleDescriptionPrivate;
36
46class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDescription
47{
48
49public:
50
53
55
56 static ctkCmdLineModuleDescription parse(QIODevice* input);
57
61 QString category() const;
62
66 QString title() const;
67
71 QString categoryDotTitle() const;
72
76 QString description() const;
77
81 QString version() const;
82
86 QString documentationURL() const;
87
91 QString license() const;
92
96 QString acknowledgements() const;
97
101 QString contributor() const;
102
106 QIcon logo() const;
107
113
119 bool hasParameter(const QString& name) const;
120
127 ctkCmdLineModuleParameter parameter(const QString& name) const;
128
133
134private:
135
136 friend class ctkCmdLineModuleXmlParser;
137 friend struct ctkCmdLineModuleReferencePrivate;
138
140
141 QSharedDataPointer<ctkCmdLineModuleDescriptionPrivate> d;
142
143};
144
145CTK_CMDLINEMODULECORE_EXPORT QTextStream & operator<<(QTextStream& os, const ctkCmdLineModuleDescription& module);
146
147#endif
Description of the parameters of a command line module.
QString contributor() const
Returns the title, derived from the.
QString categoryDotTitle() const
Helper method that returns the category followed by a dot followed by the title.
bool hasReturnParameters() const
Does the module have any simple (primitive) return types?
QString version() const
Returns the title, derived from the.
QString category() const
Returns the category, derived from the.
QList< ctkCmdLineModuleParameterGroup > parameterGroups() const
The XML can define groups of parameters, so this method returns a QList of ctkCmdLineModuleParameterG...
ctkCmdLineModuleParameter parameter(const QString &name) const
Returns the parameter specified by name.
ctkCmdLineModuleDescription & operator=(const ctkCmdLineModuleDescription &other)
QString acknowledgements() const
Returns the title, derived from the.
static ctkCmdLineModuleDescription parse(QIODevice *input)
bool hasParameter(const QString &name) const
Searches the list of parameters, checking if a parameter has the given name.
QString title() const
Returns the title, derived from the.
ctkCmdLineModuleDescription(const ctkCmdLineModuleDescription &description)
QString license() const
Returns the title, derived from the.
QIcon logo() const
Should return a QIcon, but does not appear to be supported yet.
QString description() const
Returns the title, derived from the.
QString documentationURL() const
Returns the title, derived from the.
Single parameter to a module, like a threshold of a filter.
CTK_CMDLINEMODULECORE_EXPORT QTextStream & operator<<(QTextStream &os, const ctkCmdLineModuleDescription &module)