Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkFloatPropertyExtension.cpp
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 
14 
15 namespace mitk
16 {
17  struct FloatPropertyExtension::Impl
18  {
19  Impl();
20  Impl(float minimum, float maximum, float singleStep, int decimals);
21  ~Impl();
22 
23  int Decimals;
24  float Maximum;
25  float Minimum;
26  float SingleStep;
27  };
28 
29  FloatPropertyExtension::Impl::Impl() : Decimals(2), Maximum(99.9999999999f), Minimum(0.0f), SingleStep(1.0f) {}
30  FloatPropertyExtension::Impl::Impl(float minimum, float maximum, float singleStep, int decimals)
31  : Decimals(decimals), Maximum(maximum), Minimum(minimum), SingleStep(singleStep)
32  {
33  }
34 
35  FloatPropertyExtension::Impl::~Impl() {}
36 }
37 
38 mitk::FloatPropertyExtension::FloatPropertyExtension() : m_Impl(new Impl)
39 {
40 }
41 
42 mitk::FloatPropertyExtension::FloatPropertyExtension(float minimum, float maximum, float singleStep, int decimals)
43  : m_Impl(new Impl(minimum, maximum, singleStep, decimals))
44 {
45 }
46 
47 mitk::FloatPropertyExtension::~FloatPropertyExtension()
48 {
49  delete m_Impl;
50 }
51 
53 {
54  return m_Impl->Decimals;
55 }
56 
58 {
59  m_Impl->Decimals = decimals;
60 }
61 
63 {
64  return m_Impl->Maximum;
65 }
66 
68 {
69  m_Impl->Maximum = maximum;
70 }
71 
73 {
74  return m_Impl->Minimum;
75 }
76 
78 {
79  m_Impl->Minimum = minimum;
80 }
81 
83 {
84  return m_Impl->SingleStep;
85 }
86 
88 {
89  m_Impl->SingleStep = singleStep;
90 }
DataCollection - Class to facilitate loading/accessing structured data.