Qt widget that renders and manages an interactive mitk::Forms::Form.
More...
#include <QmitkForm.h>
|
| void | Submit () |
| | Emitted when the user clicks the submit button and all required questions in the final section are validated. More...
|
| |
Qt widget that renders and manages an interactive mitk::Forms::Form.
QmitkForm presents a multi-section form to the user, handles navigation between sections, validates required questions, and submits responses to a CSV file. It creates QmitkQuestionWidget instances for each question via the mitk::Forms::UI::IQuestionWidgetFactory service.
If no responses path is set, the user is prompted with a file dialog on submission.
- See also
- mitk::Forms::Form, QmitkQuestionWidget, mitk::Forms::UI::IQuestionWidgetFactory
Definition at line 39 of file QmitkForm.h.
◆ QmitkForm() [1/2]
| QmitkForm::QmitkForm |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct the widget without a form.
Call SetForm() afterwards to associate a form.
- Parameters
-
| [in] | parent | The parent widget. |
◆ QmitkForm() [2/2]
Construct the widget and associate it with the given form.
- Parameters
-
| [in] | form | A pointer to the Form to display. The widget does not take ownership. |
| [in] | parent | The parent widget. |
- Precondition
form must not be nullptr.
◆ ~QmitkForm()
| QmitkForm::~QmitkForm |
( |
| ) |
|
|
override |
◆ GetForm()
Get the currently associated form.
- Returns
- A pointer to the form, or
nullptr if none is set.
◆ GetResponsesPath()
| fs::path QmitkForm::GetResponsesPath |
( |
| ) |
const |
Get the path where form responses are saved.
- Returns
- The CSV file path, or an empty path if not set.
◆ SetForm()
Set the form to display.
This recreates all question widgets and resets the form state.
- Parameters
-
| [in] | form | A pointer to the Form to display. Must not be nullptr. |
- Exceptions
-
◆ SetResponsesPath()
| void QmitkForm::SetResponsesPath |
( |
const fs::path & |
csvPath | ) |
|
Set the path where form responses will be saved.
If this is set before submission, the file dialog is skipped and responses are written directly to this path.
- Parameters
-
| [in] | csvPath | The file path for CSV output. |
◆ Submit
| void QmitkForm::Submit |
( |
| ) |
|
|
signal |
Emitted when the user clicks the submit button and all required questions in the final section are validated.
The documentation for this class was generated from the following file: