#include <OptionsGroup.h>
OptionsGroup is a kind of data for a radio button. It has a list of text representing a list of choices, and a integer number indicating the choice selected.
More...
OptionsGroup is a kind of data for a radio button. It has a list of text representing a list of choices, and a integer number indicating the choice selected.
◆ selectedItem
unsigned int sofa::helper::OptionsGroup::selectedItem |
|
protected |
◆ textItems
type::vector<std::string> sofa::helper::OptionsGroup::textItems |
|
protected |
◆ OptionsGroup() [1/5]
sofa::helper::OptionsGroup::OptionsGroup |
( |
| ) |
|
◆ OptionsGroup() [2/5]
sofa::helper::OptionsGroup::OptionsGroup |
( |
int |
nbofRadioButton, |
|
|
|
... |
|
) |
| |
|
explicit |
Constructor by given the number of argument following by the variable arguments Example OptionsGroup m_options(4,"button0","button1","button2","button3");
◆ OptionsGroup() [3/5]
template<class T , typename >
sofa::helper::OptionsGroup::OptionsGroup |
( |
const T & |
list | ) |
|
|
explicit |
generic constructor taking other string container like list<string>, set<string>, vector<string>
◆ OptionsGroup() [4/5]
template<class T >
sofa::helper::OptionsGroup::OptionsGroup |
( |
const std::initializer_list< T > & |
list | ) |
|
◆ OptionsGroup() [5/5]
sofa::helper::OptionsGroup::OptionsGroup |
( |
const OptionsGroup & |
m_radiotrick | ) |
|
◆ buildFromContainer()
template<class T >
void sofa::helper::OptionsGroup::buildFromContainer |
( |
const T & |
list | ) |
|
|
protected |
◆ getSelectedId()
unsigned int sofa::helper::OptionsGroup::getSelectedId |
( |
| ) |
const |
◆ getSelectedItem()
const std::string & sofa::helper::OptionsGroup::getSelectedItem |
( |
| ) |
const |
◆ isInOptionsList()
int sofa::helper::OptionsGroup::isInOptionsList |
( |
const std::string & |
tempostring | ) |
const |
return the id_item of the string if found in string list button -1 if not found
◆ operator=()
◆ operator[]()
const std::string& sofa::helper::OptionsGroup::operator[] |
( |
const unsigned int |
i | ) |
const |
|
inline |
◆ readFromStream()
void sofa::helper::OptionsGroup::readFromStream |
( |
std::istream & |
stream | ) |
|
Setting the activated item by a input-stream. the istream is converted to string. If the reading string is in options list, its value is set activated, else push a warning.
◆ setItemName()
void sofa::helper::OptionsGroup::setItemName |
( |
unsigned int |
id_item, |
|
|
const std::string & |
name |
|
) |
| |
Set the name of the id-th item.
◆ setNames() [1/2]
template<class T >
void sofa::helper::OptionsGroup::setNames |
( |
const std::initializer_list< T > & |
list | ) |
|
◆ setNames() [2/2]
void sofa::helper::OptionsGroup::setNames |
( |
int |
nbofRadioButton, |
|
|
|
... |
|
) |
| |
Reinitializing options by a pre-constructed optionsgroup objected Example m_options.setNames(4,"button0","button1","button2","button3");
◆ setNbItems()
void sofa::helper::OptionsGroup::setNbItems |
( |
size_type |
nbofRadioButton | ) |
|
◆ setSelectedItem() [1/2]
OptionsGroup & sofa::helper::OptionsGroup::setSelectedItem |
( |
const std::string & |
m_string | ) |
|
Setting the activated item by its value (string)
◆ setSelectedItem() [2/2]
Setting the activated item by its id.
◆ size()
size_t sofa::helper::OptionsGroup::size |
( |
| ) |
const |
|
inline |
◆ writeToStream()
void sofa::helper::OptionsGroup::writeToStream |
( |
std::ostream & |
stream | ) |
const |