NorMIT-nav
22.09
An IGT application
cxBoolPropertyBase.h
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
12
#ifndef CXBOOLPROPERTYBASE_H_
13
#define CXBOOLPROPERTYBASE_H_
14
15
#include "cxResourceExport.h"
16
17
#include "
cxProperty.h
"
18
19
namespace
cx
20
{
21
26
class
cxResource_EXPORT
BoolPropertyBase
:
public
Property
27
{
28
Q_OBJECT
29
public
:
30
virtual
~BoolPropertyBase
()
31
{
32
}
33
34
public
:
35
// basic methods
36
virtual
QString getDisplayName()
const
= 0;
37
virtual
bool
setValue(
bool
value) = 0;
38
virtual
bool
getValue()
const
= 0;
39
40
virtual
QVariant
getValueAsVariant
()
const
41
{
42
return
QVariant(this->getValue());
43
}
44
virtual
void
setValueFromVariant
(QVariant val)
45
{
46
this->setValue(val.toBool());
47
}
48
49
public
:
50
// optional methods
51
virtual
QString getHelp()
const
52
{
53
return
QString();
54
}
55
//virtual void connectValueSignals(bool on) {} ///< set object to emit changed() when applicable
56
57
//signals:
58
// void changed(); ///< emit when the underlying data value is changed: The user interface will be updated.
59
};
60
typedef
boost::shared_ptr<BoolPropertyBase>
BoolPropertyBasePtr
;
61
62
}
63
64
#endif
/* CXBOOLPROPERTYBASE_H_ */
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::BoolPropertyBase::getValueAsVariant
virtual QVariant getValueAsVariant() const
Definition:
cxBoolPropertyBase.h:40
cx::BoolPropertyBase::~BoolPropertyBase
virtual ~BoolPropertyBase()
Definition:
cxBoolPropertyBase.h:30
cxProperty.h
cx::BoolPropertyBasePtr
boost::shared_ptr< class BoolPropertyBase > BoolPropertyBasePtr
Definition:
cxImageFileStreamerService.h:22
cx::Property
Superclass for all data adapters.
Definition:
cxProperty.h:43
cx::BoolPropertyBase
Definition:
cxBoolPropertyBase.h:26
cx::BoolPropertyBase::setValueFromVariant
virtual void setValueFromVariant(QVariant val)
Definition:
cxBoolPropertyBase.h:44
CX
source
resource
core
properties
cxBoolPropertyBase.h
Generated on Tue Sep 13 2022 11:06:15 for NorMIT-nav by
1.8.17