Computer Assited Medical Intervention Tool Kit  version 4.1
ParameterGenerator.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 #ifndef PARAMETERGENERATOR_H
26 #define PARAMETERGENERATOR_H
27 
28 #if defined(_WIN32) && !defined(__MINGW32__) // MSVC only
29 #pragma warning( disable : 4290 )
30 #endif // MSVC only
31 
32 
33 // includes from Qt
34 #include <QString>
35 #include <QMap>
36 
37 namespace cepcoreschema {
38 class Parameter;
39 }
40 
49 public:
50  typedef enum {
51  INT,
62  UNKNOWN
64 
65  ParameterGenerator(cepcoreschema::Parameter& domParameter);
66 
67  QString getDefaultValue() const;
68  QString getName() const;
70  QString getCppName() const;
71  QString getType() const;
72  bool isEditable() const;
73  bool needsAdditionalInclude() const;
74  QString getAdditionalInclude() const;
75  QString getQVariantConversion() const;
76  QString getPropertyQVariant() const;
77  QString getToString() const;
78  QString getDescription() const;
79  QString getUnit() const;
80 
81  static QString getTypeDefaultValue(QString typeName);
82 
83 private:
84  bool editable;
85  QString name;
86  QString defaultValue;
87  ParameterTypeGenerator type;
88  QString description;
89  QString unit;
90 
91  static QMap<ParameterGenerator::ParameterTypeGenerator, QString>& getTypeNames();
92  static QMap<ParameterGenerator::ParameterTypeGenerator, QString>& getDefaultValues();
93 
94  static void initNamesAndValues();
95 };
96 
97 #endif
QString unit
Definition: ParameterGenerator.h:89
QString defaultValue
Definition: ParameterGenerator.h:86
bool editable
Definition: ParameterGenerator.h:84
Definition: ParameterGenerator.h:59
Definition: ParameterGenerator.h:57
Definition: ActionExtensionGenerator.h:36
ParameterTypeGenerator type
Definition: ParameterGenerator.h:87
Definition: ParameterGenerator.h:55
Definition: ParameterGenerator.h:61
ParameterTypeGenerator
Definition: ParameterGenerator.h:50
QString name
Definition: ParameterGenerator.h:85
Definition: ParameterGenerator.h:52
Definition: ParameterGenerator.h:56
Definition: ParameterGenerator.h:53
Definition: ParameterGenerator.h:58
Generate parameters.
Definition: ParameterGenerator.h:48
Definition: ParameterGenerator.h:60
Definition: ParameterGenerator.h:51
Definition: ParameterGenerator.h:54
QString description
Definition: ParameterGenerator.h:88