omni.flux.tabbed.widget#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.delegate.Delegate(
- rotation: Rotation | None = None,
- horizontal: bool = True,
Delegate of the tree
- build_branch(model, item, column_id, level, expanded)#
Create a branch widget that opens or closes subtree
- build_header(column_id)#
Build the header
- build_widget(model, item: _Item, column_id, level, expanded)#
Create a widget per item
- get_toggled_values()#
Get the visibility of the gradients
- set_toggled_value(items: List[_Item], value: bool)#
Set the gradient visible (toggle on/off)
- Parameters:
items – the item to toggle
value – toggle or not
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.model.Item(title)#
Item of the model
- can_item_have_children(
- item: Item,
Define if the item can have children or not
- Parameters:
item – the item itself
- Returns:
If the item can has a children or not
- subscribe_mouse_released(
- function: Callable[[Item], Any],
Subscribe to the on_value_changed_callback event.
- Parameters:
function – the callback to execute when the event is triggered
- Returns:
An object that will automatically unsubscribe when destroyed.
- property title: str#
The title that will be showed on the tree
- class omni.flux.tabbed.widget.tab_tree.model.Model#
Basic list model
- add(datas: List[str])#
Set the items to show
- get_item_value_model(item, column_id)#
Return value model. It’s the object that tracks the specific value. In our case we use ui.SimpleStringModel.
- remove(datas: List[str])#
Set the items to show
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.tabbed.widget.tab_tree.tree.Tree(
- model: _Model,
- delegate: _Delegate,
- horizontal: bool = True,
- root_frame_name: str = None,
- selection_changed_fn: Callable[[List[_Item]], Any] = None,
- size_tab_label: Tuple[Length, Length] = None,
- destroy(self: omni.ui._ui.Widget) None#
Removes all the callbacks and circular references.
- set_toggled_value(items: List[_Item], value: bool)#
Set the gradient visible (toggle on/off)
- Parameters:
items – the item to toggle
value – toggle or not