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

Method UpdateInfo

Modules/QtWidgets/src/QmitkMultiNodeSelectionWidget.cpp:78–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void QmitkMultiNodeSelectionWidget::UpdateInfo()
79{
80 if (!m_Controls->list->count())
81 {
82 if (m_IsOptional)
83 {
84 if (this->isEnabled())
85 {
86 m_Overlay->SetOverlayText(QStringLiteral("<font class=\"normal\">") + m_EmptyInfo + QStringLiteral("</font>"));
87 }
88 else
89 {
90 m_Overlay->SetOverlayText(QStringLiteral("<font class=\"disabled\">") + m_EmptyInfo + QStringLiteral("</font>"));
91 }
92 }
93 else
94 {
95 if (this->isEnabled())
96 {
97 m_Overlay->SetOverlayText(QStringLiteral("<font class=\"warning\">") + m_InvalidInfo + QStringLiteral("</font>"));
98 }
99 else
100 {
101 m_Overlay->SetOverlayText(QStringLiteral("<font class=\"disabled\">") + m_InvalidInfo + QStringLiteral("</font>"));
102 }
103 }
104 }
105 else
106 {
107 if (!m_CheckResponse.empty())
108 {
109 m_Overlay->SetOverlayText(QString::fromStdString(m_CheckResponse));
110 }
111 }
112
113 m_Overlay->setVisible(m_Controls->list->count() == 0 || !m_CheckResponse.empty());
114
115 for (auto i = 0; i < m_Controls->list->count(); ++i)
116 {
117 auto item = m_Controls->list->item(i);
118 auto widget = qobject_cast<QmitkNodeSelectionListItemWidget*>(m_Controls->list->itemWidget(item));
119 widget->SetClearAllowed(m_IsOptional || m_Controls->list->count() > 1);
120 }
121}
122
123void QmitkMultiNodeSelectionWidget::OnInternalSelectionChanged()
124{

Callers 8

changeEventMethod · 0.95
SetInvalidInfoMethod · 0.45
SetEmptyInfoMethod · 0.45
OnNodeModifiedMethod · 0.45

Calls 5

countMethod · 0.80
isEnabledMethod · 0.80
SetClearAllowedMethod · 0.80
SetOverlayTextMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected