| 117 | } |
| 118 | |
| 119 | void QmitkRenderWindowUtilityWidget::SetSyncGroup(const GroupSyncIndexType index) |
| 120 | { |
| 121 | if (index < 1) |
| 122 | { |
| 123 | mitkThrow() << "Invalid synchronization group index '" << index |
| 124 | << "'. Group index must be >= 1."; |
| 125 | } |
| 126 | // Locate the combobox row that carries this group index in its userData. |
| 127 | // The group must already be registered with this widget (via a prior |
| 128 | // 'OnSyncGroupAdded'); silently de-selecting on a missing index would mask |
| 129 | // a contract violation by the caller. |
| 130 | const int row = m_SyncGroupSelector->findData(QVariant(index)); |
| 131 | if (row < 0) |
| 132 | { |
| 133 | mitkThrow() << "Synchronization group '" << index |
| 134 | << "' is not registered with this widget. Ensure the owning " |
| 135 | "multi widget has emitted 'SyncGroupAdded(" << index |
| 136 | << ")' before calling 'SetSyncGroup'."; |
| 137 | } |
| 138 | m_SyncGroupSelector->setCurrentIndex(row); |
| 139 | } |
| 140 | |
| 141 | QmitkRenderWindowUtilityWidget::GroupSyncIndexType QmitkRenderWindowUtilityWidget::GetSyncGroup() const |
| 142 | { |
no outgoing calls
no test coverage detected