Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
mitkDropdownQuestion.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 mitkDropdownQuestion_h
14
#define mitkDropdownQuestion_h
15
16
#include <
mitkQuestionWithOptions.h
>
17
18
namespace
mitk::Forms
19
{
26
class
MITKFORMS_EXPORT
DropdownQuestion
:
public
QuestionWithOptions
27
{
28
public
:
31
~DropdownQuestion
()
override
;
32
37
std::string
GetType
()
const override
;
38
43
Question
*
CreateAnother
()
const override
;
44
49
void
FromJSON
(
const
nlohmann::ordered_json& j)
override
;
50
55
void
ToJSON
(nlohmann::ordered_json& j)
const override
;
56
61
using
QuestionWithOptions::SetResponse
;
62
};
63
71
MITKFORMS_EXPORT
void
from_json
(
const
nlohmann::ordered_json& j,
DropdownQuestion
& q);
72
80
MITKFORMS_EXPORT
void
to_json
(nlohmann::ordered_json& j,
const
DropdownQuestion
& q);
81
}
82
83
#endif
MITKFORMS_EXPORT
#define MITKFORMS_EXPORT
Definition:
MitkFormsExports.h:15
mitk::Forms::DropdownQuestion
A Question whose possible responses are represented by a combo box.
Definition:
mitkDropdownQuestion.h:27
mitk::Forms::DropdownQuestion::FromJSON
void FromJSON(const nlohmann::ordered_json &j) override
Deserialize this DropdownQuestion from JSON.
mitk::Forms::DropdownQuestion::CreateAnother
Question * CreateAnother() const override
Create a new default-constructed DropdownQuestion instance.
mitk::Forms::DropdownQuestion::ToJSON
void ToJSON(nlohmann::ordered_json &j) const override
Serialize this DropdownQuestion to JSON.
mitk::Forms::DropdownQuestion::GetType
std::string GetType() const override
Return the type string "Drop-down".
mitk::Forms::DropdownQuestion::~DropdownQuestion
~DropdownQuestion() override
Virtual destructor.
mitk::Forms::QuestionWithOptions
Base class for questions with options to choose from as response.
Definition:
mitkQuestionWithOptions.h:29
mitk::Forms::QuestionWithOptions::SetResponse
virtual void SetResponse(size_t i)
Set one of the possible answer options as the single response.
mitk::Forms::Question
Abstract base class for all types of questions used in a Form.
Definition:
mitkQuestion.h:38
mitkQuestionWithOptions.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
mitkDropdownQuestion.h
Generated by
1.9.1