24 : m_ServiceRegistration()
25 , m_TrackingDeviceWidgets()
31 for (
auto& item : m_TrackingDeviceWidgets)
41 m_ServiceRegistration = context->RegisterService(
this);
46 if (m_ServiceRegistration !=
nullptr) m_ServiceRegistration.Unregister();
47 m_ServiceRegistration = 0;
52 if (widget !=
nullptr)
55 for (
unsigned int i = 0; i < m_TrackingDeviceWidgets.size(); i++)
57 if (m_TrackingDeviceWidgets.at(i).first == type)
60 m_TrackingDeviceWidgets.push_back(std::make_pair(type, widget));
66 for (
unsigned int i = 0; i < m_TrackingDeviceWidgets.size(); i++)
68 if (m_TrackingDeviceWidgets.at(i).first == type)
70 if (!(m_TrackingDeviceWidgets.at(i).second->IsInitialized()))
72 m_TrackingDeviceWidgets.at(i).second->
Initialize();
73 if (!(m_TrackingDeviceWidgets.at(i).second->IsInitialized()))
74 MITK_ERROR <<
"Something went wrong with initialization of your tracking device widget!";
76 return (m_TrackingDeviceWidgets.at(i).second->CloneForQt());
std::string TrackingDeviceType
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.