Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryParameterType.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef BERRYPARAMETERTYPE_H_
18 #define BERRYPARAMETERTYPE_H_
19 
23 
24 #include <QSharedPointer>
25 
26 namespace berry
27 {
28 
29 struct IParameterValueConverter;
30 
61 { //implements Comparable {
62 
63 public:
64 
66 
74 void AddListener(IParameterTypeListener* listener);
75 
86  bool operator<(const Object* object) const override;
87 
106  void Define(const QString& type,
107  const QSharedPointer<IParameterValueConverter>& parameterTypeConverter);
108 
117  IParameterValueConverter* GetValueConverter() const;
118 
132  bool IsCompatible(const QObject* const value) const;
133 
143  void RemoveListener(IParameterTypeListener* listener);
144 
151  QString ToString() const override;
152 
157  void Undefine() override;
158 
159 protected:
160 
161  friend class CommandManager;
162 
174  ParameterType(const QString& id);
175 
176 private:
177 
186  void FireParameterTypeChanged(const SmartPointer<ParameterTypeEvent> event);
187 
192  QSharedPointer<IParameterValueConverter> parameterTypeConverter;
193 
199  QString type;
200 
201  IParameterTypeListener::Events parameterTypeEvents;
202 
203 };
204 
205 }
206 
207 #endif /* BERRYPARAMETERTYPE_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37