Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
mitkCheckboxesQuestion.h
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#ifndef mitkCheckboxesQuestion_h
14
#define mitkCheckboxesQuestion_h
15
16
#include <
mitkQuestionWithOtherOption.h
>
17
18
namespace
mitk::Forms
19
{
27
class
MITKFORMS_EXPORT
CheckboxesQuestion
:
public
QuestionWithOtherOption
28
{
29
public
:
32
~CheckboxesQuestion
()
override
;
33
38
std::string
GetType
()
const override
;
39
44
Question
*
CreateAnother
()
const override
;
45
50
void
FromJSON
(
const
nlohmann::ordered_json& j)
override
;
51
56
void
ToJSON
(nlohmann::ordered_json& j)
const override
;
57
62
using
QuestionWithOptions::AddResponse
;
63
68
using
QuestionWithOptions::RemoveResponse
;
69
74
using
QuestionWithOtherOption::AddOtherResponse
;
75
80
using
QuestionWithOtherOption::RemoveOtherResponse
;
81
};
82
90
MITKFORMS_EXPORT
void
from_json
(
const
nlohmann::ordered_json& j,
CheckboxesQuestion
& q);
91
99
MITKFORMS_EXPORT
void
to_json
(nlohmann::ordered_json& j,
const
CheckboxesQuestion
& q);
100
}
101
102
#endif
MITKFORMS_EXPORT
#define MITKFORMS_EXPORT
Definition:
MitkFormsExports.h:15
mitk::Forms::CheckboxesQuestion
A Question whose possible responses are represented by checkboxes.
Definition:
mitkCheckboxesQuestion.h:28
mitk::Forms::CheckboxesQuestion::GetType
std::string GetType() const override
Return the type string "Checkboxes".
mitk::Forms::CheckboxesQuestion::FromJSON
void FromJSON(const nlohmann::ordered_json &j) override
Deserialize this CheckboxesQuestion from JSON.
mitk::Forms::CheckboxesQuestion::~CheckboxesQuestion
~CheckboxesQuestion() override
Virtual destructor.
mitk::Forms::CheckboxesQuestion::CreateAnother
Question * CreateAnother() const override
Create a new default-constructed CheckboxesQuestion instance.
mitk::Forms::CheckboxesQuestion::ToJSON
void ToJSON(nlohmann::ordered_json &j) const override
Serialize this CheckboxesQuestion to JSON.
mitk::Forms::QuestionWithOptions::AddResponse
void AddResponse(size_t i)
Add one of the possible answer options to the responses.
mitk::Forms::QuestionWithOptions::RemoveResponse
void RemoveResponse(size_t i)
Remove one of the already given responses.
mitk::Forms::QuestionWithOtherOption
Base class for questions with options that may also have a free text option.
Definition:
mitkQuestionWithOtherOption.h:32
mitk::Forms::QuestionWithOtherOption::RemoveOtherResponse
void RemoveOtherResponse()
Remove the "Other" response from the list of already given responses.
mitk::Forms::QuestionWithOtherOption::AddOtherResponse
void AddOtherResponse(const std::string &response)
Add the free text given as "Other" option to the list of responses.
mitk::Forms::Question
Abstract base class for all types of questions used in a Form.
Definition:
mitkQuestion.h:38
mitkQuestionWithOtherOption.h
mitk::Forms
Definition:
mitkCheckboxesQuestion.h:19
mitk::Forms::to_json
MITKFORMS_EXPORT void to_json(nlohmann::ordered_json &j, const CheckboxesQuestion &q)
Serialize a CheckboxesQuestion to JSON.
mitk::Forms::from_json
MITKFORMS_EXPORT void from_json(const nlohmann::ordered_json &j, CheckboxesQuestion &q)
Deserialize a CheckboxesQuestion from JSON.
src
MITK
Modules
Forms
include
mitkCheckboxesQuestion.h
Generated by
1.9.1