CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
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 
29 class QIcon;
30 class QIODevice;
31 class QTextStream;
32 
33 struct ctkCmdLineModuleDescriptionPrivate;
36 
46 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDescription
47 {
48 
49 public:
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 
112  QList<ctkCmdLineModuleParameterGroup> parameterGroups() const;
113 
119  bool hasParameter(const QString& name) const;
120 
127  ctkCmdLineModuleParameter parameter(const QString& name) const;
128 
132  bool hasReturnParameters() const;
133 
134 private:
135 
136  friend class ctkCmdLineModuleXmlParser;
137  friend struct ctkCmdLineModuleReferencePrivate;
138 
140 
141  QSharedDataPointer<ctkCmdLineModuleDescriptionPrivate> d;
142 
143 };
144 
145 CTK_CMDLINEMODULECORE_EXPORT QTextStream & operator<<(QTextStream& os, const ctkCmdLineModuleDescription& module);
146 
147 #endif
CTK_CMDLINEMODULECORE_EXPORT QTextStream & operator<<(QTextStream &os, const ctkCmdLineModuleDescription &module)
Description of the parameters of a command line module.The parameters can be used for automated GUI g...
Single parameter to a module, like a threshold of a filter.