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

Method SynchronizeWidget

Modules/QtWidgets/src/QmitkSynchronizedWidgetConnector.cpp:108–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void QmitkSynchronizedWidgetConnector::SynchronizeWidget(QmitkSynchronizedNodeSelectionWidget* nodeSelectionWidget) const
109{
110 // We need to explicitly differentiate when "Select All" is active, since the internal selection
111 // might not contain all nodes. When no selection widget is synchronized, the m_InternalSelection
112 // won't be updated.
113 if (m_SelectAll)
114 {
115 nodeSelectionWidget->SelectAll();
116 }
117 else
118 {
119 nodeSelectionWidget->SetCurrentSelection(m_InternalSelection);
120 }
121
122 nodeSelectionWidget->SetSelectAll(m_SelectAll);
123
124 // Need to explicitly set visibility true, since selected but invisible nodes in the sync group don't trigger selection changes
125 for (auto& node : nodeSelectionWidget->GetSelectedNodes())
126 {
127 nodeSelectionWidget->SetNodeVisibility(node, true);
128 }
129
130 for (auto& node : this->m_InternalInvisibles)
131 {
132 nodeSelectionWidget->SetNodeVisibility(node, false);
133 }
134}
135
136QmitkSynchronizedWidgetConnector::NodeList QmitkSynchronizedWidgetConnector::GetNodeSelection() const
137{

Calls 5

SelectAllMethod · 0.80
SetSelectAllMethod · 0.80
SetNodeVisibilityMethod · 0.80
SetCurrentSelectionMethod · 0.45
GetSelectedNodesMethod · 0.45