|
HoverRace
2.0
|
A group of radio buttons. More...
#include <RadioButton.h>
Public Types | |
| using | button_t = RadioButton< T > |
| using | valueChangedSignal_t = boost::signals2::signal< void()> |
Public Member Functions | |
| RadioGroup () | |
| void | Add (std::shared_ptr< button_t > button) |
| Add a radio button to the group. More... | |
| const T & | GetValue () const |
| valueChangedSignal_t & | GetValueChangedSignal () |
| void | SetValue (const T &val) |
| Set the selected radio button by value. More... | |
Private Member Functions | |
| void | SetSelectedButton (button_t *sel) |
Private Attributes | |
| std::vector< std::shared_ptr< button_t > > | buttons |
| std::vector< std::unique_ptr< boost::signals2::scoped_connection > > | clickedConns |
| button_t * | selButton |
| valueChangedSignal_t | valueChangedSignal |
A group of radio buttons.
| T | The type of the values held by the radio buttons. |
| using HoverRace::Display::RadioGroup< T >::button_t = RadioButton<T> |
| using HoverRace::Display::RadioGroup< T >::valueChangedSignal_t = boost::signals2::signal<void()> |
|
inline |
|
inline |
Add a radio button to the group.
| button | The button to add (may not be nullptr). |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
Set the selected radio button by value.
If none of the radio buttons in this group match the value, then the selection will stay unchanged.
| val | The value. |
|
private |
|
private |
|
private |
|
private |
1.8.11