28 if (!m_DataNode.IsExpired())
30 auto dataNode = m_DataNode.Lock();
32 if (dataNode->GetDataInteractor() ==
this)
33 dataNode->SetDataInteractor(
nullptr);
39 return m_DataNode.Lock();
44 if (dataNode == m_DataNode)
47 if (!m_DataNode.IsExpired())
48 m_DataNode.Lock()->SetDataInteractor(
nullptr);
50 m_DataNode = dataNode;
52 if (dataNode !=
nullptr)
53 m_DataNode.Lock()->SetDataInteractor(
this);
62 if (!m_DataNode.IsExpired())
63 m_DataNode.Lock()->GetIntProperty(
"layer", layer);
70 MITK_WARN <<
"DataInteractor::ConnectActionsAndFunctions() is not implemented.";
77 if (mode ==
"PREFER_INPUT")
80 if (mode ==
"GRAB_INPUT")
88 this->
GetDataNode()->InvokeEvent(StartInteraction());
static const std::string IntLeaveWidget
virtual void DataNodeChanged()
Is called when a DataNode is initially set or changed To be implemented by sub-classes for initializa...
DataNode * GetDataNode() const
std::string GetMode() const
StateMachineState * GetCurrentState() const
static const std::string IntDeactivateMe
virtual void NotifyStart()
Sends StartInteraction event via the mitk::DataNode.
void ConnectActionsAndFunctions() override
Overwrite this function to connect actions from StateMachine description with functions.
virtual void SetDataNode(DataNode *dataNode)
virtual void NotifyResultReady()
NotifyResultReady Sends ResultReady event via the mitk::DataNode.
ProcessEventMode GetMode() const
~DataInteractor() override
static const std::string IntEnterWidget
Class for nodes of the DataTree.