Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
berryParameterType.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef BERRYPARAMETERTYPE_H_
14 #define BERRYPARAMETERTYPE_H_
15 
19 
20 #include <QSharedPointer>
21 
22 namespace berry
23 {
24 
25 struct IParameterValueConverter;
26 
57 { //implements Comparable {
58 
59 public:
60 
62 
71 
82  bool operator<(const Object* object) const override;
83 
102  void Define(const QString& type,
103  const QSharedPointer<IParameterValueConverter>& parameterTypeConverter);
104 
114 
128  bool IsCompatible(const QObject* const value) const;
129 
140 
147  QString ToString() const override;
148 
153  void Undefine() override;
154 
155 protected:
156 
157  friend class CommandManager;
158 
170  ParameterType(const QString& id);
171 
172 private:
173 
182  void FireParameterTypeChanged(const SmartPointer<ParameterTypeEvent> event);
183 
188  QSharedPointer<IParameterValueConverter> parameterTypeConverter;
189 
195  QString type;
196 
197  IParameterTypeListener::Events parameterTypeEvents;
198 
199 };
200 
201 }
202 
203 #endif /* BERRYPARAMETERTYPE_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:73
void Undefine() override
void Define(const QString &type, const QSharedPointer< IParameterValueConverter > &parameterTypeConverter)
void RemoveListener(IParameterTypeListener *listener)
IParameterValueConverter * GetValueConverter() const
void AddListener(IParameterTypeListener *listener)
bool operator<(const Object *object) const override
bool IsCompatible(const QObject *const value) const
berryObjectMacro(ParameterType)
QString ToString() const override
ParameterType(const QString &id)
Implements transparent reference counting.