#include <mitkNodeSelectionService.h>
Definition at line 23 of file mitkNodeSelectionService.h.
◆ NodeSelectionService()
mitk::NodeSelectionService::NodeSelectionService |
( |
| ) |
|
◆ ~NodeSelectionService()
mitk::NodeSelectionService::~NodeSelectionService |
( |
| ) |
|
|
override |
◆ AddListener()
bool mitk::NodeSelectionService::AddListener |
( |
const std::string & |
context, |
|
|
INodeSelectionListener * |
listener |
|
) |
| |
|
overridevirtual |
Add a listener for selections in a certain selection context.
A selection context is a non-empty, arbitrary and unique string that both sender and receiver agreed upon. A listener must not be nullptr
and can be added only once.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
listener | A valid pointer to a class implementing the listener interface. |
- Returns
true
if the listener was successfully added or already has been added before, or false
otherwise.
Implements mitk::INodeSelectionService.
◆ RemoveListener() [1/2]
Remove a listener from selections of all selection contexts.
- Parameters
-
listener | A pointer to an already added listener. |
- Returns
true
if the listener was actually found, or false
otherwise.
- See also
- AddListener()
Implements mitk::INodeSelectionService.
◆ RemoveListener() [2/2]
bool mitk::NodeSelectionService::RemoveListener |
( |
const std::string & |
context, |
|
|
const INodeSelectionListener * |
listener |
|
) |
| |
|
overridevirtual |
Remove a listener from selections of a certain selection context.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
listener | A pointer to an already added listener. |
- Returns
true
if the listener was actually found for the given context, or false
otherwise.
- See also
- AddListener()
Implements mitk::INodeSelectionService.
◆ SendSelection()
bool mitk::NodeSelectionService::SendSelection |
( |
const std::string & |
context, |
|
|
const std::vector< mitk::DataNode::Pointer > & |
selection |
|
) |
| const |
|
overridevirtual |
Send a selection to all listeners of a certain selection context.
- Parameters
-
context | A non-empty, arbitrary and unique string that both sender and receiver agreed upon. |
selection | A selection of potentially multiple data nodes to send to any listeners for the given selection context. |
- See also
- AddListener()
Implements mitk::INodeSelectionService.
The documentation for this class was generated from the following file: