| 855 | } |
| 856 | |
| 857 | QmitkMxNMultiWidget::WindowDescriptor |
| 858 | QmitkMxNMultiWidget::MakeWindowDescriptor(const QmitkRenderWindowWidget* cell) const |
| 859 | { |
| 860 | if (nullptr == cell) |
| 861 | { |
| 862 | mitkThrow() << "MakeWindowDescriptor: null cell."; |
| 863 | } |
| 864 | |
| 865 | WindowDescriptor descriptor; |
| 866 | descriptor.id = cell->GetWidgetName(); |
| 867 | descriptor.displayName = cell->GetDisplayName(); |
| 868 | descriptor.viewDirection = QString::fromStdString( |
| 869 | ViewDirectionToV2String( |
| 870 | cell->GetSliceNavigationController()->GetDefaultViewDirection())); |
| 871 | |
| 872 | const auto idx = cell->GetUtilityWidget()->GetSyncGroup(); |
| 873 | const auto recorded = m_GroupNameByIndex.find(idx); |
| 874 | if (recorded == m_GroupNameByIndex.end()) |
| 875 | { |
| 876 | mitkThrow() << "MakeWindowDescriptor: cell sync group " << idx |
| 877 | << " has no entry in the group-name registry; " |
| 878 | << "engine state is corrupt."; |
| 879 | } |
| 880 | descriptor.selectionGroup = QString::fromStdString(recorded->second); |
| 881 | return descriptor; |
| 882 | } |
| 883 | |
| 884 | std::vector<QmitkMxNMultiWidget::WindowDescriptor> |
| 885 | QmitkMxNMultiWidget::ListWindowDescriptors() const |
no test coverage detected