Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
berryGuiTkIControlListener.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
13
#include "
berryGuiTkIControlListener.h
"
14
15
namespace
berry
{
16
17
namespace
GuiTk {
18
19
IControlListener::~IControlListener
()
20
{
21
}
22
23
void
24
IControlListener::Events
25
::AddListener
(
IControlListener::Pointer
l)
26
{
27
if
(l.
IsNull
())
return
;
28
29
Types types = l->GetEventTypes();
30
31
if
(types & MOVED)
32
movedEvent +=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlMoved
);
33
if
(types & RESIZED)
34
resizedEvent +=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlResized
);
35
if
(types & ACTIVATED)
36
activatedEvent +=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlActivated
);
37
if
(types & DESTROYED)
38
destroyedEvent +=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlDestroyed
);
39
}
40
41
void
42
IControlListener::Events
43
::RemoveListener
(
IControlListener::Pointer
l)
44
{
45
if
(l.
IsNull
())
return
;
46
47
movedEvent -=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlMoved
);
48
resizedEvent -=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlResized
);
49
activatedEvent -=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlActivated
);
50
destroyedEvent -=
Delegate
(l.
GetPointer
(), &
IControlListener::ControlDestroyed
);
51
}
52
53
}
54
55
}
berry
Definition:
QmitkPropertyItemModel.h:23
berry::GuiTk::IControlListener::ControlDestroyed
virtual void ControlDestroyed(ControlEvent::Pointer)
Definition:
berryGuiTkIControlListener.h:104
berry::SmartPointer< Self >
berry::GuiTk::IControlListener::ControlMoved
virtual void ControlMoved(ControlEvent::Pointer)
Definition:
berryGuiTkIControlListener.h:87
berry::GuiTk::IControlListener::ControlActivated
virtual void ControlActivated(ControlEvent::Pointer)
Definition:
berryGuiTkIControlListener.h:100
berry::GuiTk::IControlListener::ControlResized
virtual void ControlResized(ControlEvent::Pointer)
Definition:
berryGuiTkIControlListener.h:96
berry::GuiTk::IControlListener::Events::RemoveListener
void RemoveListener(IControlListener::Pointer listener)
Definition:
berryGuiTkIControlListener.cpp:43
berry::GuiTk::IControlListener::~IControlListener
~IControlListener() override
Definition:
berryGuiTkIControlListener.cpp:19
berry::SmartPointer::IsNull
bool IsNull() const
Definition:
berrySmartPointer.h:140
berryGuiTkIControlListener.h
berry::GuiTk::IControlListener::Events::AddListener
void AddListener(IControlListener::Pointer listener)
Definition:
berryGuiTkIControlListener.cpp:25
berry::MessageDelegate1
Definition:
berryMessage.h:170
berry::SmartPointer::GetPointer
ObjectType * GetPointer() const
Definition:
berrySmartPointer.h:209
Source
Plugins
org.blueberry.ui.qt
src
guitk
berryGuiTkIControlListener.cpp
Generated on Thu Mar 12 2020 10:23:32 for Medical Imaging Interaction Toolkit by
1.8.13