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

Method Initialize

Modules/QtWidgets/src/QmitkSynchronizedNodeSelectionWidget.cpp:235–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void QmitkSynchronizedNodeSelectionWidget::Initialize()
236{
237 auto baseRenderer = m_BaseRenderer.Lock();
238 auto dataStorage = m_DataStorage.Lock();
239 m_StorageModel->SetDataStorage(dataStorage);
240 m_StorageModel->SetCurrentRenderer(baseRenderer);
241
242 if (baseRenderer.IsNull() || dataStorage.IsNull())
243 {
244 m_Controls->selectionModeCheckBox->setEnabled(false);
245 m_Controls->changeSelectionButton->setEnabled(false);
246 // reset the model if no data storage is defined
247 m_StorageModel->removeRows(0, m_StorageModel->rowCount());
248 return;
249 }
250
251 // Use the new data storage / node predicate to correctly set the list of
252 // currently selected data nodes for the model.
253 // If a new data storage or node predicate has been defined,
254 // we switch to the "selectAll" mode and synchronize the selection for simplicity.
255 // enable UI
256 m_Controls->selectionModeCheckBox->setEnabled(true);
257 m_Controls->changeSelectionButton->setEnabled(true);
258
259 m_Controls->selectionModeCheckBox->setChecked(true);
260}
261
262void QmitkSynchronizedNodeSelectionWidget::UpdateInfo()
263{

Callers 4

SetBaseRendererMethod · 0.95
OnDataStorageChangedMethod · 0.95

Calls 6

LockMethod · 0.45
SetDataStorageMethod · 0.45
SetCurrentRendererMethod · 0.45
IsNullMethod · 0.45
setEnabledMethod · 0.45
rowCountMethod · 0.45

Tested by

no test coverage detected