Medical Imaging Interaction Toolkit
2024.06.99-ccaff7ce
Medical Imaging Interaction Toolkit
|
#include <mitkForm.h>
Classes | |
class | Section |
Public Member Functions | |
Form (const std::string &title="", const std::string &description="") | |
~Form () | |
Form (Form &&other) noexcept | |
Form & | operator= (Form &&other) noexcept |
Section & | AddSection (const std::string &title="", const std::string &description="") |
int | GetNumberOfSections () const |
Section & | GetSection (int index) |
const Section & | GetSection (int index) const |
std::string | GetTitle () const |
void | SetTitle (const std::string &title) |
std::string | GetDescription () const |
void | SetDescription (const std::string &description) |
std::vector< Question * > | GetQuestions () const |
void | AddQuestion (Question *question) |
void | AddSupplement (const std::string &key) |
Add extra data that is submitted together with the responses. More... | |
bool | SetSupplement (const std::string &key, const std::string &value) |
Set the value of a certain existing supplement. More... | |
const std::map< std::string, std::string > & | GetSupplements () const |
std::vector< Section >::const_iterator | begin () const |
std::vector< Section >::const_iterator | end () const |
std::vector< Section >::iterator | begin () |
std::vector< Section >::iterator | end () |
A form consisting of questions possibly divided into multiple sections/pages.
A form always has at least a single section, which is also used to define the form's general title and description. Helper methods like SetTitle() or SetDescription() can be used to conveniently set these properties of the first section.
Definition at line 36 of file mitkForm.h.
|
explicit |
mitk::Forms::Form::~Form | ( | ) |
|
noexcept |
void mitk::Forms::Form::AddQuestion | ( | Question * | question | ) |
Section& mitk::Forms::Form::AddSection | ( | const std::string & | title = "" , |
const std::string & | description = "" |
||
) |
void mitk::Forms::Form::AddSupplement | ( | const std::string & | key | ) |
Add extra data that is submitted together with the responses.
Supplements are a rudimentary and delicate feature to add extra data to submissions, i.e., extra columns for CSV submissions.
Supplements are key-value pairs supposed to be completely set up before the first submission. Afterwards, do not add any new supplements. Values of existing supplements can be safely modified, though.
std::vector<Section>::iterator mitk::Forms::Form::begin | ( | ) |
std::vector<Section>::const_iterator mitk::Forms::Form::begin | ( | ) | const |
std::vector<Section>::iterator mitk::Forms::Form::end | ( | ) |
std::vector<Section>::const_iterator mitk::Forms::Form::end | ( | ) | const |
std::string mitk::Forms::Form::GetDescription | ( | ) | const |
int mitk::Forms::Form::GetNumberOfSections | ( | ) | const |
std::vector<Question*> mitk::Forms::Form::GetQuestions | ( | ) | const |
Section& mitk::Forms::Form::GetSection | ( | int | index | ) |
const Section& mitk::Forms::Form::GetSection | ( | int | index | ) | const |
const std::map<std::string, std::string>& mitk::Forms::Form::GetSupplements | ( | ) | const |
std::string mitk::Forms::Form::GetTitle | ( | ) | const |
void mitk::Forms::Form::SetDescription | ( | const std::string & | description | ) |
bool mitk::Forms::Form::SetSupplement | ( | const std::string & | key, |
const std::string & | value | ||
) |
Set the value of a certain existing supplement.
true
if the supplement exists, false
otherwise.void mitk::Forms::Form::SetTitle | ( | const std::string & | title | ) |