Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
berryINullSelectionListener.h
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
14
#ifndef BERRYInullptrSELECTIONLISTENER_H_
15
#define BERRYInullptrSELECTIONLISTENER_H_
16
17
#include "
berryISelectionListener.h
"
18
19
namespace
berry
20
{
21
38
struct
BERRY_UI_QT
INullSelectionListener
:
public
ISelectionListener
39
{
40
~
INullSelectionListener
()
override
;
41
};
42
68
template
<
typename
R>
69
struct
NullSelectionChangedAdapter
:
public
INullSelectionListener
70
{
71
72
typedef
R
Listener
;
73
typedef
void
74
(R::*
Callback
)(
const
IWorkbenchPart::Pointer
&,
const
ISelection::ConstPointer
&);
75
76
NullSelectionChangedAdapter
(R* l,
Callback
c) :
77
listener(l), callback(c)
78
{
79
poco_assert(listener);
80
poco_assert(callback);
81
}
82
83
void
SelectionChanged
(
const
IWorkbenchPart::Pointer
& part,
84
const
ISelection::ConstPointer
& selection)
override
85
{
86
(listener->*callback)(part, selection);
87
}
88
89
private
:
90
91
Listener
* listener;
92
Callback
callback;
93
};
94
95
}
96
97
#endif
/* BERRYInullptrSELECTIONLISTENER_H_ */
berry::ISelectionListener
Definition:
berryISelectionListener.h:38
berry::NullSelectionChangedAdapter::SelectionChanged
void SelectionChanged(const IWorkbenchPart::Pointer &part, const ISelection::ConstPointer &selection) override
Definition:
berryINullSelectionListener.h:83
berry::NullSelectionChangedAdapter::Listener
R Listener
Definition:
berryINullSelectionListener.h:72
berry::NullSelectionChangedAdapter
Definition:
berryINullSelectionListener.h:69
BERRY_UI_QT
#define BERRY_UI_QT
Definition:
org_blueberry_ui_qt_Export.h:26
berry::NullSelectionChangedAdapter::Callback
void(R::* Callback)(const IWorkbenchPart::Pointer &, const ISelection::ConstPointer &)
Definition:
berryINullSelectionListener.h:74
berry::INullSelectionListener
Definition:
berryINullSelectionListener.h:38
berry::Object::ConstPointer
berry::SmartPointer< const Self > ConstPointer
Definition:
berryObject.h:83
berryISelectionListener.h
berry::NullSelectionChangedAdapter::NullSelectionChangedAdapter
NullSelectionChangedAdapter(R *l, Callback c)
Definition:
berryINullSelectionListener.h:76
berry::Object::Pointer
berry::SmartPointer< Self > Pointer
Definition:
berryObject.h:82
berry
Definition:
QmitkPropertyItemModel.h:24
src
MITK
Plugins
org.blueberry.ui.qt
src
berryINullSelectionListener.h
Generated on Tue Dec 24 2024 02:12:22 for Medical Imaging Interaction Toolkit by
1.8.17