Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
Register widgets for questions. More...
#include <mitkIQuestionWidgetFactory.h>
Public Member Functions | |
virtual | ~IQuestionWidgetFactory () |
virtual void | Register (const std::string &questionType, QmitkQuestionWidget *widgetPrototype)=0 |
Register a QmitkQuestionWidget subclass for a certain Question type string. More... | |
virtual QmitkQuestionWidget * | Create (Question *question, QWidget *parent=nullptr) const =0 |
Create an instance of a matching QmitkQuestionWidget subclass for a certain question. More... | |
Static Public Member Functions | |
static IQuestionWidgetFactory * | GetInstance () |
Obtain a pointer to the single instance of this service. More... | |
Register widgets for questions.
This is a service interface. Obtain a pointer to its single instance via GetInstance().
Each QmitkQuestionWidget subclass must be registered by calling Register(), which is typically done in the module activator class. After QmitkQuestionWidget subclasses are registered, instances of them can be created with Create() based on their matching type of Question.
Definition at line 35 of file mitkIQuestionWidgetFactory.h.
|
virtual |
|
pure virtual |
Create an instance of a matching QmitkQuestionWidget subclass for a certain question.
The given question is passed to QmitkQuestionWidget::SetQuestion().
Implemented in mitk::Forms::UI::QuestionWidgetFactory.
|
static |
Obtain a pointer to the single instance of this service.
|
pure virtual |
Register a QmitkQuestionWidget subclass for a certain Question type string.
The service takes over ownership of the passed QmitkQuestionWidget pointer.
Implemented in mitk::Forms::UI::QuestionWidgetFactory.