Implementation class for ToggleButtonGroupConcept.
More...
#include <kanzi/ui/node/concept/toggle_button_group.hpp>
|
unordered_map< size_t, Node & > | m_buttons |
| List of Toggle Buttons registered to the Toggle Button Group.
|
|
size_t | m_nextFreeIndex |
| Counter for the next available index number that the Toggle Button Group assigns to a Toggle Button that you register without a predefined index.
|
|
optional< size_t > | m_oldButtonIndex |
| The index of the Toggle Button last time Kanzi toggled on a Toggle Button in the Toggle Button Group.
|
|
template<
class TBaseClass,
class TDerivedClass>
class kanzi::ToggleButtonGroupConceptImpl< TBaseClass, TDerivedClass >
Implementation class for ToggleButtonGroupConcept.
◆ ToggleButtonGroupConceptImpl()
◆ makeEditorInfo()
◆ registerButton() [1/2]
Registers a Toggle Button to the Toggle Button Group with a preset index.
Fails if the index is already in use in that Toggle Button Group.
- Parameters
-
button | The Toggle Button to register to the Toggle Button Group. |
index | The index to use to register the button. The index cannot already be in use in the Toggle Button Group. |
- Returns
- If the registration was successful, the index, otherwise nullopt.
- Since
- Kanzi 3.9.0
◆ registerButton() [2/2]
Registers a Toggle Button to the Toggle Button Group and automatically assigns an index for that Toggle Button.
- Parameters
-
button | The Toggle Button to register to the Toggle Button Group. |
- Returns
- The index that Kanzi assigned to the Toggle Button during the registration, or nullopt if the registration failed.
- Since
- Kanzi 3.9.0
◆ unregisterButton()
Unregisters from the Toggle Button Group a Toggle Button with the given index.
- Parameters
-
index | The index of the Toggle Button to unregister from the Toggle Button Group. |
- Since
- Kanzi 3.9.0
◆ getCurrentButtonIndex()
◆ setCurrentButtonIndex()
Sets the value of the CurrentButtonIndexProperty.
- Parameters
-
index | The index of the Toggle Button in the Toggle Button Group that you want to toggle on. To toggle off all Toggle Buttons in the Toggle Button Group, pass nullopt. |
- See also
- getCurrentButtonIndex()
- Since
- Kanzi 3.9.0
◆ measureOverride()
◆ onDetached()
◆ onNodePropertyChanged()
◆ getThisObject() [1/2]
Internal accessor for the Curiously Recurring Template Pattern.
◆ getThisObject() [2/2]
Internal accessor for the Curiously Recurring Template Pattern.
◆ toggleOnRegisteredButton()
Toggles on passed button if it has more than 1 toggle states.
- Parameters
-
button | Button that Toggle Button Group toggles on. |
- Returns
- Returns true if button is toggle on successfully, otherwise false.
◆ m_buttons
List of Toggle Buttons registered to the Toggle Button Group.
◆ m_oldButtonIndex
The index of the Toggle Button last time Kanzi toggled on a Toggle Button in the Toggle Button Group.
◆ m_nextFreeIndex
Counter for the next available index number that the Toggle Button Group assigns to a Toggle Button that you register without a predefined index.
The documentation for this class was generated from the following files: