Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkTextQuestion.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 mitkTextQuestion_h
14 #define mitkTextQuestion_h
15 
16 #include <mitkQuestion.h>
17 
18 namespace mitk::Forms
19 {
28  {
29  public:
32  ~TextQuestion() override;
33 
38  std::vector<std::string> GetResponsesAsStrings() const override;
39 
42  void ClearResponses() override;
43 
48  bool IsComplete() const override;
49 
54  std::string GetResponse() const;
55 
60  void SetResponse(const std::string& response);
61 
62  private:
63  std::string m_Response;
64  };
65 }
66 
67 #endif
#define MITKFORMS_EXPORT
Abstract base class for all types of questions used in a Form.
Definition: mitkQuestion.h:38
Abstract base class for questions with a single free-text response.
void ClearResponses() override
Clear the text response.
bool IsComplete() const override
Check whether the response is non-empty.
void SetResponse(const std::string &response)
Set the text response.
std::vector< std::string > GetResponsesAsStrings() const override
Return the text response as a single-element vector.
~TextQuestion() override
Virtual destructor.
std::string GetResponse() const
Get the current text response.