Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
berryIPropertyChangeListener.cpp
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
#include "
berryIPropertyChangeListener.h
"
18
19
#include "
berryIWorkbenchPartConstants.h
"
20
#include <
berryObjects.h
>
21
22
namespace
berry
{
23
24
IPropertyChangeListener::~IPropertyChangeListener
()
25
{
26
}
27
28
void
29
IPropertyChangeListener::Events
30
::AddListener
(
IPropertyChangeListener
* listener)
31
{
32
if
(listener ==
nullptr
)
return
;
33
34
this->propertyChange +=
Delegate
(listener, &
IPropertyChangeListener::PropertyChange
);
35
}
36
37
void
38
IPropertyChangeListener::Events
39
::RemoveListener
(
IPropertyChangeListener
* listener)
40
{
41
if
(listener ==
nullptr
)
return
;
42
43
this->propertyChange -=
Delegate
(listener, &
IPropertyChangeListener::PropertyChange
);
44
}
45
46
void
IPropertyChangeListener::PropertyChange
(
const
PropertyChangeEvent::Pointer
& event)
47
{
48
if
(event->GetProperty() ==
IWorkbenchPartConstants::INTEGER_PROPERTY
)
49
{
50
this->
PropertyChange
(event->GetSource(),
event
->GetNewValue().
Cast
<
ObjectInt
>()->GetValue());
51
}
52
}
53
54
}
berry::ObjectInt
Definition:
berryObjects.h:26
berry
Definition:
QmitkPropertyItemModel.h:27
berry::IPropertyChangeListener::Events::RemoveListener
void RemoveListener(IPropertyChangeListener *listener)
Definition:
berryIPropertyChangeListener.cpp:39
berry::IPropertyChangeListener::PropertyChange
virtual void PropertyChange(const PropertyChangeEvent::Pointer &event)
Definition:
berryIPropertyChangeListener.cpp:46
berryObjects.h
berry::SmartPointer< Self >
berry::IPropertyChangeListener::Events::AddListener
void AddListener(IPropertyChangeListener *listener)
Definition:
berryIPropertyChangeListener.cpp:30
berryIWorkbenchPartConstants.h
berry::IPropertyChangeListener::~IPropertyChangeListener
virtual ~IPropertyChangeListener()
Definition:
berryIPropertyChangeListener.cpp:24
berryIPropertyChangeListener.h
berry::IWorkbenchPartConstants::INTEGER_PROPERTY
static const QString INTEGER_PROPERTY
Definition:
berryIWorkbenchPartConstants.h:41
berry::SmartPointer::Cast
SmartPointer< Other > Cast() const
Definition:
berrySmartPointer.h:115
berry::IPropertyChangeListener
Definition:
berryIPropertyChangeListener.h:46
berry::MessageDelegate1
Definition:
berryMessage.h:174
git
MITK
Plugins
org.blueberry.ui.qt
src
berryIPropertyChangeListener.cpp
Generated on Fri Feb 3 2017 20:51:44 for Medical Imaging Interaction Toolkit by
1.8.9.1