| 37 | } |
| 38 | |
| 39 | QmitkQuestionWidget* QuestionWidgetFactory::Create(Question* question, QWidget* parent) const |
| 40 | { |
| 41 | try |
| 42 | { |
| 43 | auto widget = m_WidgetPrototypes.at(question->GetType())->CreateAnother(parent); |
| 44 | widget->SetQuestion(question); |
| 45 | |
| 46 | return widget; |
| 47 | } |
| 48 | catch (const std::out_of_range&) |
| 49 | { |
| 50 | } |
| 51 | |
| 52 | return nullptr; |
| 53 | } |
no test coverage detected