|
enum | State { None,
SetClear,
Set
} |
|
using | SignalType = std::tuple< State, int, SignalToken > |
|
|
Signal< SignalType > | stateTx {} |
|
◆ RadioBehavior()
rose::RadioBehavior::RadioBehavior |
( |
bool |
noneIsValid | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
noneIsValid | Set whether the all buttons off is a valid state. |
◆ clear()
void rose::RadioBehavior::clear |
( |
| ) |
|
Remove all ButtonFrames from the set.
The resulting state (cleared to none) is transmitted.
◆ clearState()
void rose::RadioBehavior::clearState |
( |
| ) |
|
Clear the state.
A clear state is all buttons off, if that is valid, or the first ButtonFrame on. The resulting state is transmitted.
◆ emplace_back()
void rose::RadioBehavior::emplace_back |
( |
std::shared_ptr< ButtonFrame > & |
button | ) |
|
◆ getState()
std::pair<State,int> rose::RadioBehavior::getState |
( |
| ) |
const |
|
inline |
Get the current state of the RadioBehavior.
- Returns
- A std::pair with the State and Selected button.
◆ setState() [1/2]
void rose::RadioBehavior::setState |
( |
std::pair< State, int > |
state | ) |
|
|
inline |
◆ setState() [2/2]
void rose::RadioBehavior::setState |
( |
RadioBehavior::State |
state, |
|
|
int |
selected |
|
) |
| |
Set the state.
If the requested state is invalid, the state is cleared. The new state is transmitted.
- Parameters
-
The documentation for this class was generated from the following files: