CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Libs
Core
ctkLinearValueProxy.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Library: CTK
4
5
Copyright (c) Kitware Inc.
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.txt
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 __ctkLinearValueProxy_h
22
#define __ctkLinearValueProxy_h
23
24
// CTK includes
25
#include "ctkCoreExport.h"
26
#include "
ctkValueProxy.h
"
27
#include "
ctkPimpl.h
"
28
29
class
ctkLinearValueProxyPrivate;
30
40
class
CTK_CORE_EXPORT
ctkLinearValueProxy
:
public
ctkValueProxy
41
{
42
Q_OBJECT
43
Q_PROPERTY(
double
coefficient READ coefficient WRITE setCoefficient)
44
Q_PROPERTY(
double
offset READ offset WRITE setOffset)
45
46
public:
47
typedef
ctkValueProxy
Superclass
;
48
explicit
ctkLinearValueProxy
(QObject* parent = 0);
49
virtual ~
ctkLinearValueProxy
();
50
51
virtual
double
proxyValueFromValue(
double
value) const;
52
53
virtual
double
valueFromProxyValue(
double
proxyValue) const;
54
55
virtual
double
coefficient() const;
56
virtual
double
offset() const;
57
58
public Q_SLOTS:
59
virtual
void
setCoefficient(
double
newCoeff);
60
virtual
void
setOffset(
double
newOffset);
61
62
protected:
63
QScopedPointer<ctkLinearValueProxyPrivate> d_ptr;
64
65
private:
66
Q_DECLARE_PRIVATE(
ctkLinearValueProxy
);
67
Q_DISABLE_COPY(
ctkLinearValueProxy
);
68
};
69
70
#endif
ctkValueProxy.h
ctkLinearValueProxy
Implementation of an affine value proxy. The ctkLinearValueProxy takes a coefficient and an offset,...
Definition:
ctkLinearValueProxy.h:40
ctkValueProxy
Base class for value proxies. Value proxy allows to decouple the displayed value from the values acce...
Definition:
ctkValueProxy.h:46
ctkPimpl.h
Generated on Tue Jan 28 2020 00:00:00 for CTK by
1.8.17