RadioButtonSettingModel
- class omni.kit.widget.settings.settings_model.RadioButtonSettingModel(setting_path: str)
Bases:
SimpleStringModel
Model for simple RadioButton widget. The setting value and options are strings.
Methods
__init__
(setting_path)RadioButtonSettingModel init function.
Return current selected item string/label.
Return current selected item idx.
set_reset_button
(button)Set reset button from ui.Rectangle.
set_value
(value[, update_setting])Set given value as current selected
Attributes
items
setting_path
- __init__(setting_path: str)
RadioButtonSettingModel init function.
- Parameters
setting_path – Carb setting path to create a model for. RadioButton items are specified in carb.settings “{setting_path}/items”
- get_value() → str
Return current selected item string/label.
- get_value_as_int() → int
Return current selected item idx.
- set_reset_button(button: Rectangle)
Set reset button from ui.Rectangle.
- set_value(value: Union[int, str], update_setting: bool = True)
Set given value as current selected
- Parameters
value (int|str) – Value to set. It can be either an int (index) or a string (label)
- Kwargs:
update_setting (bool): Update corresponding carb.setting. Default True.