Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::Forms::UI::QuestionWidgetFactory Class Reference

#include <mitkQuestionWidgetFactory.h>

Inheritance diagram for mitk::Forms::UI::QuestionWidgetFactory:
Collaboration diagram for mitk::Forms::UI::QuestionWidgetFactory:

Public Member Functions

 QuestionWidgetFactory ()
 
 ~QuestionWidgetFactory () override
 
void Register (const std::string &questionType, QmitkQuestionWidget *widgetPrototype) override
 Register a QmitkQuestionWidget subclass for a certain Question type string. More...
 
QmitkQuestionWidgetCreate (Question *question, QWidget *parent=nullptr) const override
 Create an instance of a matching QmitkQuestionWidget subclass for a certain question. More...
 
- Public Member Functions inherited from mitk::Forms::UI::IQuestionWidgetFactory
virtual ~IQuestionWidgetFactory ()
 

Additional Inherited Members

- Static Public Member Functions inherited from mitk::Forms::UI::IQuestionWidgetFactory
static IQuestionWidgetFactoryGetInstance ()
 Obtain a pointer to the single instance of this service. More...
 

Detailed Description

Definition at line 23 of file mitkQuestionWidgetFactory.h.

Constructor & Destructor Documentation

◆ QuestionWidgetFactory()

mitk::Forms::UI::QuestionWidgetFactory::QuestionWidgetFactory ( )

◆ ~QuestionWidgetFactory()

mitk::Forms::UI::QuestionWidgetFactory::~QuestionWidgetFactory ( )
override

Member Function Documentation

◆ Create()

QmitkQuestionWidget* mitk::Forms::UI::QuestionWidgetFactory::Create ( Question question,
QWidget *  parent = nullptr 
) const
overridevirtual

Create an instance of a matching QmitkQuestionWidget subclass for a certain question.

The given question is passed to QmitkQuestionWidget::SetQuestion().

See also
QmitkQuestionWidget::CreateAnother()

Implements mitk::Forms::UI::IQuestionWidgetFactory.

◆ Register()

void mitk::Forms::UI::QuestionWidgetFactory::Register ( const std::string &  questionType,
QmitkQuestionWidget widgetPrototype 
)
overridevirtual

Register a QmitkQuestionWidget subclass for a certain Question type string.

The service takes over ownership of the passed QmitkQuestionWidget pointer.

See also
Question::GetType()

Implements mitk::Forms::UI::IQuestionWidgetFactory.


The documentation for this class was generated from the following file: