MCPcopy Create free account
hub / github.com/MITK/MITK / OnPreferenceChangedEvent

Method OnPreferenceChangedEvent

Modules/SegmentationUI/src/QmitkMonaiLabelToolGUI.cpp:339–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339void QmitkMonaiLabelToolGUI::OnPreferenceChangedEvent(const mitk::IPreferences::ChangeEvent& event)
340{
341 if (event.GetProperty().rfind("monai", 0) == 0)
342 {
343 bool allowAllModels = m_Preferences->GetBool("monailabel allow all models", false);
344 this->PopulateUI(allowAllModels);
345 auto tool = this->GetConnectedToolAs<mitk::MonaiLabelTool>();
346 if (nullptr != tool)
347 {
348 auto timeout_sec = std::make_unsigned_t<int>(m_Preferences->GetInt("monailabel timeout", 180));
349 tool->SetTimeout(timeout_sec);
350 }
351 }
352}

Callers

nothing calls this directly

Calls 4

PopulateUIMethod · 0.95
GetBoolMethod · 0.80
GetPropertyMethod · 0.45
GetIntMethod · 0.45

Tested by

no test coverage detected